Files
ROCm/python
Xuehai Pan c52219b5c3 [SETUP] avoid using deprecated distutils (#1400)
Module [`distutils`](https://docs.python.org/3/library/distutils.html)
is deprecated and will be removed in Python 3.12.

Ref:

- `distutils` documentation:

> ##
[distutils](https://docs.python.org/3/library/distutils.html#module-distutils)
— Building and installing Python modules
>
[distutils](https://docs.python.org/3/library/distutils.html#module-distutils)
is deprecated with removal planned for Python 3.12.

- PEP 632 – Deprecate distutils module:

> [PEP 632 – Deprecate distutils
module](https://peps.python.org/pep-0632)

------

This PR removes references to `distutils` and replaces them with
[`packaging`](https://pypi.org/project/packaging) and[
`sysconfig`](https://docs.python.org/3/library/sysconfig.html).
Alleviate potential breakage in the modern Python packaging system.

Changes:

- Removes references to `distutils` and replaces them with
[`packaging`](https://pypi.org/project/packaging) and[
`sysconfig`](https://docs.python.org/3/library/sysconfig.html)
- Add `cmake` and `package` in `build-system.requires` to install
necessary build dependencies prior to calling `setup.py`.
- Minor changes: `multiprocessing.cpu_count() -> os.cpu_count()` and add
PyPI classifiers.

---------

Co-authored-by: Philippe Tillet <phil@openai.com>
2023-03-27 10:37:47 -07:00
..