Skip to content

Commit

Permalink
PEP 621 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
dotlambda authored and ArniDagur committed Mar 28, 2023
1 parent e8c923f commit 7597cd0
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 14 deletions.
9 changes: 0 additions & 9 deletions Cargo.toml
Expand Up @@ -9,15 +9,6 @@ readme = "README.md"
homepage = "https://github.com/ArniDagur/python-adblock"
repository = "https://github.com/ArniDagur/python-adblock"

[package.metadata.maturin]
classifier = [
"Programming Language :: Python",
"Programming Language :: Rust",
"License :: OSI Approved :: MIT License",
"License :: OSI Approved :: Apache Software License",
]
requires-python = ">=3.7"

[profile.release]
debug = true

Expand Down
14 changes: 12 additions & 2 deletions pyproject.toml
@@ -1,8 +1,18 @@
[tool.poetry]
[project]
name = "adblock"
version = "0.0.0"
description = "Brave's adblocking in Python"
authors = ["Árni Dagur <arni@dagur.eu>"]
requires-python = ">=3.7"
authors = [
{email = "arni@dagur.eu"},
{name = "Árni Dagur"}
]
classifiers = [
"Programming Language :: Python",
"Programming Language :: Rust",
"License :: OSI Approved :: MIT License",
"License :: OSI Approved :: Apache Software License",
]

[tool.poetry.dependencies]
python = "^3.6"
Expand Down
6 changes: 3 additions & 3 deletions tests/test_metadata.py
Expand Up @@ -57,10 +57,10 @@ def test_required_python_version():
Make sure that the Python interpreter we're running this test suite on
falls into the required Python range.
"""
with open("Cargo.toml", encoding="utf-8") as f:
cargo_toml = toml.loads(f.read())
with open("pyproject.toml", encoding="utf-8") as f:
pyproject_toml = toml.loads(f.read())

required_python = cargo_toml["package"]["metadata"]["maturin"]["requires-python"]
required_python = pyproject_toml["project"]["requires-python"]
assert required_python.startswith(">=")
required_python = required_python[2:]
assert get_current_python_version() >= parse_version(required_python)

0 comments on commit 7597cd0

Please sign in to comment.