Skip to content

Add package data and data files to setup.py for requirements management #960

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sarthakpati
Copy link
Contributor

This fixes #959

Summary:

Added package_data and data_files to setup.py to ensure the sdist gets created correctly.

Test plan:

Checked using a basic build command:

(base) PS C:\Projects> git clone https://github.com/sarthakpati/tnt.git tnt_mine
[SNIP!]
(base) PS C:\Projects> cd tnt_mine
(base) PS C:\Projects\tnt_mine> conda create -p ./venv python=3.11
[SNIP!]
(base) PS C:\Projects\tnt_mine> conda activate ./venv
(C:\Projects\venv\tnt_mine) PS C:\Projects\tnt_mine> pip install build
[SNIP!]
(C:\Projects\venv\tnt_mine) PS C:\Projects\tnt_mine> git rev-parse HEAD
5e01a89e2c41f1b63e4030bc1370d33e76b37182
(C:\Projects\venv\tnt_mine) PS C:\Projects\tnt_mine> python -m build
[SNIP!]
(C:\Projects\venv\tnt_mine) PS C:\Projects\tnt_mine> cd .\dist\
(C:\Projects\venv\tnt_mine) PS C:\Projects\tnt_mine\dist> tar -xf .\torchtnt-0.2.4.tar.gz
(C:\Projects\venv\tnt_mine) PS C:\Projects\tnt_mine\dist> ls .\torchtnt-0.2.4\

    Directory: C:\Projects\tnt_mine\dist\torchtnt-0.2.4

Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
d----          2025-01-15    15:20                torchtnt
d----          2025-01-15    15:20                torchtnt.egg-info
-a---          2025-01-15    15:15             70 dev-requirements.txt
-a---          2025-01-15    15:15           1563 LICENSE
-a---          2025-01-15    15:20           3381 PKG-INFO
-a---          2025-01-15    15:15             47 pyproject.toml
-a---          2025-01-15    15:15           1820 README.md
-a---          2025-01-15    15:15            133 requirements.txt
-a---          2025-01-15    15:20             42 setup.cfg
-a---          2025-01-15    15:20           3187 setup.py

Fixes #959

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The distribution package is incomplete
2 participants