mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-15 05:59:17 +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,
|
buildPythonPackage,
|
||||||
pythonOlder,
|
pythonOlder,
|
||||||
cffi,
|
cffi,
|
||||||
|
# overriden as pkgs.brotli
|
||||||
brotli,
|
brotli,
|
||||||
|
setuptools,
|
||||||
|
pytestCheckHook,
|
||||||
|
hypothesis,
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "brotlicffi";
|
pname = "brotlicffi";
|
||||||
version = "1.1.0.0";
|
version = "1.1.0.0";
|
||||||
format = "setuptools";
|
pyproject = true;
|
||||||
disabled = pythonOlder "3.7";
|
disabled = pythonOlder "3.7";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "python-hyper";
|
owner = "python-hyper";
|
||||||
repo = pname;
|
repo = "brotlicffi";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "sha256-oW4y1WBJ7+4XwNwwSSR0qUqN03cZYXUYQ6EAwce9dzI=";
|
sha256 = "sha256-oW4y1WBJ7+4XwNwwSSR0qUqN03cZYXUYQ6EAwce9dzI=";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
build-system = [ setuptools ];
|
||||||
|
|
||||||
buildInputs = [ brotli ];
|
buildInputs = [ brotli ];
|
||||||
|
|
||||||
propagatedNativeBuildInputs = [ cffi ];
|
propagatedNativeBuildInputs = [ cffi ];
|
||||||
|
|
||||||
propagatedBuildInputs = [ cffi ];
|
dependencies = [ cffi ];
|
||||||
|
|
||||||
preBuild = ''
|
preBuild = ''
|
||||||
export USE_SHARED_BROTLI=1
|
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;
|
doCheck = false;
|
||||||
|
|
||||||
|
pytestFlagsArray = [ "test/" ];
|
||||||
|
|
||||||
pythonImportsCheck = [ "brotlicffi" ];
|
pythonImportsCheck = [ "brotlicffi" ];
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue