Skip to content

Commit

Permalink
Drop setup.py test command
Browse files Browse the repository at this point in the history
Using setup.py to run commands is deprecated.
Currently remove test command only as it is explicitly deprecated.

pytest-runner was used to run pytests through setuptools, but now it is
no longer needed.
  • Loading branch information
achaikou committed Aug 7, 2024
1 parent 086fbbd commit 2b578e4
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 9 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ To develop dlisio, or to build a particular revision from source, you need:
* [pybind11](https://github.com/pybind/pybind11) version 2.6 or greater
* [setuptools](https://pypi.python.org/pypi/setuptools) version 28 or greater
* [layered-file-protocols](https://github.com/equinor/layered-file-protocols)
* python packages pytest, pytest-runner, and numpy
* python packages pytest and numpy

If you do not have pybind11 installed on your system, the easiest way to get a
working copy is to `pip3 install pybind11` (NP! pybind11, not pybind)
Expand Down
2 changes: 1 addition & 1 deletion python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,6 @@ endif()
# different args to setup.py, rebuilding the python lib (and wrongly so as it
# either won't find dlisio or picked up on a system installed one)
add_test(NAME python.unit
COMMAND ${python} ${setup.py} --skip-cmake test
COMMAND ${python} -m pytest tests
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
1 change: 0 additions & 1 deletion python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ requires = [
"scikit-build",
"wheel",
"pybind11",
"pytest-runner",
]

[tool.cibuildwheel]
Expand Down
1 change: 0 additions & 1 deletion python/requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ numpy
setuptools
setuptools_scm
pytest
pytest-runner
pybind11
hypothesis
sphinx
Expand Down
3 changes: 0 additions & 3 deletions python/setup.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
[metadata]
version = 1.0.1

[aliases]
test = pytest
2 changes: 0 additions & 2 deletions python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,7 @@ def get_long_description():
setup_requires = ['setuptools >= 28',
'pybind11 >= 2.3',
'setuptools_scm',
'pytest-runner',
],
tests_require = ['pytest'],
# we're building with the pybind11 fetched from pip. Since we don't rely on
# a cmake-installed pybind there's also no find_package(pybind11) -
# instead, the get include dirs from the package and give directly from
Expand Down

0 comments on commit 2b578e4

Please sign in to comment.