-
Notifications
You must be signed in to change notification settings - Fork 121
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
Error building source distributions when the filename does not match archive name #607
Comments
What do I have to do to reproduce this? I cloned github3.py's main branch and ran build on it and it seems to work fine. |
Right, I needed to disable |
I'm inclined to close this as won't fix. build follows PEP 625, which says that:
|
I think a frontend doing anything but invoking the backend is out of scope. It should be up to the backend what to name the file and wouldn't put any extra maintenance burden here as far as I can tell. Do you know exactly why this error is happening? Is the source distribution being extracted and the inner directory is trying to be located to build the wheel based on the original filename? |
Pretty much; build calls |
I think it would make sense to fix it here because building the source distribution separately from the wheel does indeed work properly |
If you don't think so then I will fix in Hatchling today, just let me know! |
But what is build expected to do if |
I don't know how significant this is, but $ python -mbuild
* Creating virtualenv isolated environment...
* Installing packages in isolated environment... (hatchling)
* Getting build dependencies for sdist...
* Building sdist...
ERROR Source /var/folders/tc/mhq0tfws3s1bs5788hx6nhkc0000gn/T/build-via-sdist-6wbzvh9r/github3.py-3.2.0 is not a directory
$ python -mbuild -s
* Creating virtualenv isolated environment...
* Installing packages in isolated environment... (hatchling)
* Getting build dependencies for sdist...
* Building sdist...
Successfully built github3.py-3.2.0.tar.gz edit Ah, I see @ofek already called this out. |
Yes I think
That would never happen, or at least that wouldn't be a source distribution |
Twine also handles archive component names in an agnostic way: |
Sdists are not particularly well defined - I'm not sure that having multiple folders is disallowed, or that it would be any less surprising than the top-level folder having a different name from the archive itself. I'd suggest applying the principle of least surprise here - keeping the outer and inner names the same if there's no good reason that they should differ. PEP 517 does also mention that: "[the sdist format] is mostly undefined, but basically comes down to: a file named |
pypa/hatch#833 (comment)
I think the filename should not be taken into account.
The text was updated successfully, but these errors were encountered: