CivicTechTO / ttc_subway_times

A scraper to grab and publish TTC subway arrival times.
GNU General Public License v3.0
40 stars 30 forks source link

make sure to include the requirements files when creating the distribution #42

Closed perobertson closed 5 years ago

perobertson commented 5 years ago

By default when a package distribution is created it only includes python files that you specify in packages. find_packages() only selects the ttc_api_scraper.py file. The requirements files are considered data files so we also want to include them.

https://docs.python.org/3.7/distutils/setupscript.html#installing-additional-files

To verify this works: Watch builds on CI pass or you can manually verify by:

  1. python setup.py sdist - This creates the distributable
  2. Look in the dist directory and you will see a ttc_api_scraper-0.3.tar.gz file. In this archive there will be a directory called ttc_api_scraper-0.3 with the 2 requirements files.

This is needed so that the python setup.py install command is able to run the setup script, read the requirements, and then install the dependencies before installing this project into the local python path.