SomeRandomPhysicist
SomeRandomPhysicist

Reputation: 1599

requirements.txt file for my package missing from PyPI install and tarball

I followed the instructions from http://peterdowns.com/posts/first-time-with-pypi.html in order to add my github hosted python package to PyPI. However when I try to pip install it and it runs my setup.py I get that the requirements.txt file is missing. 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. However when I click the download link on the PyPI page for my package it downloads a .tar.gz archive which only contains the python files, the config file and a PKG-INFO file it appears to have created.

The other files are all gone, why is this and how might I fix it?

Upvotes: 4

Views: 8251

Answers (1)

anthony sottile
anthony sottile

Reputation: 69934

setuptools by default chooses which files to include automatically based on your modules added -- by default this generally just means your python files and __init__.py files.

To specify other files that need to be included in your source distribution, you can add a MANIFEST.in file to graft additional files into your source distribution.

An example one which includes requirements.txt:

include requirements.txt

These can be come sufficiently more complicated

To find all the things that MANIFEST.in supports, you can read its documentation here.

Upvotes: 8

Related Questions