From 7dd2f1fcd0a34a1cdfdf9ddaafcee363baa4692c Mon Sep 17 00:00:00 2001 From: Talley Lambert Date: Thu, 5 Oct 2023 09:41:55 +0200 Subject: [PATCH] chore: remove setuppy --- setup.py | 30 ------------------------------ tests/test_docs.py | 25 ------------------------- 2 files changed, 55 deletions(-) delete mode 100644 setup.py diff --git a/setup.py b/setup.py deleted file mode 100644 index 3f6e2cd46..000000000 --- a/setup.py +++ /dev/null @@ -1,30 +0,0 @@ -import sys - -sys.stderr.write( - """ -=============================== -Unsupported installation method -=============================== -magicgui does not support installation with `python setup.py install`. -Please use `python -m pip install .` instead. -""" -) -sys.exit(1) - - -# The below code will never execute, however GitHub is particularly -# picky about where it finds Python packaging metadata. -# See: https://github.com/github/feedback/discussions/6456 -# -# To be removed once GitHub catches up. - -setup( - name="magicgui", - install_requires=[ - "docstring_parser>=0.7", - "psygnal>=0.5.0", - "qtpy>=1.7.0", - "superqt>=0.5.0", - "typing_extensions", - ], -) diff --git a/tests/test_docs.py b/tests/test_docs.py index d80e45c8f..27f57d503 100644 --- a/tests/test_docs.py +++ b/tests/test_docs.py @@ -72,28 +72,3 @@ def test_examples(fname, monkeypatch): if "waveform" in fname: type_map._type_map._TYPE_DEFS.pop(int, None) type_map._type_map._TYPE_DEFS.pop(float, None) - - -@pytest.mark.skipif(sys.version_info < (3, 11), reason="requires python3.11") -def test_setuppy(): - """Ensure that setup.py matches pyproject deps. - - (setup.py is only there for github) - """ - import ast - - import tomllib - - setup = Path(__file__).parent.parent / "setup.py" - pyproject = Path(__file__).parent.parent / "pyproject.toml" - settxt = setup.read_text(encoding="utf-8") - deps = ast.literal_eval(settxt.split("install_requires=")[-1].split("]")[0] + "]") - - with open(pyproject, "rb") as f: - data = tomllib.load(f) - - projdeps = set(data["project"]["dependencies"]) - assert projdeps == set(deps) - - min_req = data["project"]["optional-dependencies"]["min-req"] - assert {k.replace(">=", "==") for k in projdeps} == set(min_req)