Skip to content

Commit

Permalink
chore: remove setuppy
Browse files Browse the repository at this point in the history
  • Loading branch information
tlambert03 committed Oct 5, 2023
1 parent 21ee452 commit 7dd2f1f
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 55 deletions.
30 changes: 0 additions & 30 deletions setup.py

This file was deleted.

25 changes: 0 additions & 25 deletions tests/test_docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit 7dd2f1f

Please sign in to comment.