Skip to content
This repository has been archived by the owner on Sep 11, 2023. It is now read-only.

Commit

Permalink
[setup] upgraded versioneer to 0.15
Browse files Browse the repository at this point in the history
  • Loading branch information
marscher committed Jun 15, 2015
1 parent bdf98c9 commit 1a6037b
Show file tree
Hide file tree
Showing 3 changed files with 1,136 additions and 466 deletions.
13 changes: 13 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,16 @@
verbosity=1
# omit tests which have the "slow" attribute set
attr=!slow

# See the docstring in versioneer.py for instructions. Note that you must
# re-run 'versioneer.py setup' after changing this section, and commit the
# resulting files.

[versioneer]
VCS = git
style = pep440
versionfile_source = pyemma/_version.py
versionfile_build = pyemma/_version.py
tag_prefix = v
parentdir_prefix = pyemma-

28 changes: 12 additions & 16 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,6 @@
print getSetuptoolsError()
sys.exit(24)

versioneer.VCS = 'git'
versioneer.versionfile_source = 'pyemma/_version.py'
versioneer.versionfile_build = 'pyemma/_version.py'
versioneer.tag_prefix = 'v' # tags are like v1.2.0
versioneer.parentdir_prefix = 'pyemma-'

###############################################################################
# Extensions
###############################################################################
Expand Down Expand Up @@ -176,9 +170,11 @@ def extensions():

return exts


def get_cmdclass():
vervsioneer_cmds = versioneer.get_cmdclass()

from setuptools.command.build_ext import build_ext
from distutils.command.build_ext import build_ext
class np_build(build_ext):
"""
Sets numpy include path for extensions. Its ensured, that numpy exists
Expand All @@ -198,7 +194,8 @@ def initialize_options(self):
from numpy import get_include
self.include_dirs = [get_include()]

class sdist(versioneer.cmd_sdist):
sdist_class = vervsioneer_cmds['sdist']
class sdist(sdist_class):
"""ensure cython files are compiled to c, when distributing"""

def run(self):
Expand All @@ -208,19 +205,18 @@ def run(self):

try:
from Cython.Build import cythonize
print "cythonizing sources"
cythonize(extensions())
except ImportError:
warnings.warn('at sdist cythonize failed')

return versioneer.cmd_sdist.run(self)
warnings.warn('sdist cythonize failed')
return sdist_class.run(self)

cmdclass = dict(build_ext=np_build,
version=versioneer.cmd_version,
versioneer=versioneer.cmd_update_files,
build=versioneer.cmd_build,
sdist=sdist,
)
return cmdclass

vervsioneer_cmds.update(cmdclass)
return vervsioneer_cmds


def script_entry_points():
Expand Down Expand Up @@ -305,4 +301,4 @@ def script_entry_points():
print "You need to manually upgrade your 'setuptools' installation!"
" Please use these instructions to perform an upgrade and/or consult\n"
" https://pypi.python.org/pypi/setuptools#installation-instructions"
print getSetuptoolsError()
print getSetuptoolsError()
Loading

0 comments on commit 1a6037b

Please sign in to comment.