deedy5/primp

installing wheel requires Cargo

Closed this issue · 8 comments

Since 0.6.0, I can't install primp in an environment without Cargo:

$ pip install primp==0.6.0
Collecting primp==0.6.0
  Using cached primp-0.6.0.tar.gz (79 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... error
  error: subprocess-exited-with-error
  
  × Preparing metadata (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [6 lines of output]
      
      Cargo, the Rust package manager, is not installed or is not on PATH.
      This package requires Rust and Cargo to compile extensions. Install it through
      the system's package manager or via https://rustup.rs/
      
      Checking for Rust toolchain....
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

Getting Cargo installed in this environment is going to be rather painful. Is this dependency to install primp an expected behavior, or a regression from 0.5.5?

Your environment?

Using this docker image amazon/aws-glue-libs:glue_libs_4.0.0_image_01. Looks like it's based on AL2:

$ cat /etc/os-release
NAME="Amazon Linux"
VERSION="2"
ID="amzn"
ID_LIKE="centos rhel fedora"
VERSION_ID="2"
PRETTY_NAME="Amazon Linux 2"
ANSI_COLOR="0;33"
CPE_NAME="cpe:2.3:o:amazon:amazon_linux:2"
HOME_URL="https://amazonlinux.com/"
SUPPORT_END="2025-06-30"

$ cat /etc/image-id
image_name="amzn2-container-raw"
image_version="2"
image_arch="aarch64"
image_file="amzn2-container-raw-2.0.20240610.1-arm64"
image_stamp="7929-2364"
image_date="20240610233216"
recipe_name="amzn2 container"
recipe_id="028c14b6-e1d6-bc58-bba9-e4c8-c199-35c7-88a73b46"

You can probably repro the same with the base AL2 image:

docker run -it amazonlinux:latest /bin/bash

but it comes with python-3.7 so you need to build 3.8+ yourself.

linux aarch64 is manylinux_2_34‼️compatible - https://github.com/deedy5/primp/blob/main/README.md
Use AL2023

Amazon Linux compatibility (https://docs.aws.amazon.com/linux/al2023/ug/glibc-gcc-and-binutils.html)

glibc version
AL2 2.26
AL2023 2.34

PRIMP Linux compatibility (https://github.com/deedy5/primp/blob/main/README.md)

arch manylinux(glibc)
x86_64 2.28
aarch64 2.34

So PRIMP can only be used in Amazon Linux 2023

Unfortunately I have no control over the image, so I'll need to explore another workaround or package. Thanks for the info

You can still use v0.5.5 with verify=False

@tabrezm v0.6.1 is compatible with Amazon Linux 2 amd64 image

Awesome, confirmed working. Thanks so much for making the change!