1
0
mirror of https://gitlab.com/libvirt/libvirt-python.git synced 2024-10-26 07:55:06 +03:00

Move declarative stuff out of setup.py to setup.cfg

So, why using setup.cfg if pyproject.toml is the new best thing
recommended everywhere? Well, quite a few of the fields we use with
setuptools are setuptools-specific and haven't been introduced as
keywords to pyproject.toml yet. There is a chance that these fields
could be added via a dedicated 'tool.setuptools' TOML section, but none
of it is officially documented and so it would be BETA at best anyway.
Let's not try our luck and use a declarative config file tailored
specifically to setuptools - setup.cfg. It's also unlikely we'd switch
from setuptools to something else in the near future given the nature
of building this project (i.e. building with C modules) and if so, it
would likely not be a PyPa recommended PEP-517 compliant build
system anyway, e.g. meson, so we're totally fine doing this.

Signed-off-by: Erik Skultety <eskultet@redhat.com>
This commit is contained in:
Erik Skultety 2023-06-06 14:01:57 +02:00
parent 68c9acbd3a
commit 8c3eb73631
2 changed files with 33 additions and 30 deletions

20
setup.cfg Normal file
View File

@ -0,0 +1,20 @@
[metadata]
name = libvirt-python
version = 9.5.0
description = The libvirt virtualization API python binding
long_description = file: README
long_description_content_type = text/x-rst
url = http://www.libvirt.org
maintainer = Libvirt Maintainers
maintainer_email = libvir-list@redhat.com
license_files = COPYING
classifiers =
Development Status :: 5 - Production/Stable
Intended Audience :: Developers
License :: OSI Approved :: GNU Lesser General Public License v2 or later (LGPLv2+)
Programming Language :: Python :: 3 :: Only
[options]
python_requires = >=3.6
package_dir =
=build

View File

@ -361,34 +361,17 @@ check_pkgcfg()
_c_modules, _py_modules = get_module_lists()
setup(name="libvirt-python",
version="9.5.0",
url="http://www.libvirt.org",
maintainer="Libvirt Maintainers",
maintainer_email="libvir-list@redhat.com",
description="The libvirt virtualization API python binding",
long_description=
"""The libvirt-python package provides a module that permits applications
written in the Python 3.x programming language to call the interface
supplied by the libvirt library, to manage the virtualization capabilities
of recent versions of Linux (and other OSes).""",
license="LGPLv2+",
ext_modules=_c_modules,
py_modules=_py_modules,
package_dir={
"": "build"
},
cmdclass={
"build_ext": my_build_ext,
"build_py": my_build_py,
"clean": my_clean,
"sdist": my_sdist,
"test": my_test
},
classifiers=[
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: GNU Lesser General Public License v2 or later (LGPLv2+)",
"Programming Language :: Python :: 3",
]
setup(
ext_modules=_c_modules,
py_modules=_py_modules,
package_dir={
'': 'build'
},
cmdclass={
"build_ext": my_build_ext,
"build_py": my_build_py,
"clean": my_clean,
"sdist": my_sdist,
"test": my_test
},
)