Security News
PyPI’s New Archival Feature Closes a Major Security Gap
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
distutils-extra-python
Advanced tools
distutils-extra can be used with python's distutils or the enhanced setuptools.
To make use of the distutils extenstions, you have to import the corresponding methods at the beginning of your setup.py:
.. code:: python
from DistUtilsExtra.command import *
Furthermore you have to map the methods to the extended ones:
.. code:: python
cmdclass = { "build" : build_extra.build_extra, "build_i18n" : build_i18n.build_i18n }
If you have replaced the default build command by build_extra and defined the other commands e.g. build_i18n, the sub commands e.g. will be called automatically. There is no need to enable them in the setup.cfg anymore (This was require in a previous version). Disabling imported commands in the setup.cfg is still possible:
.. code:: bash
[build] i18n=False
See the setup.cfg.example for a more complex layout.
Currently there are the following extensions available:
.. code:: bash
build_extra: initiates the extensions build_i18n: provides gettext integration build_icons: installs icons build_help: installs a docbook based documentation
Just enable the corresponding build target in the setup.cfg:
.. code:: bash
[build] i18n=True help=True icons=True
No further imports or modifications are required.
I hope that this code could help you to make your live easier,
This module provides a setup() method for distutils and DistUtilsExtra which infers as many setup() arguments as possible. The idea is that your setup.py only needs to have the metadata and some tweaks for unusual files/paths, in a "convention over configuration" paradigm.
This currently supports:
.. code:: bash
- Python modules (./*.py, only in root directory)
- Python packages (all directories with __init__.py)
- GtkBuilder (*.ui)
- Qt4 user interfaces (*.ui)
- D-Bus (*.conf and *.service)
- PolicyKit (*.policy.in)
- Desktop files (*.desktop.in)
- KDE4 notifications (*.notifyrc.in)
- scripts (all in bin/, and ./<projectname>
- Auxiliary data files (in data/*)
- automatic po/POTFILES.in (with all source files which contain _())
- automatic MANIFEST (everything except swap and backup files, *.pyc, and revision control)
- manpages (*.[0-9])
- files which should go into /etc (./etc/*, copied verbatim)
- determining "requires" from import statements in source code
- determining "provides" from shipped packages and modules
If you follow above conventions, then you don't need any po/POTFILES.in, ./setup.cfg or ./MANIFEST.in, and just need the project metadata (name, author, license, etc.) in ./setup.py.
Author: Henry Fuheng Wu, Sebastian Heinlein, Martin Pitt
FAQs
Add support for i18n, documentation and icons to distutils
We found that distutils-extra-python demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
Research
Security News
Malicious npm package postcss-optimizer delivers BeaverTail malware, targeting developer systems; similarities to past campaigns suggest a North Korean connection.
Security News
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.