GithubHelp home page GithubHelp logo

Comments (11)

gazpachoking avatar gazpachoking commented on September 27, 2024 5

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.

Secrus avatar Secrus commented on September 27, 2024 2

Unless you are up to making the change required for this to work on 32 bit system, I doubt it will change.

from pendulum.

jschlyter avatar jschlyter commented on September 27, 2024 1

Any updates on this issue @sdispater?

from pendulum.

hesstobi avatar hesstobi commented on September 27, 2024

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.

gazpachoking avatar gazpachoking commented on September 27, 2024

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.

edgarrmondragon avatar edgarrmondragon commented on September 27, 2024

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.

gazpachoking avatar gazpachoking commented on September 27, 2024

from pendulum.

Secrus avatar Secrus commented on September 27, 2024

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.

gazpachoking avatar gazpachoking commented on September 27, 2024

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.

gazpachoking avatar gazpachoking commented on September 27, 2024

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.

JakFrost avatar JakFrost commented on September 27, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.