File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -129,8 +129,6 @@ jobs:
129129 python --version
130130 python -m pip install delocate wheel setuptools numpy six --no-cache-dir
131131
132- export LCE_RELEASE_VERSION=${{ github.event.inputs.version }}
133-
134132 ./configure.py
135133
136134 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:
139137 for f in artifacts/*.whl; do
140138 delocate-wheel -w wheelhouse $f
141139 done
140+ env :
141+ LCE_RELEASE_VERSION : ${{ github.event.inputs.version }}
142142 shell : bash
143143 - uses : actions/upload-artifact@v2
144144 with :
Original file line number Diff line number Diff line change @@ -17,11 +17,19 @@ def has_ext_modules(self):
1717 return True
1818
1919
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+
2028ext_modules = [Extension ("_foo" , ["stub.cc" ])] if platform .startswith ("linux" ) else []
2129
2230setup (
2331 name = "larq-compute-engine" ,
24- version = os . getenv ( "LCE_RELEASE_VERSION" , "0.5.0" ),
32+ version = get_version_number ( default = "0.5.0" ),
2533 python_requires = ">=3.6" ,
2634 description = "Highly optimized inference engine for binarized neural networks." ,
2735 long_description = readme (),
You can’t perform that action at this time.
0 commit comments