Comments (11)
We added pendulum as a dependency in our project and are now having multiple reports of people who can't install on their platform because either it's 32 bit, or they don't have rust tooling and there isn't a prebuilt wheel for their platform. I really hope official way is added such that pendulum can fall back to the pure python implementation in those cases.
from pendulum.
Unless you are up to making the change required for this to work on 32 bit system, I doubt it will change.
from pendulum.
Any updates on this issue @sdispater?
from pendulum.
This was my concern.
As far I understand it would work, if the seconds variable in is changed to i64.
I can try to start with rust programming and prepare a PR for that.
from pendulum.
Is there a way to force the install to fall back to the pure python implementation?
EDIT: Or could a pure python wheel be published to pypi to fall back on?
from pendulum.
Is there a way to force the install to fall back to the pure python implementation?
EDIT: Or could a pure python wheel be published to pypi to fall back on?
@gazpachoking maybe the PENDULUM_EXTENSIONS=0
env var?
from pendulum.
from pendulum.
We added pendulum as a dependency in our project and are now having multiple reports of people who can't install on their platform because either it's 32 bit, or they don't have rust tooling and there isn't a prebuilt wheel for their platform. I really hope official way is added such that pendulum can fall back to the pure python implementation in those cases.
Other than 32-bit, could you maybe come up with a list of platforms we don't cover?
from pendulum.
I'll try to collect some data from our users with troubles. It's possible it's just 32bit users on raspberry pi like systems.
from pendulum.
Other than 32-bit, could you maybe come up with a list of platforms we don't cover?
Looks like linux aarch64 at least. (If that's not the detail needed there is more here)
EDIT: Hmm, I may not have read that log closely enough. That might be a different issue.
from pendulum.
Same problem as original poster when running on Ubuntu 18.04.6 LTS and 32-bit.
Cannot update Pendulum package since it required Rust and Cargo so installed those packages rustc
and cargo
just fine. Then it gets the same error as above.
I also noticed that the line PYO3_ENVIRONMENT_SIGNATURE="cpython-3.8-64bit"
is set to 64-bit instead of 32-bit.
I'm not sure why all of a sudden a new language is required to be installed for this package dependency and it is now failing for 32-bit systems since it appears that the build for Rust -> Cargo -> Maturin makes the hardcoded assumption that the system is always 64-bit.
Linux Info
root@host:~# uname -a
Linux host 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:29:48 UTC 2023 i686 i686 i686 GNU/Linux
Distro
root@host:~# cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04.6 LTS"
Version
root@host:/tmp# which python3
/usr/bin/python3
root@host:/tmp# ll /usr/bin/python3
lrwxrwxrwx 1 root root 25 May 26 2023 /usr/bin/python3 -> /etc/alternatives/python3*
root@host:/tmp# ll /etc/alternatives/python3
lrwxrwxrwx 1 root root 18 May 26 2023 /etc/alternatives/python3 -> /usr/bin/python3.8*
root@host:/tmp# python3 --version
Python 3.8.18
root@host:/tmp# rustc --version
rustc 1.67.1 (d5a82bbd2 2023-02-07) (built from a source tarball)
root@host:/tmp# cargo --version
cargo 1.67.0
root@host:/tmp# pip --version
pip 23.3.2 from /usr/local/lib/python3.8/dist-packages/pip (python 3.8)
Error - PYO3_ENVIRONMENT_SIGNATURE="cpython-3.8-64bit"
Caused by: Cargo build finished with "exit status: 101": `PYO3_ENVIRONMENT_SIGNATURE="cpython-3.8-64bit" PYO3_PYTHON="/usr/bin/python3" PYTHON_SYS_EXECUTABLE="/usr/bin/python3" "cargo" "rustc" "--message-format" "json-render-diagnostics" "--manifest-path" "/tmp/pip-install-k8toz2qx/pendulum_1a784c65d6ec494c90a21ee7d6fe09b8/rust/Cargo.toml" "--release" "--lib" "--crate-type" "cdylib"`
Errors
2024-01-03T04:58:05,343 Building wheels for collected packages: pendulum
2024-01-03T04:58:05,346 Created temporary directory: /tmp/pip-wheel-fc4artfx
2024-01-03T04:58:05,346 Destination directory: /tmp/pip-wheel-fc4artfx
2024-01-03T04:58:05,349 Running command Building wheel for pendulum (pyproject.toml)
2024-01-03T04:58:05,702 Running `maturin pep517 build-wheel -i /usr/bin/python3 --compatibility off`
2024-01-03T04:58:06,314 ๐น Building a mixed python/rust project
2024-01-03T04:58:06,315 ๐ Found pyo3 bindings
2024-01-03T04:58:06,619 ๐ Found CPython 3.8 at /usr/bin/python3
2024-01-03T04:58:07,363 Compiling target-lexicon v0.12.6
2024-01-03T04:58:07,363 Compiling python3-dll-a v0.2.9
2024-01-03T04:58:07,364 Compiling libc v0.2.139
2024-01-03T04:58:07,365 Compiling autocfg v1.1.0
2024-01-03T04:58:12,558 Compiling once_cell v1.17.1
2024-01-03T04:58:14,852 Compiling proc-macro2 v1.0.51
2024-01-03T04:58:16,655 Compiling unicode-ident v1.0.6
2024-01-03T04:58:17,528 Compiling quote v1.0.23
2024-01-03T04:58:20,869 Compiling syn v1.0.109
2024-01-03T04:58:24,872 Compiling pyo3-build-config v0.19.1
2024-01-03T04:58:24,968 Compiling lock_api v0.4.9
2024-01-03T04:58:27,400 Compiling parking_lot_core v0.9.7
2024-01-03T04:58:32,301 Compiling cc v1.0.79
2024-01-03T04:58:38,172 Compiling memoffset v0.9.0
2024-01-03T04:58:40,518 Compiling smallvec v1.10.0
2024-01-03T04:58:43,899 Compiling cfg-if v1.0.0
2024-01-03T04:58:44,059 Compiling scopeguard v1.1.0
2024-01-03T04:58:54,954 Compiling parking_lot v0.12.1
2024-01-03T04:59:00,301 Compiling libmimalloc-sys v0.1.35
2024-01-03T04:59:09,199 Compiling pyo3-ffi v0.19.1
2024-01-03T04:59:12,630 Compiling pyo3 v0.19.1
2024-01-03T04:59:16,143 Compiling unindent v0.1.11
2024-01-03T04:59:21,784 Compiling indoc v1.0.9
2024-01-03T04:59:29,569 Compiling mimalloc v0.1.39
2024-01-03T04:59:39,815 Compiling pyo3-macros-backend v0.19.1
2024-01-03T05:00:50,569 Compiling pyo3-macros v0.19.1
2024-01-03T05:02:20,322 Compiling _pendulum v3.0.0 (/tmp/pip-install-k8toz2qx/pendulum_1a784c65d6ec494c90a21ee7d6fe09b8/rust)
2024-01-03T05:02:25,221 error: this arithmetic operation will overflow
2024-01-03T05:02:25,222 --> src/helpers.rs:59:20
2024-01-03T05:02:25,222 |
2024-01-03T05:02:25,223 59 | seconds += ((146_097 - 10957) * SECS_PER_DAY as usize) as isize;
2024-01-03T05:02:25,223 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ attempt to compute `135140_usize * 86400_usize`, which would overflow
2024-01-03T05:02:25,224 |
2024-01-03T05:02:25,225 = note: `#[deny(arithmetic_overflow)]` on by default
2024-01-03T05:04:17,959 error: could not compile `_pendulum` due to previous error
2024-01-03T05:04:17,974 ๐ฅ maturin failed
2024-01-03T05:04:17,975 Caused by: Failed to build a native library through cargo
2024-01-03T05:04:17,975 Caused by: Cargo build finished with "exit status: 101": `PYO3_ENVIRONMENT_SIGNATURE="cpython-3.8-64bit" PYO3_PYTHON="/usr/bin/python3" PYTHON_SYS_EXECUTABLE="/usr/bin/python3" "cargo" "rustc" "--message-format" "json-render-diagnostics" "--manifest-path" "/tmp/pip-install-k8toz2qx/pendulum_1a784c65d6ec494c90a21ee7d6fe09b8/rust/Cargo.toml" "--release" "--lib" "--crate-type" "cdylib"`
2024-01-03T05:04:17,976 Error: command ['maturin', 'pep517', 'build-wheel', '-i', '/usr/bin/python3', '--compatibility', 'off'] returned non-zero exit status 1
2024-01-03T05:04:18,009 ERROR: Building wheel for pendulum (pyproject.toml) exited with 1
2024-01-03T05:04:18,049 [bold magenta]full command[/]: [blue]/usr/bin/python3 /usr/local/lib/python3.8/dist-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py build_wheel /tmp/tmp3ztdwcg3[/]
2024-01-03T05:04:18,050 [bold magenta]cwd[/]: /tmp/pip-install-k8toz2qx/pendulum_1a784c65d6ec494c90a21ee7d6fe09b8
2024-01-03T05:04:18,052 ERROR: Failed building wheel for pendulum
2024-01-03T05:04:18,056 Failed to build pendulum
2024-01-03T05:04:18,058 ERROR: Could not build wheels for pendulum, which is required to install pyproject.toml-based projects
2024-01-03T05:04:18,060 Exception information:
2024-01-03T05:04:18,060 Traceback (most recent call last):
2024-01-03T05:04:18,060 File "/usr/local/lib/python3.8/dist-packages/pip/_internal/cli/base_command.py", line 180, in exc_logging_wrapper
2024-01-03T05:04:18,060 status = run_func(*args)
2024-01-03T05:04:18,060 File "/usr/local/lib/python3.8/dist-packages/pip/_internal/cli/req_command.py", line 245, in wrapper
2024-01-03T05:04:18,060 return func(self, options, args)
2024-01-03T05:04:18,060 File "/usr/local/lib/python3.8/dist-packages/pip/_internal/commands/install.py", line 429, in run
2024-01-03T05:04:18,060 raise InstallationError(
2024-01-03T05:04:18,060 pip._internal.exceptions.InstallationError: Could not build wheels for pendulum, which is required to install pyproject.toml-based projects
2024-01-03T05:04:18,154 Remote version of pip: 23.3.2
2024-01-03T05:04:18,155 Local version of pip: 23.3.2
from pendulum.
Related Issues (20)
- "import pendulum" causes unwanted import of pytest (presence of pytest in sys.modules often used to control Python behaviour) HOT 2
- MMM is not case-insensitive like Java
- If you have the /etc/timezone file set to a timezone string, pendulum.UTC has that timezone's utcoffset instead of None HOT 1
- in_words() exclude week
- timedelta additions to pendulum.DateTime HOT 1
- extreme slow down in `in_tz` after upgrading from 2.1.2 to 3.0.0 HOT 3
- Day of week constants HOT 1
- pendulum.instance & dateutil.tz compatibility
- Localized Format LT inconsistent with leading zeroes
- Default string representation is not iso anymore HOT 1
- Add DateTime to typing for diff()
- Cannot install version 2.x via pip because of dead link for get-poetry.py in build-wheels.sh HOT 1
- IsADirectoryError in datetime.py
- DeprecationWarning about datetime.utcfromtimestamp in Python-3.12 HOT 2
- Flexget install Raspberry PI ! HOT 6
- Bugs in `Duration` edge cases
- Remove deprecated datetime.datetime.utcfromtimestamp HOT 1
- v2.8.1 broke Pendulum math and timezone awareness HOT 1
- `pendulum.parse()` consistently fails on the last day of each month with iso week dates in 3.0.0 HOT 1
- Pendulum shouldn't rely on Linux distro-specific timezone configuration HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pendulum.