commit 873ff13bb0659a56cfec2e07b464a5f1bf8e722f
parent acd6f12d9e370e00de1ee6125c70a09cdcfae0ec
Author: Árni Dagur <arni@dagur.eu>
Date: Fri, 3 Mar 2023 00:20:10 +0100
Duplicate package information for Poetry
Diffstat:
2 files changed, 23 insertions(+), 8 deletions(-)
diff --git a/pyproject.toml b/pyproject.toml
@@ -1,12 +1,9 @@
[project]
name = "adblock"
-version = "0.0.0"
+version = "0.6.0"
description = "Brave's adblocking in Python"
requires-python = ">=3.7"
-authors = [
- {email = "arni@dagur.eu"},
- {name = "Árni Dagur"}
-]
+authors = [{ name = "Árni Dagur", email = "arni@dagur.eu" }]
classifiers = [
"Programming Language :: Python",
"Programming Language :: Rust",
@@ -14,6 +11,12 @@ classifiers = [
"License :: OSI Approved :: Apache Software License",
]
+[tool.poetry]
+name = "adblock"
+version = "0.6.0"
+description = "Brave's adblocking in Python"
+authors = ["Árni Dagur <arni@dagur.eu>"]
+
[tool.poetry.dependencies]
python = "^3.6"
@@ -23,5 +26,5 @@ pytest = "*"
toml = "*"
[build-system]
-requires = ["maturin>=0.12,<0.13"]
+requires = ["maturin>=0.12"]
build-backend = "maturin"
diff --git a/tests/test_metadata.py b/tests/test_metadata.py
@@ -16,6 +16,15 @@ def get_version_value_cargo():
return parse_version(cargo_toml["package"]["version"])
+def get_version_values_pyproject():
+ with open("pyproject.toml", encoding="utf-8") as f:
+ pyproject_toml = toml.loads(f.read())
+ return [
+ parse_version(pyproject_toml["project"]["version"]),
+ parse_version(pyproject_toml["tool"]["poetry"]["version"]),
+ ]
+
+
def get_version_value_changelog():
"""
Try to get the names of all classes that we added to the Python module
@@ -37,15 +46,18 @@ def get_version_value_changelog():
def test_version_numbers_all_same():
"""
- Makes sure that `Cargo.toml` and `CHANGELOG.md` contain the same version
- number as the one attached to the `adblock` module.
+ Makes sure that `pyproject.toml`, `Cargo.toml` and `CHANGELOG.md` contain
+ the same version number as the one attached to the `adblock` module.
"""
cargo_version = get_version_value_cargo()
changelog_version = get_version_value_changelog()
+ pyproject_versions = get_version_values_pyproject()
module_version = parse_version(adblock.__version__)
assert cargo_version == module_version
assert module_version == changelog_version
+ assert changelog_version == pyproject_versions[0]
+ assert pyproject_versions[0] == pyproject_versions[1]
def get_current_python_version():