question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

PyPI tarball missing required files

See original GitHub issue

Describe the bug

The tarball uploaded to PyPI does not contain requirements/* files which are required to run the setup.py file.

Reproduction steps

$ wget https://files.pythonhosted.org/packages/source/k/kornia/kornia-0.6.0.tar.gz
$ tar zxf kornia-0.6.0.tar.gz
$ cd kornia-0.6.0
$ python setup.py install
...
Traceback (most recent call last):
  File "setup.py", line 43, in <module>
    "x": load_requirements("requirements/x.txt"),
  File "setup.py", line 38, in load_requirements
    with open(filename) as f:
FileNotFoundError: [Errno 2] No such file or directory: 'requirements/x.txt'

Expected behavior

I would expect the setup.py to function correctly. I believe there’s a setuptools option to control which files get included in the upload tarball.

Environment

- PyTorch Version (e.g., 1.0): 1.10
- OS (e.g., Linux): macOS
- How you installed PyTorch (`conda`, `pip`, source): `spack`
- Build command you used (if compiling from source): `python setup.py install`
- Python version: 3.8.11
- CUDA/cuDNN version: N/A
- GPU models and configuration: N/A
- Any other relevant information: N/A

Additional context

No response

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
edgarribacommented, Oct 22, 2021

ok - seems that package_data is what we want here

0reactions
edgarribacommented, Oct 22, 2021

Seems that it works with data_files=[('', ['requirements/x.txt'])], – but not e.g with data_files=[('', ['requirements/*.txt'])],

Still with the issue of getting the test files in.

Read more comments on GitHub >

github_iconTop Results From Across the Web

requirements.txt file for my package missing from PyPI install ...
When I manually download the tarball file from https://github.com/<username>/<mypackage>/archive/0.1.tar.gz I find that all the files are there.
Read more >
Missing "requirements.txt" in PyPI package · Issue #10 - GitHub
Describe the bug The PyPI package of NCBImeta is missing the "requirements.txt" file, causing installation to fail. I am using virtualenv.
Read more >
Missing - PyPI
Missing. Missing provides special objects used in some Zope internals like the ZCatalog. Changelog. 4.2 (2022-11-16). Add support for Python 3.8, 3.9, 3.10, ......
Read more >
How to use pip install with local tar.gz source file? - Packaging
You should be testing installation of your package inside a virtualenv. That way, when you need to try again, you can just delete...
Read more >
Packaging and Distributing Your Python Project to PyPI for ...
For our simple example, the minimal files required will be used which ... become impossible to use the Python code because it will...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found