Skip to content

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

@atalman

Description

@atalman

🐛 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    module: binariesAnything related to official binaries that we release to userstopic: binariestriagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate module

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions