diff options
author | Ivan Alejandro <ivanalejandro0@yahoo.com.ar> | 2013-06-03 15:49:07 -0300 |
---|---|---|
committer | Ivan Alejandro <ivanalejandro0@yahoo.com.ar> | 2013-06-03 15:55:40 -0300 |
commit | 5cb114cda57aacea4273ba0e41ad52f6d4ccf25f (patch) | |
tree | bc10c39cc7236cd5456b55bdb4ff66034caebf3c /setup.py | |
parent | 534f8a43d74f486629f5046021792868bee2a06a (diff) |
Add custom develop command for setup.py
Diffstat (limited to 'setup.py')
-rwxr-xr-x | setup.py | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -56,6 +56,7 @@ leap_launcher = 'leap-client=leap.app:main' from distutils.command.build import build as _build from distutils.command.sdist import sdist as _sdist +from setuptools.command.develop import develop as _develop def copy_reqs(path, withsrc=False): @@ -87,6 +88,18 @@ class cmd_build(_build): copy_reqs(self.build_lib) +class cmd_develop(_develop): + def run(self): + # versioneer: + versions = versioneer.get_versions(verbose=True) + self._versioneer_generated_versions = versions + # unless we update this, the command will keep using the old version + self.distribution.metadata.version = versions["version"] + + _develop.run(self) + copy_reqs(self.egg_path) + + class cmd_sdist(_sdist): def run(self): # versioneer: @@ -103,6 +116,7 @@ class cmd_sdist(_sdist): cmdclass["build"] = cmd_build cmdclass["sdist"] = cmd_sdist +cmdclass["develop"] = cmd_develop setup( |