summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorIvan Alejandro <ivanalejandro0@yahoo.com.ar>2013-06-03 15:49:07 -0300
committerIvan Alejandro <ivanalejandro0@yahoo.com.ar>2013-06-03 15:55:40 -0300
commit5cb114cda57aacea4273ba0e41ad52f6d4ccf25f (patch)
treebc10c39cc7236cd5456b55bdb4ff66034caebf3c /setup.py
parent534f8a43d74f486629f5046021792868bee2a06a (diff)
Add custom develop command for setup.py
Diffstat (limited to 'setup.py')
-rwxr-xr-xsetup.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/setup.py b/setup.py
index f7b1ec30..7554c7dd 100755
--- a/setup.py
+++ b/setup.py
@@ -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(