Skip to content

Commit

Permalink
python: wheel: only version match to minor Python version, which is a…
Browse files Browse the repository at this point in the history
…ll that's needed for ABI compatibility and what is required for conda build
  • Loading branch information
selimnairb committed Aug 30, 2023
1 parent d959624 commit b88fad1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion api/swig/python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ cmake_policy(SET CMP0086 NEW)

if(Python_LOOKUP_VERSION)
set(Python_FIND_STRATEGY VERSION)
find_package(Python ${Python_LOOKUP_VERSION} EXACT COMPONENTS Interpreter Development)
find_package(Python ${Python_LOOKUP_VERSION} COMPONENTS Interpreter Development)
else()
set(Python_FIND_STRATEGY LOCATION)
find_package(Python3 COMPONENTS Interpreter Development)
Expand Down
2 changes: 1 addition & 1 deletion api/swig/python/setup.py.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ from pathlib import Path
import cmake_build_extension
import setuptools

PY_VERSION = f"{sys.version_info.major}.{sys.version_info.minor}.{sys.version_info.micro}"
PY_VERSION = f"{sys.version_info.major}.{sys.version_info.minor}"

setuptools.setup(
ext_modules=[
Expand Down
3 changes: 1 addition & 2 deletions docs/BUILDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ This will generate an HTML coverage report in `build/ccov/all-merged/index.html`
After building the C++ library in the `build` directory as above,
you will be able to build a Python wheel as follows:
```shell
$ cd build/api/swig/python
$ python -m pip wheel -w dist/ .
$ python -m pip wheel -w ./wheel/ ./build/api/swig/python
```

Then you can install the wheel with:
Expand Down

0 comments on commit b88fad1

Please sign in to comment.