10000 [release] Make pytorch source distribution package respect pep-0517 · Issue #150461 · pytorch/pytorch · GitHub
[go: up one dir, main page]

Skip to content

[release] Make pytorch source distribution package respect pep-0517 #150461

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

Open
atalman opened this issue Apr 1, 2025 · 2 comments
Open

[release] Make pytorch source distribution package respect pep-0517 #150461

atalman opened this issue Apr 1, 2025 · 2 comments
Labels
module: binaries Anything related to official binaries that we release to users topic: binaries triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module
Milestone

Comments

@atalman
Copy link
Contributor
atalman commented Apr 1, 2025

🐛 Describe the bug

I would like to make modifications to Source Distribution package to respect https://peps.python.org/pep-0517/
Our source packaging was initially introduced by #63022
and have not changed since then.

I would like to modify create-release yml to build sdist respecting PEP 0517:
https://github.com/pytorch/pytorch/blob/main/.github/workflows/create_release.yml#L68

PyPi documentation on generating sdist:
https://packaging.python.org/en/latest/tutorials/packaging-projects/#generating-distribution-archives

Currently if one tries to install the tar.gz file used in the release, we get something like this:

pip install pytorch-v2.6.0.tar.gz
Processing ./pytorch-v2.6.0.tar.gz
ERROR: Exception:
Traceback (most recent call last):
  File "/Users/atalman/miniconda3/lib/python3.9/tarfile.py", line 2617, in next
    tarinfo = self.tarinfo.fromtarfile(self)
  File "/Users/atalman/miniconda3/lib/python3.9/tarfile.py", line 1295, in fromtarfile
    obj = cls.frombuf(buf, tarfile.encoding, tarfile.errors)
  File "/Users/atalman/miniconda3/lib/python3.9/tarfile.py", line 1231, in frombuf
    raise EmptyHeaderError("empty header")
tarfile.EmptyHeaderError: empty header

Versions

2.8.0

cc @seemethere @malfet @osalpekar

@atalman atalman added module: binaries Anything related to official binaries that we release to users topic: binaries labels Apr 1, 2025
@clee2000 clee2000 added this to the 2.8.0 milestone Apr 1, 2025
@clee2000 clee2000 moved this to Cold Storage in PyTorch OSS Dev Infra Apr 1, 2025
@zou3519 zou3519 added the triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module label Apr 2, 2025
@atalman atalman moved this to Cold Storage in PyTorch OSS Release Engineering Apr 7, 2025
@atalman
Copy link
Contributor Author
atalman commented Apr 25, 2025

After discussion with @albanD and @malfet we probably want to release sdist in addition to the current source tar.gz file

@albanD
Copy link
Collaborator
albanD commented Apr 26, 2025

That sounds ok to me.
I don't think we should publish these sdist on PyPi though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module: binaries Anything related to official binaries that we release to users topic: binaries triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module
Projects
Status: Cold Storage
Status: Cold Storage
Development

No branches or pull requests

4 participants
0