diff options
| -rw-r--r-- | Cargo.toml | 9 | ||||
| -rw-r--r-- | pyproject.toml | 14 | ||||
| -rw-r--r-- | tests/test_metadata.py | 6 |
3 files changed, 15 insertions, 14 deletions
| @@ -9,15 +9,6 @@ readme = "README.md" | |||
| 9 | homepage = "https://github.com/ArniDagur/python-adblock" | 9 | homepage = "https://github.com/ArniDagur/python-adblock" |
| 10 | repository = "https://github.com/ArniDagur/python-adblock" | 10 | repository = "https://github.com/ArniDagur/python-adblock" |
| 11 | 11 | ||
| 12 | [package.metadata.maturin] | ||
| 13 | classifier = [ | ||
| 14 | "Programming Language :: Python", | ||
| 15 | "Programming Language :: Rust", | ||
| 16 | "License :: OSI Approved :: MIT License", | ||
| 17 | "License :: OSI Approved :: Apache Software License", | ||
| 18 | ] | ||
| 19 | requires-python = ">=3.7" | ||
| 20 | |||
| 21 | [profile.release] | 12 | [profile.release] |
| 22 | debug = true | 13 | debug = true |
| 23 | 14 | ||
diff --git a/pyproject.toml b/pyproject.toml index c3656a4..5655122 100644 --- a/pyproject.toml +++ b/pyproject.toml | |||
| @@ -1,8 +1,18 @@ | |||
| 1 | [tool.poetry] | 1 | [project] |
| 2 | name = "adblock" | 2 | name = "adblock" |
| 3 | version = "0.0.0" | 3 | version = "0.0.0" |
| 4 | description = "Brave's adblocking in Python" | 4 | description = "Brave's adblocking in Python" |
| 5 | authors = ["Árni Dagur <arni@dagur.eu>"] | 5 | requires-python = ">=3.7" |
| 6 | authors = [ | ||
| 7 | {email = "arni@dagur.eu"}, | ||
| 8 | {name = "Árni Dagur"} | ||
| 9 | ] | ||
| 10 | classifiers = [ | ||
| 11 | "Programming Language :: Python", | ||
| 12 | "Programming Language :: Rust", | ||
| 13 | "License :: OSI Approved :: MIT License", | ||
| 14 | "License :: OSI Approved :: Apache Software License", | ||
| 15 | ] | ||
| 6 | 16 | ||
| 7 | [tool.poetry.dependencies] | 17 | [tool.poetry.dependencies] |
| 8 | python = "^3.6" | 18 | python = "^3.6" |
diff --git a/tests/test_metadata.py b/tests/test_metadata.py index 440d560..62152f5 100644 --- a/tests/test_metadata.py +++ b/tests/test_metadata.py | |||
| @@ -57,10 +57,10 @@ def test_required_python_version(): | |||
| 57 | Make sure that the Python interpreter we're running this test suite on | 57 | Make sure that the Python interpreter we're running this test suite on |
| 58 | falls into the required Python range. | 58 | falls into the required Python range. |
| 59 | """ | 59 | """ |
| 60 | with open("Cargo.toml", encoding="utf-8") as f: | 60 | with open("pyproject.toml", encoding="utf-8") as f: |
| 61 | cargo_toml = toml.loads(f.read()) | 61 | pyproject_toml = toml.loads(f.read()) |
| 62 | 62 | ||
| 63 | required_python = cargo_toml["package"]["metadata"]["maturin"]["requires-python"] | 63 | required_python = pyproject_toml["project"]["requires-python"] |
| 64 | assert required_python.startswith(">=") | 64 | assert required_python.startswith(">=") |
| 65 | required_python = required_python[2:] | 65 | required_python = required_python[2:] |
| 66 | assert get_current_python_version() >= parse_version(required_python) | 66 | assert get_current_python_version() >= parse_version(required_python) |
