File tree 2 files changed +20
-2
lines changed
2 files changed +20
-2
lines changed Original file line number Diff line number Diff line change 12
12
cpython = platform .python_implementation () == 'CPython'
13
13
14
14
try :
15
- from Cython .Build import cythonize
16
15
from Cython .Distutils .extension import Extension
17
16
from Cython .Distutils import build_ext
18
17
except ImportError :
Original file line number Diff line number Diff line change 1
1
2
- # Version: 0.18
2
+ # Version: 0.18-1
3
3
4
4
"""The Versioneer - like a rocketeer, but for versions.
5
5
@@ -1559,6 +1559,25 @@ def run(self):
1559
1559
write_to_version_file (target_versionfile , versions )
1560
1560
cmds ["build_py" ] = cmd_build_py
1561
1561
1562
+ if "setuptools" in sys .modules :
1563
+ from setuptools .command .build_ext import build_ext as _build_ext
1564
+ else :
1565
+ from distutils .command .build_ext import build_ext as _build_ext
1566
+
1567
+ class cmd_build_ext (_build_ext ):
1568
+ def run (self ):
1569
+ root = get_root ()
1570
+ cfg = get_config_from_root (root )
1571
+ versions = get_versions ()
1572
+ _build_ext .run (self )
1573
+ # now locate _version.py in the new build/ directory and replace
1574
+ # it with an updated value
1575
+ target_versionfile = os .path .join (self .build_lib ,
1576
+ cfg .versionfile_source )
1577
+ print ("UPDATING %s" % target_versionfile )
1578
+ write_to_version_file (target_versionfile , versions )
1579
+ cmds ["build_ext" ] = cmd_build_ext
1580
+
1562
1581
if "cx_Freeze" in sys .modules : # cx_freeze enabled?
1563
1582
from cx_Freeze .dist import build_exe as _build_exe
1564
1583
# nczeczulin reports that py2exe won't like the pep440-style string
You can’t perform that action at this time.
0 commit comments