diff options
author | 2024-01-18 13:36:56 +0500 | |
---|---|---|
committer | 2024-03-31 01:09:56 +0100 | |
commit | 322544dea4a84a5d9bc4ba76c88719d03dcd5843 (patch) | |
tree | cde076e31cbddc87d3da7a6f7ed702c36689cac7 | |
parent | setup.py: Drop duplicate classifier (diff) | |
download | metagen-322544dea4a84a5d9bc4ba76c88719d03dcd5843.tar.gz metagen-322544dea4a84a5d9bc4ba76c88719d03dcd5843.tar.bz2 metagen-322544dea4a84a5d9bc4ba76c88719d03dcd5843.zip |
Switch from setup.py to PEP517
Signed-off-by: Sebastian Pipping <sping@gentoo.org>
-rw-r--r-- | pyproject.toml | 46 | ||||
-rwxr-xr-x | setup.py | 99 |
2 files changed, 46 insertions, 99 deletions
diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..0641518 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,46 @@ +[build-system] +requires = ["setuptools"] +build-backend = "setuptools.build_meta" + +[project] +name = "metagen" +description = "Metadata.xml Generator for Ebuilds" +authors = [ + {name = "Rob Cakebread", email = "pythonhead@gentoo.org"}, + {name = "Jesus Rivero", email = "neurogeek@gentoo.org"}, + {name = "Sebastian Pipping", email = "sebastian@pipping.org"}, +] +dynamic = ["version"] +readme = "README.md" +license = {text = "GPL-2"} +dependencies = [ + "lxml", + "portage", +] +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Environment :: Console", + "Intended Audience :: Developers", + "License :: OSI Approved :: GNU General Public License v2 (GPLv2)", + "Natural Language :: English", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3 :: Only", + "Topic :: Software Development", + "Topic :: Text Processing :: Markup :: XML", + "Topic :: Utilities", +] + +[project.scripts] +metagen = "metagen.__main__:main" + +[project.urls] +Home = "https://gitweb.gentoo.org/proj/metagen.git/" +Changelog = "https://gitweb.gentoo.org/proj/metagen.git/plain/docs/ChangeLog" + +[tool.setuptools.dynamic] +version = {attr = "metagen.version.__version__"} diff --git a/setup.py b/setup.py deleted file mode 100755 index 6a21679..0000000 --- a/setup.py +++ /dev/null @@ -1,99 +0,0 @@ -""" -NAME: - setup.py - -SYNOPSIS: - python3 setup.py [options] [command] - -DESCRIPTION: - Using setuptools "setup", build, install, or make tarball of the package. - -OPTIONS: - See Distutils documentation for details on options and commands. - Common commands: - build build the package, in preparation for install - install install module(s)/package(s) [runs build if needed] - install_data install datafiles (e.g., in a share dir) - install_scripts install executable scripts (e.g., in a bin dir) - sdist make a source distribution - bdist make a binary distribution - clean remove build temporaries - -EXAMPLES: - cd mydir - (cp myfile-0.1.tar.gz here) - gzip -cd myfile-0.1.tar.gz | tar xvf - - cd myfile-0.1 - python3 setup.py build - python3 setup.py install - python3 setup.py sdist -""" - -import glob -from setuptools import setup -from metagen.version import __version__ - -pkgname='metagen' -version = __version__ -description = "Metadata.xml Generator for Ebuilds" -author = "Rob Cakebread" -author_email = "pythonhead@gentoo.org" -url = "https://gitweb.gentoo.org/proj/metagen.git/" -license = "GPL-2" - -packages=['metagen'] -package_data={"metagen" : ["test_cli"]} -data_files=[("share/doc/%s-%s" % ("metagen", version), glob.glob("docs/*"))] - - -def main(): - setup( - name = pkgname, - version = version, - description = description, - long_description = open('README.md').read(), - long_description_content_type = 'text/markdown', - author = author, - author_email = author_email, - url=url, - license = license, - - setup_requires = [ - 'setuptools>=38.6.0', # for long_description_content_type - ], - install_requires = [ - 'lxml', - ], - - packages = packages, - data_files = data_files, - package_data = package_data, - - entry_points = { - 'console_scripts': [ - "metagen = metagen.__main__:main", - ], - }, - - classifiers = [ - 'Development Status :: 5 - Production/Stable', - 'Environment :: Console', - 'Intended Audience :: Developers', - 'License :: OSI Approved :: GNU General Public License v2 (GPLv2)', - 'Natural Language :: English', - 'Programming Language :: Python', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10', - 'Programming Language :: Python :: 3 :: Only', - 'Topic :: Software Development', - 'Topic :: Text Processing :: Markup :: XML', - 'Topic :: Utilities', - ] - ) - - -if __name__ == '__main__': - main() |