From 944b261e67c9fa10cc2c7edba001e328e5ad3ff7 Mon Sep 17 00:00:00 2001 From: Justin Mayer Date: Fri, 2 Feb 2024 11:18:57 +0100 Subject: [PATCH] Switch from setup.py to pyproject.toml --- pyproject.toml | 46 +++++++++++++++++++++++++++++++++++ setup.py | 66 -------------------------------------------------- 2 files changed, 46 insertions(+), 66 deletions(-) create mode 100644 pyproject.toml delete mode 100755 setup.py diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..ec3b8c4 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,46 @@ +[project] +name = "githubrelease" +version = "1.5.9" +description = "Command-line tool to easily manage GitHub releases, assets, and references" +authors = [ + {name = "Joost Molenaar", email = "j.j.molenaar@gmail.com"}, + {name = "Jean-Christophe Fillion-Robin", email = "jchris.fillionr@kitware.com"}, +] +license = {text = "Apache"} +readme = "README.md" +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Environment :: Console", + "Intended Audience :: Developers", + "License :: OSI Approved :: Apache Software License", + "Natural Language :: English", + "Operating System :: OS Independent", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Topic :: Software Development :: Version Control", + "Topic :: System :: Software Distribution", +] + +requires-python = ">=3.8.1,<4.0" +dependencies = [ + "backoff~=2.1.2", + "click", + "linkheader", + "requests", +] + +[project.urls] +Homepage = "https://github.com/j0057/github-release" + +[project.scripts] +github-asset = "github_release:gh_asset" +github-release = "github_release:gh_release" +githubrelease = "github_release:main" + +[build-system] +requires = ["setuptools>=61", "wheel"] +build-backend = "setuptools.build_meta" diff --git a/setup.py b/setup.py deleted file mode 100755 index da6aa9c..0000000 --- a/setup.py +++ /dev/null @@ -1,66 +0,0 @@ -#!/usr/bin/env python - -import sys - -from setuptools import setup - -with open('README.md', 'r') as fp: - readme = fp.read() - -with open('requirements.txt', 'r') as fp: - requirements = list(filter(bool, (line.strip() for line in fp))) - -with open('requirements-dev.txt', 'r') as fp: - dev_requirements = list(filter(bool, (line.strip() for line in fp))) - -setup_requires = ['setuptools-version-command'] - -# Require pytest-runner only when running tests -pytest_runner = (['pytest-runner>=2.0,<3dev'] - if any(arg in sys.argv for arg in ('pytest', 'test')) - else []) - -setup_requires.extend(pytest_runner) - -setup( - name='githubrelease', - - description='githubrelease is a CLI to easily manage GitHub releases, ' - 'assets and references', - long_description=readme, - long_description_content_type='text/markdown; charset=UTF-8', - - url='https://github.com/j0057/github-release', - - author='Joost Molenaar, Jean-Christophe Fillion-Robin', - author_email='j.j.molenaar@gmail.com, jchris.fillionr@kitware.com', - - version_command='git describe', - - py_modules=['github_release'], - - entry_points={ - 'console_scripts': [ - 'githubrelease = github_release:main', - 'github-release = github_release:gh_release', - 'github-asset = github_release:gh_asset' - ]}, - - license="Apache", - - classifiers=[ - 'Environment :: Console', - 'Intended Audience :: Developers', - 'License :: OSI Approved :: Apache Software License', - 'Natural Language :: English', - 'Operating System :: OS Independent', - 'Programming Language :: Python :: 2', - 'Programming Language :: Python :: 3', - 'Topic :: Software Development :: Version Control', - 'Topic :: System :: Software Distribution' - ], - - install_requires=requirements, - tests_require=dev_requirements, - setup_requires=setup_requires -)