mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-11 20:25:32 +03:00
python3Packages.brotlicffi: modernize
This commit is contained in:
parent
58d5a15620
commit
2d0bfdc3ce
1 changed files with 17 additions and 4 deletions
|
@ -4,35 +4,48 @@
|
|||
buildPythonPackage,
|
||||
pythonOlder,
|
||||
cffi,
|
||||
# overriden as pkgs.brotli
|
||||
brotli,
|
||||
setuptools,
|
||||
pytestCheckHook,
|
||||
hypothesis,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "brotlicffi";
|
||||
version = "1.1.0.0";
|
||||
format = "setuptools";
|
||||
pyproject = true;
|
||||
disabled = pythonOlder "3.7";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "python-hyper";
|
||||
repo = pname;
|
||||
repo = "brotlicffi";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-oW4y1WBJ7+4XwNwwSSR0qUqN03cZYXUYQ6EAwce9dzI=";
|
||||
};
|
||||
|
||||
build-system = [ setuptools ];
|
||||
|
||||
buildInputs = [ brotli ];
|
||||
|
||||
propagatedNativeBuildInputs = [ cffi ];
|
||||
|
||||
propagatedBuildInputs = [ cffi ];
|
||||
dependencies = [ cffi ];
|
||||
|
||||
preBuild = ''
|
||||
export USE_SHARED_BROTLI=1
|
||||
'';
|
||||
|
||||
# Test data is not available, only when using libbrotli git checkout
|
||||
nativeCheckInputs = [
|
||||
pytestCheckHook
|
||||
hypothesis
|
||||
];
|
||||
|
||||
# Test data is only available from libbrotli git checkout, not brotli.src
|
||||
doCheck = false;
|
||||
|
||||
pytestFlagsArray = [ "test/" ];
|
||||
|
||||
pythonImportsCheck = [ "brotlicffi" ];
|
||||
|
||||
meta = with lib; {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue