Activity log for bug #2002051

Date Who What changed Old value New value Message
2023-01-05 23:58:45 KOLANICH bug added bug
2023-01-06 09:35:21 KOLANICH summary 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`
2023-01-06 09:37:38 KOLANICH description 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. 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`. 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`.