python: remove deprecated setup.py args (setuptools warnings)

- Drop legacy setup_requires and test_suite to stop
  setuptools _DeprecatedInstaller / fetch_build_eggs and
  unknown distribution option warnings.
- Add inline comment explaining rationale and PEP 517 context.
This commit is contained in:
Håkon Hægland committed 2025-09-12 15:42:24 +02:00
1 parent 5728fa73da
commit ce3ee6fc98
1 file changed
+6 -2
+6 -2
View File
@@ -14,6 +14,12 @@ with open("README.md", "r") as fh:
with open("requirements.txt", "r") as fh:
requires = [line.rstrip() for line in fh]
# NOTE (2025-09-12): Removed legacy `setup_requires` and `test_suite` arguments.
# - `setup_requires` triggers setuptools' deprecated fetch_build_eggs path
# (_DeprecatedInstaller). We build via PEP 517 (see pyproject.toml with
# scikit-build), so build-time deps must be declared there instead.
# - `test_suite` is not a supported distribution option and produced
# "Unknown distribution option: 'test_suite'" warnings.
setup(
name='opm-simulators',
version = '@opm-simulators_VERSION@' + '@opm-simulators_PYTHON_PACKAGE_VERSION@',
@@ -30,8 +36,6 @@ setup(
package_data={'opm' : ['$<TARGET_FILE_NAME:simulators>']},
include_package_data=True,
license='Open Source',
test_suite='tests',
setup_requires=["pytest-runner", 'setuptools_scm'],
install_requires=requires,
python_requires='>=3.8',
classifiers=[