m-lundberg / simple-pid

A simple and easy to use PID controller in Python
MIT License
801 stars 217 forks source link

Use MANIFEST.in for all needed files in PyPI sdist #31

Closed mrakitin closed 3 years ago

mrakitin commented 3 years ago

Hi @m-lundberg! I am attempting to package this project with conda via https://github.com/nsls-ii-forge/simple-pid-feedstock/pull/1, however I noticed there are missing files in the source distribution archive uploaded to PyPI (such as .pyi and other files). I think it's important to fix it, and this PR is attempting to do it.

Comparison

Preparation steps:

$ conda create -n test-env python=3.9 -y
$ conda activate test-env
$ git clone https://github.com/m-lundberg/simple-pid.git
$ cd simple-pid/
$ git remote add mrakitin https://github.com/mrakitin/simple-pid
$ git fetch mrakitin

Before:

$ python setup.py sdist
$ cd dist/
$ tar -xvf simple-pid-0.2.4.tar.gz
$ tree simple-pid-0.2.4
simple-pid-0.2.4
├── PKG-INFO
├── README.md
├── setup.cfg
├── setup.py
├── simple_pid
│   ├── PID.py
│   └── __init__.py
└── simple_pid.egg-info
    ├── PKG-INFO
    ├── SOURCES.txt
    ├── dependency_links.txt
    ├── not-zip-safe
    ├── requires.txt
    └── top_level.txt

2 directories, 12 files

After the fix:

$ cd ..
$ git clean -dfx
$ git checkout add-manifest
$ python setup.py sdist
$ cd dist/
$ tar -xvf simple-pid-0.2.4.tar.gz
$ tree simple-pid-0.2.4
simple-pid-0.2.4
├── CHANGELOG.md
├── LICENSE.md
├── MANIFEST.in
├── PKG-INFO
├── README.md
├── docs
│   ├── Makefile
│   ├── requirements.txt
│   └── source
│       ├── conf.py
│       ├── index.rst
│       └── simple_pid.rst
├── examples
│   └── water_boiler
│       ├── README.md
│       ├── requirements.txt
│       └── water_boiler.py
├── setup.cfg
├── setup.py
├── simple_pid
│   ├── PID.py
│   ├── PID.pyi
│   ├── __init__.py
│   └── py.typed
└── simple_pid.egg-info
    ├── PKG-INFO
    ├── SOURCES.txt
    ├── dependency_links.txt
    ├── not-zip-safe
    ├── requires.txt
    └── top_level.txt

6 directories, 25 files
gonzalo-bulnes commented 3 years ago

Hi @gonzalo-bulnes! I am attempting to [...]

Hi @mrakitin! Did you mention me intentionally or did you mean to mention @m-lundberg? 🙂

mrakitin commented 3 years ago

I am sorry, @gonzalo-bulnes, I indeed meant @m-lundberg. Not sure how it happened. I corrected the PR body.

mrakitin commented 3 years ago

@m-lundberg, thank you for accepting the fix!