You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched the issue tracker and believe that this is not a duplicate.
Steps to reproduce
Create the following pyproject.toml:
[tool.pdm]
[[tool.pdm.source]]
name = "pypi"
url = "http://localhost:8080/simple" # in practise the url is for private repo on another computer
verify_ssl = false
[project]
dependencies = [
"multidict"
]
requires-python = ">=3.7"
The private repo contains the following versions of multidict (copied from pypi.org):
multidict-4.7.6-cp37-cp37m-manylinux1_x86_64.whl
multidict-4.7.6-cp38-cp38-manylinux1_x86_64.whl
multidict-4.7.6.tar.gz
multidict-5.0.0-cp38-cp38-macosx_10_14_x86_64.whl
plus some older irrelevant versions. Note: You can use the package pypiserver to create a local server for reproducing the issue: pypi-server run --disable-fallback -p 8080 <path_to_dir_with_the_packages>/
Run pdm lock, the lock file would something look like:
Obviously when running pdm sync -vv the sync fails with the following error:
unearth.evaluator: Skipping link <Link http://localhost:8080/packages/multidict-5.0.0-cp38-cp38-macosx_10_14_x86_64.whl (from None)>: none of the wheel tags(cp38-cp38-macosx_10_14_x86_64) are compatible
X Install multidict 5.0.0 failed
It's rather abnormal to have incomplete releases like that. PDM assumes every release has all the required wheels and at least a sdist to fallback to. So it performs the resolution without regarding the current platform and produces a cross-platform lockfile.
In the next version this can be resolved by generating a non-cross-platform lockfile with an option.
Steps to reproduce
Create the following pyproject.toml:
The private repo contains the following versions of multidict (copied from pypi.org):
plus some older irrelevant versions.
Note: You can use the package
pypiserver
to create a local server for reproducing the issue:pypi-server run --disable-fallback -p 8080 <path_to_dir_with_the_packages>/
Run
pdm lock
, the lock file would something look like:Run
pdm sync -vv
.Actual behavior
Obviously when running
pdm sync -vv
the sync fails with the following error:Expected behavior
The lock file should look something like:
So the package will be installable for python ">=3.7" as required
Environment Information
The text was updated successfully, but these errors were encountered: