python-poetry/poetry

Poetry Dependency Specification: platform manylinux2014_x86_64 not supported

joeyhage opened this issue · 5 comments

Description

Installing packages with platform option ignores manylinux2014_x86_64 and similar such as manylinux_2_17_x86_64. It instead installs manylinux_2_28_x86_64 which is supported by my system but not AWS lambda where I am trying to deploy.

I couldn’t find any documentation stating that manylinux* platforms are or aren’t supported by poetry and I couldn’t find any other GitHub issues related to this.

This AWS article explains the pip command needed for this to work: https://repost.aws/knowledge-center/lambda-python-package-compatible

Workarounds

Using pip.

pip install --platform manylinux2014_x86_64 --only-binary=:all: cryptography

Poetry Installation Method

pipx

Operating System

Debian 11

Poetry Version

1.8.3

Poetry Configuration

cache-dir = "/home/joeyhage/.cache/pypoetry"
experimental.system-git-client = false
installer.max-workers = null
installer.modern-installation = true
installer.no-binary = null
installer.parallel = true
keyring.enabled = true
solver.lazy-wheel = true
virtualenvs.create = true
virtualenvs.in-project = true
virtualenvs.options.always-copy = false
virtualenvs.options.no-pip = false
virtualenvs.options.no-setuptools = false
virtualenvs.options.system-site-packages = false
virtualenvs.path = "{cache-dir}/virtualenvs"  # /home/joeyhage/.cache/pypoetry/virtualenvs
virtualenvs.prefer-active-python = true
virtualenvs.prompt = "{project_name}-py{python_version}"
warnings.export = true

Python Sysconfig

No response

Example pyproject.toml

[tool.poetry]
name = "test"
version = "0.1.0"
description = ""
authors = ["..."]
readme = "README.md"

[tool.poetry.dependencies]
python = "~3.11"
cryptography = {version="42.0.7", platform="manylinux2014_x86_64"

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"

Poetry Runtime Logs

No failure, just unexpected results. Even with poetry install -vvv, it only outputs the wheels it skips not the one it installed. Upon deploying to AWS and attempting to invoke the lambda function, it fails at runtime because glibc 2.28 is not supported.

`cat .venv/lib/python3.11/site-packages/cryptography-42.0.7.dist-info/WHEEL`

Results in:
`
...
Tag: cp39-abi3-manylinux_2_28_x86_64
`

With pip, `pip install —-target . --platform manylinux2014_x86_64 --only-binary=:all: cryptography`

Results in:
`
...
Tag: cp39-abi3-manylinux_2_17_x86_64
Tag: cp39-abi3-manylinux2014_x86_64
`

platform="manylinux2014_x86_64"

this will never be satisfied, the platform marker corresponds to values of sys.platform()

@dimbleby poetry markers (sys_platform) are different from platform I thought? You’re referring to an environment marker (pep-508) and I’m referring to platform tags (pep-513).

Looks like pep-513 was superseded by pep-600. Either way, is poetry add --platform used for constraints or environment markers? I couldn’t find anything clear in the docs. I think it’s a fair assumption that it would work similar to the pip --platform option.

One more thing, I tried using the url option in my pyproject.toml file but the url option does not appear to work for urls that require basic auth (privately hosted PyPi mirrors).

I think it’s a fair assumption ...

It is a wrong assumption. Please close.