forked from pool/python-adblock
Accepting request 1074916 from devel:languages:python
- Update vendor tarball - Add python-adblock-maturin-0-14-compat.patch Allow building with newer maturin, which is pedantic about PEP 621 OBS-URL: https://build.opensuse.org/request/show/1074916 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-adblock?expand=0&rev=8
This commit is contained in:
5
_service
5
_service
@@ -1,4 +1,9 @@
|
||||
<services>
|
||||
<service name="cargo_vendor" mode="disabled">
|
||||
<param name="srcdir">python-adblock</param>
|
||||
<param name="compression">xz</param>
|
||||
<param name="update">true</param>
|
||||
</service>
|
||||
<service name="cargo_audit" mode="disabled">
|
||||
</service>
|
||||
</services>
|
||||
|
||||
5
cargo_config
Normal file
5
cargo_config
Normal file
@@ -0,0 +1,5 @@
|
||||
[source.crates-io]
|
||||
replace-with = "vendored-sources"
|
||||
|
||||
[source.vendored-sources]
|
||||
directory = "vendor"
|
||||
47
python-adblock-maturin-0-14-compat.patch
Normal file
47
python-adblock-maturin-0-14-compat.patch
Normal file
@@ -0,0 +1,47 @@
|
||||
diff -ru python-adblock-0.6.0/Cargo.toml python-adblock/Cargo.toml
|
||||
--- python-adblock-0.6.0/Cargo.toml 2022-07-18 00:57:45.000000000 +0200
|
||||
+++ python-adblock/Cargo.toml 2023-03-28 09:56:10.191554072 +0200
|
||||
@@ -9,15 +9,6 @@
|
||||
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 -ru python-adblock-0.6.0/pyproject.toml python-adblock/pyproject.toml
|
||||
--- python-adblock-0.6.0/pyproject.toml 2022-07-18 00:57:45.000000000 +0200
|
||||
+++ python-adblock/pyproject.toml 2023-03-28 09:56:06.079472470 +0200
|
||||
@@ -15,3 +15,12 @@
|
||||
[build-system]
|
||||
requires = ["maturin>=0.12,<0.13"]
|
||||
build-backend = "maturin"
|
||||
+
|
||||
+[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"
|
||||
diff -ru python-adblock-0.6.0/tests/test_metadata.py python-adblock/tests/test_metadata.py
|
||||
--- python-adblock-0.6.0/tests/test_metadata.py 2022-07-18 00:57:45.000000000 +0200
|
||||
+++ python-adblock/tests/test_metadata.py 2023-03-28 10:07:26.104151881 +0200
|
||||
@@ -57,7 +57,7 @@
|
||||
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:
|
||||
+ with open("pyproject.toml", encoding="utf-8") as f:
|
||||
cargo_toml = toml.loads(f.read())
|
||||
|
||||
required_python = cargo_toml["package"]["metadata"]["maturin"]["requires-python"]
|
||||
@@ -1,3 +1,11 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Mar 28 08:09:55 UTC 2023 - Mia Herkt <mia@0x0.st>
|
||||
|
||||
- Update vendor tarball
|
||||
- Add python-adblock-maturin-0-14-compat.patch
|
||||
Allow building with newer maturin, which is pedantic about
|
||||
PEP 621
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Jul 24 16:35:11 UTC 2022 - Mia Herkt <mia@0x0.st>
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package python-adblock
|
||||
#
|
||||
# Copyright (c) 2022 SUSE LLC
|
||||
# Copyright (c) 2023 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -17,7 +17,6 @@
|
||||
|
||||
|
||||
%define skip_python36 1
|
||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||
Name: python-adblock
|
||||
Version: 0.6.0
|
||||
Release: 0
|
||||
@@ -26,6 +25,9 @@ License: Apache-2.0 OR MIT
|
||||
URL: https://pypi.org/project/adblock/
|
||||
Source: https://github.com/ArniDagur/python-adblock/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
||||
Source1: vendor.tar.xz
|
||||
Source2: cargo_config
|
||||
# PATCH-FIX-OPENSUSE allow building with newer maturin, which is pedantic about PEP 621
|
||||
Patch0: python-adblock-maturin-0-14-compat.patch
|
||||
BuildRequires: %{python_module maturin}
|
||||
BuildRequires: %{python_module pip}
|
||||
BuildRequires: %{python_module pytest}
|
||||
@@ -41,11 +43,11 @@ ExclusiveArch: %{rust_arches}
|
||||
Python wrapper for Brave's adblocking library.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%autosetup -a1 -p1
|
||||
# build flavor-specific versions -- otherwise wheels will not work
|
||||
sed -i 's/"abi3-py37", //' Cargo.toml
|
||||
|
||||
tar xf %{SOURCE1}
|
||||
mkdir .cargo
|
||||
cp %{SOURCE2} .cargo/config
|
||||
|
||||
%build
|
||||
%pyproject_wheel
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:fff6bf96ec40e98000f8008e8857780600e8d540fb0e548ff67abf9e743e3cb1
|
||||
size 13142976
|
||||
oid sha256:dd57f3f9310be89f2abe8c1db1caa87cc454dd6149b6e1b0cbb16a1a8f29e85e
|
||||
size 12972884
|
||||
|
||||
Reference in New Issue
Block a user