python3Packages.adblock: 0.4.0 -> 0.4.4

master
Robert Schütz 2021-06-06 11:15:35 +02:00 committed by Jonathan Ringer
parent a15bd8e006
commit 69c5219cba
1 changed files with 19 additions and 8 deletions

View File

@ -3,7 +3,6 @@
, fetchFromGitHub
, buildPythonPackage
, rustPlatform
, pythonImportsCheckHook
, pkg-config
, openssl
, publicsuffix-list
@ -11,11 +10,14 @@
, libiconv
, CoreFoundation
, Security
, pytestCheckHook
, toml
, python
}:
buildPythonPackage rec {
pname = "adblock";
version = "0.4.0";
version = "0.4.4";
disabled = isPy27;
# Pypi only has binary releases
@ -23,18 +25,18 @@ buildPythonPackage rec {
owner = "ArniDagur";
repo = "python-adblock";
rev = version;
sha256 = "10d6ks2fyzbizq3kb69q478idj0h86k6ygjb6wl3zq3mf65ma4zg";
sha256 = "sha256-zNQ8zEpTLzyU5AnFBNpOGDJ02Ogu2+xl85LA+ia7Si4=";
};
cargoDeps = rustPlatform.fetchCargoTarball {
inherit src;
name = "${pname}-${version}";
hash = "sha256-gEFmj3/KvhvvsOK2nX2L1RUD4Wfp3nYzEzVnQZIsIDY=";
hash = "sha256-ajVZ0xPxC31hM1gQr3DC1HWdpIYBCSmqm0z2cflcClg=";
};
format = "pyproject";
nativeBuildInputs = [ pkg-config pythonImportsCheckHook ]
nativeBuildInputs = [ pkg-config ]
++ (with rustPlatform; [ cargoSetupHook maturinBuildHook ]);
buildInputs = [ openssl ]
@ -42,10 +44,19 @@ buildPythonPackage rec {
PSL_PATH = "${publicsuffix-list}/share/publicsuffix/public_suffix_list.dat";
# There are no rust tests
doCheck = false;
checkInputs = [ pytestCheckHook toml ];
pythonImportsCheck = [ "adblock" ];
preCheck = ''
# import from $out instead
rm -r adblock
'';
disabledTestPaths = [
# relies on directory removed above
"tests/test_typestubs.py"
];
pythonImportsCheck = [ "adblock" "adblock.adblock" ];
meta = with lib; {
description = "Python wrapper for Brave's adblocking library, which is written in Rust";