From: Günter M. <mi...@us...> - 2022-01-14 13:57:03
|
The attached 2 patches based on https://github.com/AA-Turner/docutils/pull/6 move docutils-cli.py into the package, change it to an entry-point provider (currently only main()==docutils-cli) and add two scripts: docutils/__main__.py allows `python -m docutils`, a new docutils-cli.py provides backwards compatibility. Differences from the pull/6 approach include * No leading underscores to keep the code consistent with the remaining package. * Single quotes (as mandated by the Docutils coding policy) except for ``"""```. * Inlining of `config_settings_from_files()`. * Function name main() and optional arguments for fallback values. Not yet done is the addition of entry-point functions for the other tools that a modernised build system will no longer copy. After that, the front-end tools will no longer be an obstacle to get rid of setup.py. Feedback welcome. Attachments: - [0001-New-module-for-entry-points-to-the-Docutils-Publishe.patch](https://sourceforge.net/p/docutils/patches/_discuss/thread/e3c9702768/cb5f/attachment/0001-New-module-for-entry-points-to-the-Docutils-Publishe.patch) (635 Bytes; text/x-patch) - [0002-New-module-for-entry-points-to-the-Docutils-Publishe.patch](https://sourceforge.net/p/docutils/patches/_discuss/thread/e3c9702768/cb5f/attachment/0002-New-module-for-entry-points-to-the-Docutils-Publishe.patch) (8.5 kB; text/x-patch) --- ** [patches:#186] Modernise packaging** **Status:** open **Group:** None **Created:** Fri Dec 31, 2021 03:16 AM UTC by Adam Turner **Last Updated:** Thu Jan 06, 2022 10:14 PM UTC **Owner:** nobody **Attachments:** - [0001-Use-flit-and-pyproject.toml.patch](https://sourceforge.net/p/docutils/patches/186/attachment/0001-Use-flit-and-pyproject.toml.patch) (12.2 kB; application/octet-stream) - [0002-Use-entry-points.patch](https://sourceforge.net/p/docutils/patches/186/attachment/0002-Use-entry-points.patch) (20.7 kB; application/octet-stream) - [0003-update-docs-etc-after-packaging-changes.patch](https://sourceforge.net/p/docutils/patches/186/attachment/0003-update-docs-etc-after-packaging-changes.patch) (49.3 kB; application/octet-stream) Hi, I had a go at modernising the packaging stack. `setup.py` based invocations have been deprecated (https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html), and setuptools may remove them in the future. This takes the opportunity to move to a PEP 621 based declarative config, and also fixes a longstanding TODO item about providing script wappers for the frontend tools on windows, by migrating them to entry points. I've updated install and development docs with the new guidance, and updated references to the frontend tools to remove `.py`, given they are now installed as proper scripts. Hope this is appreciated -- happy to make revisions etc to help getting this merged. A --- Sent from sourceforge.net because doc...@li... is subscribed to https://sourceforge.net/p/docutils/patches/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/docutils/admin/patches/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |