-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Modernize setuptools to use pyproject.toml #2519
Conversation
This is inline with the recommendations in Python Packaging User Guide at https://packaging.python.org/en/latest/guides/modernize-setup-py-project/ Migration to the new format should not change any build steps since the newer build invokations are already being used (e.g., "python -m build"). `requirements.txt` is left as-is and read as "dynamic" data (i.e., outside of the `pyproject.toml` file) by setuptools. A further enhancement may be to separate out the production requirements from the development environment requirements if any exist. `zip_safe` directive is removed since it is deprecated (See https://setuptools.pypa.io/en/latest/deprecated/zip_safe.html). `scripts` is also deprecated in favor of `entry_points` which is now under `[projects.scripts]` in the same format. This means the `changedetection.py` file is not included, but it appears to be intended for local development as the `changedetection.io` script created during installation from `entry_points` has the same function. `include_package_data` is true by default in `pyproject.toml` format, so it is excluded from the new file. The changes were verified to build the same `.whl` and `.tar.gz` by examining the artifacts. The exceptions are: * In the `.whl` file there is no longer `changedetection.py` in the `scripts` directory. * `zip_safe` is no longer included * `pyproject.toml` is now included * In `PKG-INFO`: * `Home-page` field is now in `Project-URL` * Additional Classifier for `Apache License 2.0` * `Keywords` are now keywords instead of a long string
I'm opening pull requests for random things because I was trying to test my change to the JavaScript sent to Playwright and found the testing instructions difficult to follow. I'm going to try to port the test infrastructure to use testcontainers-python which should allow anyone (including CI systems) to simply run "pytest" and have it start up the containers it needs. Hopefully it will also make it easier to understand how to set up the correct environment on new tests. |
thanks so much for this, I have to admit my python skills in general arent so great :) so this helps a lot! |
ok interesting, lets do that on another PR and i'll take a look |
Co-authored-by: dgtlmoon <[email protected]>
This allows us to use multiple license files until PEP 639 is implemented in setuptools.
@dgtlmoon sorry, I forgot to push my change for the license files a few months ago! |
This is inline with the recommendations in Python Packaging User Guide. Migration to the new format should not change any build steps since the newer build invocations are already being used (e.g.,
python -m build
).requirements.txt
is left as-is and read as "dynamic" data (i.e., outside of thepyproject.toml
file) by setuptools. A further enhancement may be to separate out the production requirements from the development environment requirements if any exist.zip_safe
directive is removed since it is deprecated.scripts
is also deprecated in favor ofentry_points
which is now under[projects.scripts]
in the same format. This means thechangedetection.py
file is not included, but it appears to be intended for local development as thechangedetection.io
script created during installation fromentry_points
has the same function.include_package_data
is true by default inpyproject.toml
format, so it is excluded from the new file.The changes were verified to build the same
.whl
and.tar.gz
by examining the artifacts. The exceptions are:.whl
file there is no longerchangedetection.py
in thescripts
directory.zip_safe
is no longer includedpyproject.toml
is now includedPKG-INFO
:Home-page
field is now inProject-URL
Apache License 2.0
Keywords
are now keywords instead of a long string