Modernize setuptools to use pyproject.toml
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 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.
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
.whlfile there is no longerchangedetection.pyin thescriptsdirectory. zip_safeis no longer includedpyproject.tomlis now included- In
PKG-INFO:Home-pagefield is now inProject-URL- Additional Classifier for
Apache License 2.0 Keywordsare 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!
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.
ok interesting, lets do that on another PR and i'll take a look
@dgtlmoon sorry, I forgot to push my change for the license files a few months ago!