File tree 4 files changed +17
-13
lines changed
4 files changed +17
-13
lines changed Original file line number Diff line number Diff line change
1
+ # version.py is managed by setuptools-scm
2
+ src /_wheel2deb /version.py
3
+
1
4
# Byte-compiled / optimized / DLL files
2
5
__pycache__ /
3
6
* .py [cod ]
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ images: bdist
27
27
check :
28
28
@flake8 src
29
29
30
- tests :
30
+ tests : bdist
31
31
$(eval images := $(foreach a,$(DEBIAN_DISTS ) ,wheel2deb:$(a ) ) )
32
32
$(call map,run_tests,$(images ) )
33
33
49
49
50
50
define run_tests
51
51
docker run -ti -v $(CURDIR ) :/data --entrypoint "" $(1 ) /bin/bash -c " \
52
- pip install -e . \
52
+ pip install dist/*.whl \
53
53
&& rm -rf testing/__pycache__ \
54
54
&& py.test --cov";
55
55
endef
Original file line number Diff line number Diff line change 1
1
from setuptools import setup
2
2
3
- with open ('src/_wheel2deb/version.py' ) as f :
4
- exec (f .read ())
5
-
6
3
INSTALL_REQUIRES = [
7
4
'setuptools' ,
8
5
'wheel' ,
14
11
'pyyaml'
15
12
]
16
13
17
- setup (setup_requires = ['setuptools>=38.6.0' ],
14
+ version_template = """\
15
+ # coding: utf-8
16
+ # file generated by setuptools_scm
17
+ # don't change, don't track in version control
18
+ __version__ = {version!r}
19
+ """
20
+
21
+ setup (setup_requires = ['setuptools-scm' , 'setuptools>=38.6.0' ],
22
+ use_scm_version = {
23
+ 'write_to' : 'src/_wheel2deb/version.py' ,
24
+ 'write_to_template' : version_template },
18
25
package_dir = {'' : 'src' },
19
26
install_requires = INSTALL_REQUIRES ,
20
- include_package_data = True ,
21
- version = __version__ )
27
+ include_package_data = True )
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments