Fix versioneer to update versions on install
This commit is contained in:
parent
55bf11e393
commit
7a191c0ebb
|
@ -83,7 +83,7 @@ To use it:
|
|||
import os, sys, re
|
||||
from distutils.core import Command
|
||||
from distutils.command.sdist import sdist as _sdist
|
||||
from distutils.command.build import build as _build
|
||||
from distutils.command.build_py import build_py as _build_py
|
||||
|
||||
versionfile_source = None
|
||||
versionfile_build = None
|
||||
|
@ -578,11 +578,10 @@ class cmd_version(Command):
|
|||
ver = get_version(verbose=True)
|
||||
print("Version is currently: %s" % ver)
|
||||
|
||||
|
||||
class cmd_build(_build):
|
||||
class cmd_build_py(_build_py):
|
||||
def run(self):
|
||||
versions = get_versions(verbose=True)
|
||||
_build.run(self)
|
||||
_build_py.run(self)
|
||||
# now locate _version.py in the new build/ directory and replace it
|
||||
# with an updated value
|
||||
target_versionfile = os.path.join(self.build_lib, versionfile_build)
|
||||
|
@ -651,6 +650,6 @@ class cmd_update_files(Command):
|
|||
def get_cmdclass():
|
||||
return {'version': cmd_version,
|
||||
'update_files': cmd_update_files,
|
||||
'build': cmd_build,
|
||||
'build_py': cmd_build_py,
|
||||
'sdist': cmd_sdist,
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user