Repository: ClearcodeHQ/pytest-rabbitmq (language: python)

Issue:
merge setup.cfg into pyproject.toml

As much package configuration as possible should be moved to pyproject.toml




Discussion / hints:

Fix patch:
diff --git a/.github/workflows/linters.yml b/.github/workflows/linters.yml
index 39fe045..4394ede 100644
--- a/.github/workflows/linters.yml
+++ b/.github/workflows/linters.yml
@@ -3,12 +3,8 @@ name: Run linters
 on:
   push:
     branches: [ main ]
-    paths:
-      - '**.py'
-      - .github/workflows/linters.yml
-      - requirements-lint.txt
   pull_request:
     branches: [ main ]
 jobs:
   lint:
-    uses: fizyk/actions-reuse/.github/workflows/linters-python.yml@v1.2.0
+    uses: fizyk/actions-reuse/.github/workflows/linters-python.yml@v1.7.1
diff --git a/MANIFEST.in b/MANIFEST.in
index e1d2c20..4e61adf 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -1,4 +1,3 @@
-include *.rst *.py
-recursive-include src/pytest_rabbitmq *.py
-recursive-include docs *
-prune docs/build
+include *.rst
+recursive-include pytest_rabbitmq/*.py
+prune tests/
diff --git a/newsfragments/323.misc.rst b/newsfragments/323.misc.rst
new file mode 100644
index 0000000..0599691
--- /dev/null
+++ b/newsfragments/323.misc.rst
@@ -0,0 +1,1 @@
+Move package configuration to pyproject.toml
diff --git a/pyproject.toml b/pyproject.toml
index 3460c06..b5eef48 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,3 +1,69 @@
+[project]
+name = "pytest-rabbitmq"
+version = "2.2.1"
+description = "RabbitMQ process and client fixtures for pytest"
+readme = "README.rst"
+keywords = ["tests", "pytest", "fixture", "rabbitmq", "messsage queue"]
+license = {file = "COPYING.lesser"}
+authors = [
+    {name = "Grzegorz Śliwiński", email = "fizyk+pypi@fizyk.dev"}
+]
+classifiers = [
+    "Development Status :: 5 - Production/Stable",
+    "Environment :: Web Environment",
+    "Intended Audience :: Developers",
+    "License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)",
+    "Natural Language :: English",
+    "Operating System :: OS Independent",
+    "Programming Language :: Python",
+    "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 :: Only",
+    "Programming Language :: Python :: Implementation :: PyPy",
+    "Topic :: Software Development :: Libraries :: Python Modules",
+    "Topic :: Software Development :: Testing",
+    "Framework :: Pytest",
+]
+dependencies = [
+    "pytest >= 6.2",
+    "port-for >= 0.6.0",
+    "mirakuru",
+    "pika",
+]
+requires-python = ">= 3.7"
+
+[project.urls]
+"Source" = "https://github.com/ClearcodeHQ/pytest-rabbitmq"
+"Bug Tracker" = "https://github.com/ClearcodeHQ/pytest-rabbitmq/issues"
+"Changelog" = "https://github.com/ClearcodeHQ/pytest-rabbitmq/blob/v2.2.1/CHANGES.rst"
+
+[project.entry-points."pytest11"]
+pytest_redis = "pytest_rabbitmq.plugin"
+
+[build-system]
+requires = ["setuptools >= 61.0.0", "wheel"]
+build-backend = "setuptools.build_meta"
+
+[tool.setuptools]
+zip-safe = true
+
+[tool.setuptools.packages.find]
+include = ["pytest_rabbitmq*"]
+exclude = ["tests*"]
+namespaces = false
+
+[tool.pytest.ini_options]
+xfail_strict=true
+addopts = "--max-worker-restart=0 --showlocals --verbose --cov"
+testpaths = "tests"
+
+[tool.black]
+line-length = 100
+target-version = ['py38']
+include = '.*\.pyi?$'
 
 [tool.towncrier]
 directory = "newsfragments"
@@ -20,13 +86,3 @@ showcontent = true
 [tool.towncrier.fragment.misc]
 name = "Miscellaneus"
 showcontent = true
-
-
-[build-system]
-requires = ["setuptools >= 40.6.0", "wheel"]
-build-backend = "setuptools.build_meta"
-
-[tool.black]
-line-length = 100
-target-version = ['py38']
-include = '.*\.pyi?$'
diff --git a/setup.cfg b/setup.cfg
index 2ed6402..f612629 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -1,58 +1,3 @@
-[metadata]
-name = pytest-rabbitmq
-version = 2.2.1
-url = https://github.com/ClearcodeHQ/pytest-rabbitmq
-description = RabbitMQ process and client fixtures for pytest
-long_description = file: README.rst, CHANGES.rst
-long_description_content_type = text/x-rst
-keywords = tests, py.test, pytest, fixture, rabbitmq, messsage queue
-license = LGPLv3+
-maintainer = Grzegorz Śliwiński
-maintainer_email = fizyk+pypi@fizyk.net.pl
-classifiers =
-    Development Status :: 5 - Production/Stable
-    Environment :: Web Environment
-    Intended Audience :: Developers
-    License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)
-    Natural Language :: English
-    Operating System :: OS Independent
-    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
-    Programming Language :: Python :: Implementation :: PyPy
-    Topic :: Software Development :: Libraries :: Python Modules
-    Topic :: Software Development :: Testing
-    Framework :: Pytest
-
-[options]
-zip_safe = False
-include_package_data = True
-python_requires = >= 3.7
-packages = find:
-package_dir =
-    =src
-install_requires =
-    pytest>=3.0.0
-    port-for>=0.6.0
-    mirakuru>=2.0.0
-    pika
-
-[options.entry_points]
-pytest11 =
-    pytest_rabbitmq = pytest_rabbitmq.plugin
-
-[options.packages.find]
-where = src
-
-[options.extras_require]
-tests =
-    pytest-cov
-    pytest-xdist
-
 [pycodestyle]
 max-line-length = 100
 exclude = docs/*,build/*,venv/*
@@ -60,7 +5,3 @@ exclude = docs/*,build/*,venv/*
 [pydocstyle]
 ignore = D203,D212
 match = '(?!docs|build|venv).*\.py'
-
-[tool:pytest]
-addopts = --max-worker-restart=0 --showlocals --verbose  --cov pytest_rabbitmq --cov tests tests
-testpaths = tests
diff --git a/setup.py b/setup.py
deleted file mode 100644
index 4ec4b6e..0000000
--- a/setup.py
+++ /dev/null
@@ -1,23 +0,0 @@
-# -*- coding: utf-8 -*-
-# Copyright (C) 2016 by Clearcode <http://clearcode.cc>
-# and associates (see AUTHORS).
-
-# This file is part of pytest-rabbitmq.
-
-# pytest-rabbitmq is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# pytest-rabbitmq is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU Lesser General Public License for more details.
-
-# You should have received a copy of the GNU Lesser General Public License
-# along with pytest-rabbitmq. If not, see <http://www.gnu.org/licenses/>.
-"""Installation module of pytest-rabbitmq."""
-from setuptools import setup
-
-
-setup()


Test patch:
diff --git a/src/pytest_rabbitmq/__init__.py b/pytest_rabbitmq/__init__.py
similarity index 100%
rename from src/pytest_rabbitmq/__init__.py
rename to pytest_rabbitmq/__init__.py
diff --git a/src/pytest_rabbitmq/factories/__init__.py b/pytest_rabbitmq/factories/__init__.py
similarity index 100%
rename from src/pytest_rabbitmq/factories/__init__.py
rename to pytest_rabbitmq/factories/__init__.py
diff --git a/src/pytest_rabbitmq/factories/client.py b/pytest_rabbitmq/factories/client.py
similarity index 100%
rename from src/pytest_rabbitmq/factories/client.py
rename to pytest_rabbitmq/factories/client.py
diff --git a/src/pytest_rabbitmq/factories/executor.py b/pytest_rabbitmq/factories/executor.py
similarity index 100%
rename from src/pytest_rabbitmq/factories/executor.py
rename to pytest_rabbitmq/factories/executor.py
diff --git a/src/pytest_rabbitmq/factories/process.py b/pytest_rabbitmq/factories/process.py
similarity index 100%
rename from src/pytest_rabbitmq/factories/process.py
rename to pytest_rabbitmq/factories/process.py
diff --git a/src/pytest_rabbitmq/plugin.py b/pytest_rabbitmq/plugin.py
similarity index 100%
rename from src/pytest_rabbitmq/plugin.py
rename to pytest_rabbitmq/plugin.py