Python 3.12 support
Closed this issue · 3 comments
tsdownsample doesn't install with a Python 3.12 environment (tested locally with 3.12.0 and in Github CI)
However, I've been able to build it and pass the Pytest tests after switching Rust to rustup default nightly
and removing the pins on the dependencies in Cargo.toml (it wouldn't build before these steps).
Building wheels for collected packages: tsdownsample
Building wheel for tsdownsample (pyproject.toml): started
Building wheel for tsdownsample (pyproject.toml): finished with status 'error'
error: subprocess-exited-with-error
× Building wheel for tsdownsample (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [100 lines of output]
Running `maturin pep517 build-wheel -i /opt/hostedtoolcache/Python/3.12.0/x64/bin/python --compatibility off`
📦 Including license file "/tmp/pip-install-d4u9kedm/tsdownsample_64a0754dc6ce4c4daaf39edb4c31f838/LICENSE"
⚠️ Warning: specify [package.metadata.maturin] name in Cargo.toml is deprecated, use module-name in [tool.maturin] section in pyproject.toml instead
🍹 Building a mixed python/rust project
🔗 Found pyo3 bindings
🐍 Found CPython 3.12 at /opt/hostedtoolcache/Python/3.12.0/x64/bin/python
📡 Using build options bindings from pyproject.toml
Compiling autocfg v1.1.0
Compiling cfg-if v1.0.0
Failed to build tsdownsample
Compiling libc v0.2.142
Compiling target-lexicon v0.12.6
Compiling memoffset v0.8.0
Compiling crossbeam-utils v0.8.15
Compiling scopeguard v1.1.0
Compiling libm v0.2.6
Compiling pyo3-build-config v0.18.3
Compiling num-traits v0.2.15
Compiling crossbeam-epoch v0.9.14
Compiling once_cell v1.17.1
Compiling proc-macro2 v1.0.56
Compiling rayon-core v1.11.0
Compiling unicode-ident v1.0.8
Compiling quote v1.0.26
Compiling crossbeam-deque v0.8.3
Compiling crossbeam-channel v0.5.8
Compiling num_cpus v1.15.0
Compiling num-integer v0.1.45
Compiling syn v1.0.109
Compiling pyo3-ffi v0.18.3
Compiling lock_api v0.4.9
Compiling either v1.8.1
Compiling parking_lot_core v0.9.7
Compiling rawpointer v0.2.1
Compiling matrixmultiply v0.3.3
| ^^^^^^^
error[E0554]: `#![feature]` may not be used on the stable release channel
--> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/argminmax-0.3.1/src/lib.rs:4:12
|
4 | #![feature(int_roundings)]
| ^^^^^^^^^^^^^
error: aborting due to 6 previous errors
For more information about this error, try `rustc --explain E0554`.
Error: command ['maturin', 'pep517', 'build-wheel', '-i', '/opt/hostedtoolcache/Python/3.12.0/x64/bin/python', '--compatibility', 'off'] returned non-zero exit status 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for tsdownsample
ERROR: Could not build wheels for tsdownsample, which is required to install pyproject.toml-based projects
Error: Process completed with exit code 1.
Still seeing this issue??
I still encountered the issue when I tried installing plotly-resampler
via pip (version 24.0), as it tried to build wheels for tsdownsample==0.1.2
. Installing plotly-resampler
from source via pip install .
worked however, as the pyproject.toml
is now including tsdownsample = ">=0.1.3"
.
Probably the package on pipy was not updated?
I confirm, the issue is solved when installing from the Git repo, But it is still there when installing from Pypi
log when installing from Github:
> Successfully installed cfgv-3.4.0 distlib-0.3.8 filelock-3.13.1 identify-2.5.33 nodeenv-1.8.0 platformdirs-4.1.0 pre-commit-3.6.0 pyyaml-6.0.1 setuptools-69.0.3 virtualenv-20.25.0
Collecting tsdownsample (from -r requirements.txt (line 28))
Cloning https://github.com/predict-idlab/tsdownsample.git to /tmp/pip-install-qwqdgivt/tsdownsample_5cefde9baee5450d9f65b027a08b2f6a
Running command git clone --filter=blob:none --quiet https://github.com/predict-idlab/tsdownsample.git /tmp/pip-install-qwqdgivt/tsdownsample_5cefde9baee5450d9f65b027a08b2f6a
Resolved https://github.com/predict-idlab/tsdownsample.git to commit e4d4a66e40f3bf0411acf4aa42682e973fea137e
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'done'
Preparing metadata (pyproject.toml): started
Preparing metadata (pyproject.toml): finished with status 'done'
Collecting plotly (from -r requirements.txt (line 1))
log when installing from Pypi:
`Downloading pycparser-2.21-py2.py3-none-any.whl (118 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 118.7/118.7 kB 23.8 MB/s eta 0:00:00
Downloading uri_template-1.3.0-py3-none-any.whl (11 kB)
Downloading arrow-1.3.0-py3-none-any.whl (66 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 66.4/66.4 kB 21.1 MB/s eta 0:00:00
Downloading types_python_dateutil-2.9.0.20240316-py3-none-any.whl (9.7 kB)
Building wheels for collected packages: tsdownsample
Building wheel for tsdownsample (pyproject.toml): started
Building wheel for tsdownsample (pyproject.toml): finished with status 'error'
error: subprocess-exited-with-error× Building wheel for tsdownsample (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [101 lines of output]
Runningmaturin pep517 build-wheel -i /opt/hostedtoolcache/Python/3.12.2/x64/bin/python --compatibility off
📦 Including license file "/tmp/pip-install-0jssog_c/tsdownsample_e1158250bc7445609cb7f7cdbf5f1108/LICENSE"
⚠️ Warning: specify [package.metadata.maturin] name in Cargo.toml is deprecated, use module-name in [tool.maturin] section in pyproject.toml instead
🍹 Building a mixed python/rust project
🔗 Found pyo3 bindings
🐍 Found CPython 3.12 at /opt/hostedtoolcache/Python/3.12.2/x64/bin/python
📡 Using build options bindings from pyproject.toml
Compiling autocfg v1.1.0
Compiling libc v0.2.142
Compiling cfg-if v1.0.0
Compiling target-lexicon v0.12.6
Compiling crossbeam-utils v0.8.15
Compiling memoffset v0.8.0
Compiling scopeguard v1.1.0
Compiling libm v0.2.6
Compiling pyo3-build-config v0.18.3
Compiling crossbeam-epoch v0.9.14
Compiling num-traits v0.2.15
Compiling once_cell v1.17.1
Compiling proc-macro2 v1.0.56
Compiling rayon-core v1.11.0
Compiling quote v1.0.26
Compiling unicode-ident v1.0.8
Compiling crossbeam-deque v0.8.3
Compiling crossbeam-channel v0.5.8
Compiling num_cpus v1.15.0
Compiling num-integer v0.1.45
Compiling syn v1.0.109
Compiling pyo3-ffi v0.18.3
Compiling lock_api v0.4.9
Compiling either v1.8.1
Compiling parking_lot_core v0.9.7
Compiling rawpointer v0.2.1
Compiling matrixmultiply v0.3.3
Compiling rayon v1.7.0
Compiling num-complex v0.4.3
Compiling smallvec v1.10.0
Compiling ndarray v0.15.6
Compiling pyo3-macros-backend v0.18.3
Compiling half v2.2.1
Compiling pyo3 v0.18.3
Compiling parking_lot v0.12.1
Compiling indoc v1.0.9
Compiling paste v1.0.12
Compiling unindent v0.1.11
Compiling rustc-hash v1.1.0
Compiling pyo3-macros v0.18.3
Compiling argminmax v0.3.1
error: could not compileargminmax
(lib) due to 7 previous errors
warning: build failed, waiting for other jobs to finish...
💥 maturin failed
Caused by: Failed to build a native library through cargo
Caused by: Cargo build finished with "exit status: 101":PYO3_ENVIRONMENT_SIGNATURE="cpython-3.12-64bit" PYO3_PYTHON="/opt/hostedtoolcache/Python/3.12.2/x64/bin/python" PYTHON_SYS_EXECUTABLE="/opt/hostedtoolcache/Python/3.12.2/x64/bin/python" "cargo" "rustc" "--release" "--manifest-path" "/tmp/pip-install-0jssog_c/tsdownsample_e1158250bc7445609cb7f7cdbf5f1108/Cargo.toml" "--message-format" "json" "--lib"
error[E0554]:#![feature]
may not be used on the stable release channel
--> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/argminmax-0.3.1/src/lib.rs:1:1
|
1 | #![feature(stdsimd)]
| ^^^^^^^^^^^^^^^^^^^^error[E0554]: `#![feature]` may not be used on the stable release channel --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/argminmax-0.3.1/src/lib.rs:2:1 | 2 | #![feature(avx512_target_feature)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0554]: `#![feature]` may not be used on the stable release channel --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/argminmax-0.3.1/src/lib.rs:3:1 | 3 | #![feature(arm_target_feature)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0554]: `#![feature]` may not be used on the stable release channel --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/argminmax-0.3.1/src/lib.rs:4:1 | 4 | #![feature(int_roundings)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0554]: `#![feature]` may not be used on the stable release channel --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/argminmax-0.3.1/src/lib.rs:1:12 | 1 | #![feature(stdsimd)] | ^^^^^^^ error[E0554]: `#![feature]` may not be used on the stable release channel --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/argminmax-0.3.1/src/lib.rs:4:12 | 4 | #![feature(int_roundings)] | ^^^^^^^^^^^^^ error: aborting due to 6 previous errors For more information about this error, try `rustc --explain E0554`. Error: command ['maturin', 'pep517', 'build-wheel', '-i', '/opt/hostedtoolcache/Python/3.12.2/x64/bin/python', '--compatibility', 'off'] returned non-zero exit status 1 [end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for tsdownsample
ERROR: Could not build wheels for tsdownsample, which is required to install pyproject.toml-based projects
Failed to build tsdownsample
Error: Process completed with exit code 1.`