Utilize setuptools for building, fix the metadata and migrate them into `pyproject.toml`

Bug #2002051 reported by KOLANICH
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
usb-creator (Ubuntu)
New
Undecided
Unassigned

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`.

KOLANICH (kolanich)
summary: - Utilize setuptools for building, fix the metadata and migrate themminto
+ Utilize setuptools for building, fix the metadata and migrate them into
`pyproject.toml`
description: updated
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.