Repository: CMakePP/CMinx (language: python)

Issue:
Consolidate "setup.cfg", "pyproject.toml", and "requirements.txt"
**Is your feature request related to a problem? Please describe.**
This project defines its package information via three different configuration files, namely `setup.cfg`, `pyproject.toml`, and `requirements.txt`. All three files can be consolidated into a single file, preferably into `pyproject.toml` (see https://setuptools.pypa.io/en/latest/userguide/pyproject_config.html)

**Describe the solution you'd like**
Only use `pyproject.toml` and merge contents of `setup.cfg` and `requirements.txt` into it. As far as I understand, `requirements.txt` only contains the requirements for testing. This can be handled, e.g., via [optional dependencies](https://setuptools.pypa.io/en/latest/userguide/dependency_management.html#optional-dependencies) to make this destinction clear.

**Describe alternatives you've considered**
None.

**Additional context**
None.



Discussion / hints:
Thanks for the info! This is the first PyPI package I've ever made (I'm primarily a C++ developer), so I'm definitely still learning. I can take a stab at this one too.

Fix patch:
diff --git a/.github/workflows/pip_install.yaml b/.github/workflows/pip_install.yaml
index 1b5a71b7..113bf088 100644
--- a/.github/workflows/pip_install.yaml
+++ b/.github/workflows/pip_install.yaml
@@ -43,7 +43,7 @@ jobs:
           python3 -m venv virt_env
           source virt_env/bin/activate
           pip3 install -e .
-          pip3 install -r requirements.txt
+          pip3 install -e .[testing]
       - name: Test
         run: |
           source virt_env/bin/activate
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7a8d6ffb..1034982f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -102,9 +102,7 @@ if(BUILD_TESTING)
     include("${PROJECT_SOURCE_DIR}/cmake/get_cpp.cmake")
     include("${PROJECT_SOURCE_DIR}/cmake/get_cmake_test.cmake")
 
-    python_venv_pip_install(
-        ${CMINX_VENV} "-r" "${CMAKE_CURRENT_SOURCE_DIR}/requirements.txt"
-    )
+    python_venv_pip_install(${CMINX_VENV} "-e" ".[testing]")
 
     include(cmake_test/cmake_test)
     include(CTest)
@@ -118,7 +116,7 @@ endif()
 ################################################################################
 
 install(
-    DIRECTORY ${CMINX_STAGE_DIR}/ 
+    DIRECTORY ${CMINX_STAGE_DIR}/
     DESTINATION ${CMAKE_INSTALL_PREFIX}
     USE_SOURCE_PERMISSIONS
 )
diff --git a/pyproject.toml b/pyproject.toml
index c14df246..062cc6cb 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -13,9 +13,43 @@
 # limitations under the License.
 
 [build-system]
-requires = [ "setuptools>=41", "wheel", "setuptools-git-versioning", ]
+requires = ["setuptools>=41", "wheel", "setuptools-git-versioning"]
 build-backend = "setuptools.build_meta"
 
+
+[project]
+name = "CMinx"
+dynamic = ["version"]
+description = "Documentation Generator for the CMake Language"
+readme = "README.rst"
+license = {file = "LICENSE"}
+authors = [{name = "CMakePP"}]
+keywords = ["CMake", "Documentation"]
+classifiers = ["Development Status :: 5 - Production/Stable",
+    "License :: OSI Approved :: Apache Software License",
+    "Programming Language :: Python :: 3 :: Only",
+    "Topic :: Documentation",
+    "Topic :: Software Development :: Documentation",
+    "Topic :: Software Development :: Build Tools"
+]
+urls = {"GitHub" = "https://github.com/CMakePP/CMinx"}
+scripts = {"cminx" = "cminx:main"}
+dependencies = ["antlr4-python3-runtime==4.7.2",
+    "confuse>=1.7",
+    "pathspec>=0.9.0"
+]
+
+
+[project.optional-dependencies]
+testing = ["coverage", "docutils>=0.10", "pytest", "pytest-cov"]
+
+
+[tool.setuptools]
+packages = ["cminx"]
+package-dir = {"" = "src"}
+include-package-data = true
+
+
 [tool.setuptools-git-versioning]
 enabled = true
 dev_template = "{tag}"
diff --git a/requirements.txt b/requirements.txt
deleted file mode 100644
index 13a6115a..00000000
--- a/requirements.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-coverage
-docutils>=0.10
-pytest
-pytest-cov
diff --git a/setup.cfg b/setup.cfg
deleted file mode 100644
index 4d166054..00000000
--- a/setup.cfg
+++ /dev/null
@@ -1,36 +0,0 @@
-[metadata]
-name = CMinx
-url = https://github.com/CMakePP/CMinx
-license = Apache 2.0
-license_files = LICENSE
-description = Documentation Generator for the CMake Language
-long_description = file: README.rst
-long_description_content_type = text/x-rst
-author = CMakePP
-keywords =
-    CMake
-    Documentaion
-classifiers=
-    Development Status :: 4 - Beta
-    License :: OSI Approved :: Apache Software License
-    Programming Language :: Python :: 3 :: Only
-    Topic :: Documentation
-    Topic :: Software Development :: Documentation
-    Topic :: Software Development :: Build Tools
-
-[options]
-packages = find:
-package_dir =
-    = src
-include_package_data = True
-install_requires =
-    antlr4-python3-runtime==4.7.2
-    confuse>=1.7
-    pathspec>=0.9.0
-
-[options.packages.find]
-where=src
-
-[options.entry_points]
-console_scripts =
-    cminx = cminx:main


Test patch:
diff --git a/tests/README.rst b/tests/README.rst
index 9d750999..1782d8d4 100644
--- a/tests/README.rst
+++ b/tests/README.rst
@@ -42,11 +42,11 @@ you need to run ``ctest`` in the build directory.
 
 If CMinx was built with Python you can still run all the tests, except the ones
 pertaining to the CMake API. To test CMinx built with Python you first need to
-install the extra unit test dependencies (assumed to be run in this directory):
+install the extra unit test dependencies (run in root directory):
 
 .. code::
 
-   pip install -r requirements.txt
+   pip install -e .[testing]
 
 After installing the extra packages needed for unit testing, the unit tests can
 be run with (still in this directory):