[Bug 2002051] Re: Utilize setuptools for building, fix the metadata and migrate them into `pyproject.toml`
KOLANICH
2002051 at bugs.launchpad.net
Fri Jan 6 09:35:21 UTC 2023
** Summary changed:
- Utilize setuptools for building, fix the metadata and migrate themminto `pyproject.toml`
+ Utilize setuptools for building, fix the metadata and migrate them into `pyproject.toml`
** Description changed:
This package currently uses some packaging practices considered obsolete:
- 1. it uses distutils, which [is deprecated](https://peps.python.org/pep-0632/) support is being dropped.
+ 1. it uses distutils, which [is deprecated](https://peps.python.org/pep-0632/), which support is in process of being dropped from tools.
2. it uses `scripts` keyword argument. It is legacy having some drawbacks. it's better to migrate to modern entry-point based mechanism (that uses `scripts` and `gui-scripts` args in `pyproject.toml`).
3. It stores metadata in `setup.py`, which is not guaranteedly machine-readable. While I have code in my tools capable extracting the metadata stored this way, in a long run I'm going to extract it out of the main package and then drop support of that feature.
So it is proposed to do the following, in this order:
1. use `setuptools` instead of `dustutils`
2. rewrite the code from `scripts` to `entry_points`
3. move all the metadata into `setup.cfg` using [`setuptools_py2cfg` tool](https://github.com/gvalkov/setuptools-py2cfg). Remove the metadata from `setup.py`.
4. use `ini2toml` tool to convert that `setup.cfg` into `pyproject.toml`
5. start using `python3 -m build` for building a wheel. Unpack the built wheel to make the binary package using `installer` package.
6. move the code related to processing of i18n files into the Makefile. Delete `setup.py`.
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to usb-creator in Ubuntu.
https://bugs.launchpad.net/bugs/2002051
Title:
Utilize setuptools for building, fix the metadata and migrate them
into `pyproject.toml`
Status in usb-creator package in Ubuntu:
New
Bug description:
This package currently uses some packaging practices considered obsolete:
1. it uses distutils, which [is deprecated](https://peps.python.org/pep-0632/), which support is in process of being dropped from tools.
2. it uses `scripts` keyword argument. It is legacy having some drawbacks. it's better to migrate to modern entry-point based mechanism (that uses `scripts` and `gui-scripts` args in `pyproject.toml`).
3. It stores metadata in `setup.py`, which is not guaranteedly machine-readable. While I have code in my tools capable extracting the metadata stored this way, in a long run I'm going to extract it out of the main package and then drop support of that feature.
So it is proposed to do the following, in this order:
1. use `setuptools` instead of `dustutils`
2. rewrite the code from `scripts` to `entry_points`
3. move all the metadata into `setup.cfg` using [`setuptools_py2cfg` tool](https://github.com/gvalkov/setuptools-py2cfg). Remove the metadata from `setup.py`.
4. use `ini2toml` tool to convert that `setup.cfg` into `pyproject.toml`
5. start using `python3 -m build` for building a wheel. Unpack the built wheel to make the binary package using `installer` package.
6. move the code related to processing of i18n files into the Makefile. Delete `setup.py`.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/usb-creator/+bug/2002051/+subscriptions
More information about the foundations-bugs
mailing list