-
Notifications
You must be signed in to change notification settings - Fork 128
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
wheels created from requests-cache
or url-normalize
source distributions only contains metadata
#384
Comments
Nevermind, you are already doing that 😳 |
Note that if I do build a sdist ( |
There is nothing inside the tar except raw Python files? No setup.py, pyproject.toml, nothing? |
Ahh, I see the problem. You are cd'ing into the wrong folder. You need to run build from the folder that contains the extra files. |
No, that's what I'm doing, not what you are doing. Just let me shut up until I know what's going on, sorry for the spam.... |
Additionally, building a wheel/sdist from a clone of |
Is there a way to get more verbose/debug information from |
Poetry does use git to track what goes in instead of using a MANIFEST.in, so it could very well be a bug in poetry. Though, for me, it's working: $ wget -q https://files.pythonhosted.org/packages/ec/ea/780a38c99fef750897158c0afb83b979def3b379aaac28b31538d24c4e8f/url-normalize-1.4.3.tar.gz
$ tar xf url-normalize-1.4.3.tar.gz
$ cd url-normalize-1.4.3
$ pipx run build --wheel
$ unzip -l dist/url_normalize-1.4.3-py2.py3-none-any.whl
Archive: dist/url_normalize-1.4.3-py2.py3-none-any.whl
Length Date Time Name
--------- ---------- ----- ----
1060 01-01-1980 00:00 url_normalize/__init__.py
2306 01-01-1980 00:00 url_normalize/tools.py
6462 01-01-1980 00:00 url_normalize/url_normalize.py
1070 01-01-1980 00:00 url_normalize-1.4.3.dist-info/LICENSE
87 01-01-2016 00:00 url_normalize-1.4.3.dist-info/WHEEL
3193 01-01-2016 00:00 url_normalize-1.4.3.dist-info/METADATA
566 01-01-2016 00:00 url_normalize-1.4.3.dist-info/RECORD
--------- -------
14744 7 files You aren't in a git tracked directory when you are doing this, are you? That will break poetry for sure, as it will assume you are trying to track the contents of the folder you are building. |
▸ tar tvf dist/url-normalize-1.4.3.tar.gz
-rw-r--r-- 0/0 1070 2021-10-20 15:19 url-normalize-1.4.3/LICENSE
-rw-r--r-- 0/0 2136 2021-10-20 15:19 url-normalize-1.4.3/README.md
-rw-r--r-- 0/0 1234 2021-10-20 15:19 url-normalize-1.4.3/pyproject.toml
-rw-r--r-- 0/0 2888 2021-10-20 15:21 url-normalize-1.4.3/setup.py
-rw-r--r-- 0/0 3193 2021-10-20 15:21 url-normalize-1.4.3/PKG-INFO |
My dotfiles are tracked with git. Let me check if that's indeed the issue. |
Is your git repo inside another git repo? Poetry might be using the outermost repo. |
Yep, that's the issue. That's not great behavior on the part of poetry... Clearly I'm not the only one with this issue: see comments for https://aur.archlinux.org/packages/python-requests-cache and https://aur.archlinux.org/packages/python-url-normalize/. |
Possible workaround: In any case, not a |
Or
;) |
When this came up before I suggested that Poetry should disable Git detection for sdists, might be worth bringing up on their tracker. |
Damn, yes, I meant with |
Part of the problem is that build can't run directly on the SDist. Pip is running directly on the SDist, and therefore is probably expanding the SDist in a temporary directory, so that's why it's working with pip. If we supported similar behavior (#311), then this would have worked from build too. |
But |
OK, yes, pip still builds in a temporary copy located in |
What version of pip are you using? Isn't that in 21.3? |
|
Okay, if you used 21.3, I think this would affect the |
And yep, |
That's reassuring, consistency is good. :) |
Even when build is invoked with --sdist --wheel (or sans args), we're unpacking the sdist in the folder where build is invoked. pip unpacks downloaded sdists in $TMPDIR prior to building a wheel. (Edited for clarity.) |
Thanks for the explanation @henryiii @benoit-pierre @layday @alex @jezdez . I am the maintainer of both packages on AUR, trying to understand how to fix the installation for everyone, thanks for the help. |
If we support running directly on |
It can be next to the tarfile ;) |
There's a difference between "can" and "should". ;) |
* Change to use the python-{build,installer,wheel} utilities as specified in [0]. * Use python package naming convention as specified in [0]. * Fix build error from poetry when nested git directories [1]. [0]: https://wiki.archlinux.org/title/Python_package_guidelines [1]: pypa/build#384
No such issue when using
pip
:build
version: 0.7.0.The text was updated successfully, but these errors were encountered: