diff --git a/.bumpversion.cfg b/.bumpversion.cfg index c5309d4..574e8de 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -16,6 +16,6 @@ values = [bumpversion:file:./pulpcore/cli/maven/__init__.py] -[bumpversion:file:./pulp-glue-maven/setup.py] +[bumpversion:file:./pulp-glue-maven/pyproject.toml] -[bumpversion:file:./setup.py] +[bumpversion:file:./pyproject.toml] diff --git a/.github/workflows/collect_changes.yml b/.github/workflows/collect_changes.yml index 91b47d3..a175b73 100644 --- a/.github/workflows/collect_changes.yml +++ b/.github/workflows/collect_changes.yml @@ -23,7 +23,7 @@ jobs: pip install GitPython packaging toml python3 .ci/scripts/collect_changes.py - name: "Create Pull Request" - uses: "peter-evans/create-pull-request@v5" + uses: "peter-evans/create-pull-request@v6" with: token: "${{ secrets.RELEASE_TOKEN }}" title: "Update Changelog" diff --git a/.github/workflows/release_branch.yml b/.github/workflows/release_branch.yml index b89a9b0..1932aea 100644 --- a/.github/workflows/release_branch.yml +++ b/.github/workflows/release_branch.yml @@ -23,7 +23,7 @@ jobs: run: | .ci/scripts/create_release_branch.sh - name: "Create Pull Request" - uses: "peter-evans/create-pull-request@v5" + uses: "peter-evans/create-pull-request@v6" with: token: "${{ secrets.RELEASE_TOKEN }}" title: "Bump dev-version" diff --git a/CHANGES/pulp-glue-maven/.gitkeep b/CHANGES/pulp-glue-maven/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/pulp-glue-maven/pyproject.toml b/pulp-glue-maven/pyproject.toml index e0559de..df0fbcf 100644 --- a/pulp-glue-maven/pyproject.toml +++ b/pulp-glue-maven/pyproject.toml @@ -1,3 +1,43 @@ +[build-system] +requires = ["setuptools"] +build-backend = "setuptools.build_meta" + +[project] +name = "pulp-glue-maven" +version = "0.3.0.dev" +description = "Version agnostic glue library to talk to pulpcore's REST API. (Maven plugin)" +readme = "README.md" +requires-python = ">=3.8" +license = {text = "GPLv2+"} +authors = [ + {name = "Pulp Team", email = "pulp-list@redhat.com"}, +] +classifiers = [ + "Development Status :: 4 - Beta", + "Environment :: Other Environment", + "Intended Audience :: Developers", + "License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)", + "Operating System :: OS Independent", + "Programming Language :: Python :: 3", + "Topic :: System :: Software Distribution", + "Typing :: Typed", +] +dependencies = [ + "pulp-glue>=0.24.0,<0.25.0.dev", +] + +[project.urls] +repository = "https://github.com/pulp/pulp-cli-maven" +changelog = "https://github.com/pulp/pulp-cli-maven/blob/main/CHANGES.md" + +[tool.setuptools.packages.find] +where = ["."] +include = ["pulp_glue.*"] +namespaces = true + +[tool.setuptools.package-data] +"*" = ["py.typed", "locale/*/LC_MESSAGES/*.mo"] + [tool.black] line-length = 100 diff --git a/pulp-glue-maven/setup.py b/pulp-glue-maven/setup.py deleted file mode 100644 index 8302dc8..0000000 --- a/pulp-glue-maven/setup.py +++ /dev/null @@ -1,45 +0,0 @@ -from setuptools import setup - -try: - from setuptools import find_namespace_packages - - plugin_packages = find_namespace_packages(include=["pulp_glue.*"], exclude=["pulp_glue.*.*"]) - -except ImportError: - # Old versions of setuptools do not provide `find_namespace_packages` - # see https://github.com/pulp/pulp-cli/issues/248 - from setuptools import find_packages - - plugins = find_packages(where="pulp_glue") - plugin_packages = [f"pulp_glue.{plugin}" for plugin in plugins] - -long_description = "" -with open("README.md") as readme: - for line in readme: - long_description += line - -setup( - name="pulp-glue-maven", - description="Version agnostic glue library to talk to pulpcore's REST API.", - long_description=long_description, - long_description_content_type="text/markdown", - author="Pulp Team", - author_email="pulp-list@redhat.com", - url="https://github.com/pulp/pulp-cli-maven", - version="0.3.0.dev", - packages=plugin_packages, - package_data={"": ["py.typed"]}, - python_requires=">=3.8", - install_requires=["pulp-glue>=0.24.0"], - license="GPLv2+", - classifiers=[ - "Development Status :: 4 - Beta", - "Environment :: Other Environment", - "Intended Audience :: Developers", - "License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)", - "Operating System :: OS Independent", - "Programming Language :: Python :: 3", - "Topic :: System :: Software Distribution", - "Typing :: Typed", - ], -) diff --git a/pyproject.toml b/pyproject.toml index bf5ce35..ba709dd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,47 @@ +[build-system] +requires = ["setuptools"] +build-backend = "setuptools.build_meta" + +[project] +name = "pulp-cli-maven" +version = "0.3.0.dev" +description = "Command line interface to talk to pulpcore's REST API. (Maven plugin commands)" +readme = "README.md" +requires-python = ">=3.8" +license = {text = "GPLv2+"} +authors = [ + {name = "Pulp Team", email = "pulp-list@redhat.com"}, +] +classifiers=[ + "Development Status :: 4 - Beta", + "Environment :: Console", + "Intended Audience :: System Administrators", + "License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)", + "Operating System :: OS Independent", + "Programming Language :: Python :: 3", + "Topic :: System :: Software Distribution", + "Typing :: Typed", +] +dependencies = [ + "pulp-cli>=0.24.0,<0.25.0.dev", + "pulp-glue-maven==0.3.0.dev", +] + +[project.urls] +repository = "https://github.com/pulp/pulp-cli-maven" +changelog = "https://github.com/pulp/pulp-cli-maven/blob/main/CHANGES.md" + +[project.entry-points."pulp_cli.plugins"] +maven = "pulpcore.cli.maven" + +[tool.setuptools.packages.find] +where = ["."] +include = ["pulpcore.cli.*"] +namespaces = true + +[tool.setuptools.package-data] +"*" = ["py.typed", "locale/*/LC_MESSAGES/*.mo"] + [tool.pulp_cli_template] app_label = "maven" glue = true @@ -23,13 +67,21 @@ test_matrix = """ """ [tool.towncrier] -package = "pulpcore.cli.maven" filename = "CHANGES.md" directory = "CHANGES/" title_format = "## {version} ({project_date})" template = "CHANGES/.TEMPLATE.md" issue_format = "[#{issue}](https://github.com/pulp/pulp-cli-maven/issues/{issue})" start_string = "[//]: # (towncrier release notes start)\n" +underlines = ["", "", ""] + +[[tool.towncrier.section]] +path = "" +name = "" + +[[tool.towncrier.section]] +path = "pulp-glue-maven" +name = "Pulp-maven GLUE" [[tool.towncrier.type]] directory = "feature" diff --git a/setup.py b/setup.py deleted file mode 100644 index 884a055..0000000 --- a/setup.py +++ /dev/null @@ -1,42 +0,0 @@ -from setuptools import setup - -try: - from setuptools import find_namespace_packages - - plugin_packages = find_namespace_packages(include=["pulpcore.cli.*"]) - -except ImportError: - # Old versions of setuptools do not provide `find_namespace_packages` - # see https://github.com/pulp/pulp-cli/issues/248 - from setuptools import find_packages - - plugins = find_packages(where="pulpcore/cli") - plugin_packages = [f"pulpcore.cli.{plugin}" for plugin in plugins] - -plugin_entry_points = [(package.rsplit(".", 1)[-1], package) for package in plugin_packages] - - -setup( - name="pulp-cli-maven", - description="Command line interface to talk to pulpcore's REST API. (Maven plugin commands)", - url="https://github.com/pulp/pulp-cli-maven", - version="0.3.0.dev", - packages=plugin_packages, - package_data={package: ["py.typed"] for package in plugin_packages}, - python_requires=">=3.8", - install_requires=["pulp-cli>=0.24.0,<0.25.0", "pulp-glue-maven==0.3.0.dev"], - entry_points={ - "pulp_cli.plugins": [f"{name}={module}" for name, module in plugin_entry_points], - }, - license="GPLv2+", - classifiers=[ - "Development Status :: 4 - Beta", - "Environment :: Console", - "Intended Audience :: System Administrators", - "License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)", - "Operating System :: OS Independent", - "Programming Language :: Python :: 3", - "Topic :: System :: Software Distribution", - "Typing :: Typed", - ], -)