git: ae49c5155a63 - main - www/py-adblock: Fix build with py-maturin 0.14.0+
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 31 Jul 2023 16:55:25 UTC
The branch main has been updated by sunpoet: URL: https://cgit.FreeBSD.org/ports/commit/?id=ae49c5155a63d975b00003a64b238268167b96b7 commit ae49c5155a63d975b00003a64b238268167b96b7 Author: Po-Chuan Hsieh <sunpoet@FreeBSD.org> AuthorDate: 2023-07-31 16:39:11 +0000 Commit: Po-Chuan Hsieh <sunpoet@FreeBSD.org> CommitDate: 2023-07-31 16:42:10 +0000 www/py-adblock: Fix build with py-maturin 0.14.0+ ===> Building for py39-adblock-0.5.0_44 💥 maturin failed Caused by: The following metadata fields in `package.metadata.maturin` section of Cargo.toml are removed since maturin 0.14.0: classifier, requires-python, please set them in pyproject.toml as PEP 621 specifies. *** Error code 1 Stop. make: stopped in /usr/ports/www/py-adblock Approved by: portmgr (blanket) Obtained from: https://github.com/ArniDagur/python-adblock/commit/7597cd0b841a0ede22ff4cec6b4b91fb7d26a805 --- www/py-adblock/files/patch-maturin | 59 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) diff --git a/www/py-adblock/files/patch-maturin b/www/py-adblock/files/patch-maturin new file mode 100644 index 000000000000..a66468ec42b7 --- /dev/null +++ b/www/py-adblock/files/patch-maturin @@ -0,0 +1,59 @@ +Obtained from: https://github.com/ArniDagur/python-adblock/commit/7597cd0b841a0ede22ff4cec6b4b91fb7d26a805 + +--- Cargo.toml.orig 2021-06-26 20:50:00 UTC ++++ 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.6" +- + [profile.release] + debug = true + +--- pyproject.toml.orig 2021-06-26 20:50:00 UTC ++++ 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.6" ++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" +--- tests/test_metadata.py.orig 2021-06-26 20:50:00 UTC ++++ tests/test_metadata.py +@@ -52,10 +52,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() >= required_python