Different git links when installing from tar.gz vs whl
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- python
- Domain
- build-system, tooling
Research direction
Start with the pyproject.toml dependency definition and the metadata produced by poetry build for the tar.gz and whl artifacts. Compare how the git dependency's subdirectory and branch information are serialized, then reproduce installation from both artifacts with pip. Done means the wheel no longer adds @master to the subdirectory URL and installs the dependency successfully.
Written by the indexing model from the issue text.
Description
- I have searched the issues of this repo and believe that this is not a duplicate.
- I have searched the documentation and believe that my question is not covered.
Issue
This builds off of #4380. I wanted to add a dependency that was a git link rooted in a subfolder. To do this, as discussed in #4567, I used poetry-core from master since I needed python-poetry/poetry-core#192.
Relevant lines in pyproject.toml:
[build-system]
requires = ["poetry-core @ git+https://github.com/python-poetry/poetry-core.git"]
build-backend = "poetry.core.masonry.api"
[tool.poetry.dependencies]
python = ">=3.7.1,<4.0"
pycocotools = {git = "https://github.com/ashnair1/cocoapi.git#egg=pycocotools&subdirectory=PythonAPI"}
This works for installing the package from source and from tar.gz file but not from whl and the only difference seems to be a branch tag added at the end of the git link while installing from whl. I've attached the relevant lines below
The tar.gz and whl files were created via poetry build
- From tar.gz
Collecting pycocotools@ git+https://github.com/ashnair1/cocoapi.git#egg=pycocotools&subdirectory=PythonAPI
Cloning https://github.com/ashnair1/cocoapi.git to /tmp/pip-install-ylghq7w3/pycocotools_04a986d205554860a5a783224ef1f8d8
Running command git clone --filter=blob:none -q https://github.com/ashnair1/cocoapi.git /tmp/pip-install-ylghq7w3/pycocotools_04a986d205554860a5a783224ef1f8d8
Resolved https://github.com/ashnair1/cocoapi.git to commit 2ab05524360647addb03d0d347288cda2b41b392
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
- From whl
Collecting pycocotools@ git+https://github.com/ashnair1/cocoapi.git#egg=pycocotools&subdirectory=PythonAPI@master
Cloning https://github.com/ashnair1/cocoapi.git to /tmp/pip-install-z7v4apwo/pycocotools_16adbb699d6243728216a980f2c8a477
Running command git clone --filter=blob:none -q https://github.com/ashnair1/cocoapi.git /tmp/pip-install-z7v4apwo/pycocotools_16adbb699d6243728216a980f2c8a477
Resolved https://github.com/ashnair1/cocoapi.git to commit 2ab05524360647addb03d0d347288cda2b41b392
ERROR: pycocotools@ git+https://github.com/ashnair1/cocoapi.git#egg=pycocotools&subdirectory=PythonAPI@master from git+https://github.com/ashnair1/cocoapi.git#egg=pycocotools&subdirectory=PythonAPI@master (from coco-assistant==0.4.0) does not appear to be a Python project: neither 'setup.py' nor 'pyproject.toml' found.
As you can see while installing from tar.gz there is no branch tag (@master)
Collecting pycocotools@ git+https://github.com/ashnair1/cocoapi.git#egg=pycocotools&subdirectory=PythonAPI
whereas while installing from whl there is
Collecting pycocotools@ git+https://github.com/ashnair1/cocoapi.git#egg=pycocotools&subdirectory=PythonAPI@master
So my question is whether it is possible to not have the @master tag while installing from whl? (assuming this is the cause of the error)
- Dominant language
- Python
- Stars
- 34.3k
- Forks
- 2.5k
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 30
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from python-poetry/poetry
-
kind/bug status/triage
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
python-poetry/poetry#10625 · 7 comments ·
-
kind/bug status/external-issue
Difficulty 4/5 3-5 days Newbie friendliness 48/100
python-poetry/poetry#11048 · 2 comments · 1 reaction ·
-
Allow appending caller-supplied data to the User-Agent (pip's PIP_USER_AGENT_USER_DATA equivalent) Openkind/feature status/triage
Difficulty 4/5 3-5 days Newbie friendliness 48/100
python-poetry/poetry#11012 · 1 comment ·
-
2.5.0 Release Openkind/release
Difficulty 4/5 3-5 days Newbie friendliness 25/100
python-poetry/poetry#10995 · 1 reaction ·
-
kind/bug status/triage
Difficulty 4/5 3-5 days Newbie friendliness 72/100
python-poetry/poetry#10991 · 1 comment ·
All issues in python-poetry/poetry
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
bancolombia/sentinel#23 ·
-
test md OpenCI
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·
-
bug client
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100