projects
/
crypto-install.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
a4ae4a9
)
Add hook in setup.py to update version string.
author
Olof-Joachim Frahm
<olof@macrolet.net>
Sun, 18 Jan 2015 14:54:48 +0000
(14:54 +0000)
committer
Olof-Joachim Frahm
<olof@macrolet.net>
Wed, 21 Jan 2015 20:17:16 +0000
(20:17 +0000)
setup.py
patch
|
blob
|
history
diff --git
a/setup.py
b/setup.py
index
ad33947
..
26d908e
100755
(executable)
--- a/
setup.py
+++ b/
setup.py
@@
-2,9
+2,11
@@
import sys
import sys
+from distutils.command.build import build
from distutils.core import setup
from setuptools import find_packages
from setuptools.command.test import test as TestCommand
from distutils.core import setup
from setuptools import find_packages
from setuptools.command.test import test as TestCommand
+from subprocess import call
class PyTest (TestCommand):
class PyTest (TestCommand):
@@
-25,9
+27,22
@@
class PyTest (TestCommand):
sys.exit (pytest.main (self.pytest_args))
sys.exit (pytest.main (self.pytest_args))
+class UpdateVersion (build):
+ def run (self):
+ build.run (self)
+
+ def compile ():
+ call (["make", "build/crypto-install"])
+
+ self.execute (compile, [], "Updating version")
+
+
setup (name = "crypto_install",
version = "0.0.1",
scripts = ["crypto-install"],
install_requires = [],
tests_require = ["pytest"],
setup (name = "crypto_install",
version = "0.0.1",
scripts = ["crypto-install"],
install_requires = [],
tests_require = ["pytest"],
- cmdclass = {"test": PyTest})
+ cmdclass = {
+ "test": PyTest,
+ "build": UpdateVersion
+ })