File tree 2 files changed +11
-3
lines changed
2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -129,8 +129,6 @@ jobs:
129
129
python --version
130
130
python -m pip install delocate wheel setuptools numpy six --no-cache-dir
131
131
132
- export LCE_RELEASE_VERSION=${{ github.event.inputs.version }}
133
-
134
132
./configure.py
135
133
136
134
bazelisk build :build_pip_pkg --copt=-fvisibility=hidden --copt=-mavx --copt=-mmacosx-version-min=10.13 --linkopt=-mmacosx-version-min=10.13 --linkopt=-dead_strip --distinct_host_configuration=false
@@ -139,6 +137,8 @@ jobs:
139
137
for f in artifacts/*.whl; do
140
138
delocate-wheel -w wheelhouse $f
141
139
done
140
+ env :
141
+ LCE_RELEASE_VERSION : ${{ github.event.inputs.version }}
142
142
shell : bash
143
143
- uses : actions/upload-artifact@v2
144
144
with :
Original file line number Diff line number Diff line change @@ -17,11 +17,19 @@ def has_ext_modules(self):
17
17
return True
18
18
19
19
20
+ def get_version_number (default ):
21
+ # The `or default` is because on CI the `getenv` can return the empty string.
22
+ version = os .getenv ("LCE_RELEASE_VERSION" , default ) or default
23
+ if "." not in version :
24
+ raise ValueError (f"Invalid version: { version } " )
25
+ return version
26
+
27
+
20
28
ext_modules = [Extension ("_foo" , ["stub.cc" ])] if platform .startswith ("linux" ) else []
21
29
22
30
setup (
23
31
name = "larq-compute-engine" ,
24
- version = os . getenv ( "LCE_RELEASE_VERSION" , "0.5.0" ),
32
+ version = get_version_number ( default = "0.5.0" ),
25
33
python_requires = ">=3.6" ,
26
34
description = "Highly optimized inference engine for binarized neural networks." ,
27
35
long_description = readme (),
You can’t perform that action at this time.
0 commit comments