commit 7597cd0b841a0ede22ff4cec6b4b91fb7d26a805
parent e8c923f69388dcff2c7805bec2269db2cc61d0c4
Author: Robert Schütz <mail@dotlambda.de>
Date: Mon, 27 Feb 2023 23:21:40 -0800
PEP 621 compatibility
Diffstat:
3 files changed, 15 insertions(+), 14 deletions(-)
diff --git a/Cargo.toml b/Cargo.toml
@@ -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
diff --git a/pyproject.toml b/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"
diff --git a/tests/test_metadata.py b/tests/test_metadata.py
@@ -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)