Skip to content

Commit

Permalink
python: wheel: specify Python version as exclusive range to avoid bui…
Browse files Browse the repository at this point in the history
…lding against later versions of Python than pip is being run with during wheel generation on machines with more than one version
  • Loading branch information
selimnairb committed Aug 30, 2023
1 parent b88fad1 commit 3e7a8a6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion api/swig/python/setup.py.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ from pathlib import Path
import cmake_build_extension
import setuptools

PY_VERSION = f"{sys.version_info.major}.{sys.version_info.minor}"
PY_VERSION_MIN = f"{sys.version_info.major}.{sys.version_info.minor}"
PY_VERSION_MAX = f"{sys.version_info.major}.{sys.version_info.minor+1}"
PY_VERSION = f"{PY_VERSION_MIN}...<{PY_VERSION_MAX}"

setuptools.setup(
ext_modules=[
Expand Down
4 changes: 2 additions & 2 deletions docs/BUILDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
```shell
cmake -G Ninja -DCMAKE_BUILD_TYPE=Debug -B build -S . \
-DBAG_BUILD_TESTS:BOOL=ON -DBAG_CODE_COVERAGE:BOOL=ON \
-DBAG_BUILD_PYTHON:BOOL=OFF -DBAG_BUILD_EXAMPLES:BOOL=ON
-DBAG_BUILD_PYTHON:BOOL=OFF -DBAG_BUILD_EXAMPLES:BOOL=ON && \
cmake --build build -j 8
BAG_SAMPLES_PATH=/ABSOLUTE/PATH/TO/REPO/BAG/examples/sample-data ninja -C build build ccov-all-export-lcov
```
Expand Down Expand Up @@ -38,7 +38,7 @@ $ python -m pip wheel -w ./wheel/ ./build/api/swig/python

Then you can install the wheel with:
```shell
$ python -m pip install dist/bagPy-*.whl
$ python -m pip install ./wheel/bagPy-*.whl
```

## Windows: Visual Studio 2022/2019
Expand Down

0 comments on commit 3e7a8a6

Please sign in to comment.