Reputation: 2206
I created anaconda environment
$ python --version
Python 3.7.13
$ pip --version
pip 22.2.2 from C:\tools\miniconda3\envs\py37\lib\site-packages\pip (python 3.7)
In pyproject.toml
I have requires-python = ">=3.7"
[build-system]
requires = ["maturin>=0.13,<0.14"]
build-backend = "maturin"
[project]
name = "ecc_py"
requires-python = ">=3.7"
classifiers = [
"Programming Language :: Rust",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
]
I run maturin build
$ maturin build --release
Finished release [optimized] target(s) in 10.73s
š¦ Built wheel for CPython 3.10 to C:\Users\Aleksander\source\repos\Rust\ecc\target\wheels\ecc_py-0.1.0-cp310-none-win_amd64.whl
but then the wheel fails to install
$ pip install ..\target\wheels\ecc_py-0.1.0-cp310-none-win_amd64.whl
ERROR: ecc_py-0.1.0-cp310-none-win_amd64.whl is not a supported wheel on this platform.
It installs successfully in conda environment python=3.10. What am I doing wrong? It should be compatible with older versions as well. It works when running
$ maturin develop
š¦ Built wheel for CPython 3.7 to C:\Users\ALEKSA~1\AppData\Local\Temp\.tmpXTZvEE\ecc_py-0.1.0-cp37-none-win_amd64.whl
š Installed ecc-py-0.1.0
Upvotes: 1
Views: 2091
Reputation: 2206
So it found out it works with -i
flag
$ maturin build --release -i python
Finished release [optimized] target(s) in 6.33s
š¦ Built wheel for CPython 3.7 to C:\Users\Aleksander\source\repos\Rust\ecc\target\wheels\ecc_py-0.1.0-cp37-none-win_amd64.whl
I have no clue why it wouldn't work without it though.
Upvotes: 3