mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-10-01 10:07:42 +03:00
python311Packages.protobuf: fix tests
This commit is contained in:
parent
09091c7521
commit
5b90cec99c
@ -3,6 +3,8 @@
|
|||||||
, buildPythonPackage
|
, buildPythonPackage
|
||||||
, protobuf
|
, protobuf
|
||||||
, isPyPy
|
, isPyPy
|
||||||
|
, fetchpatch
|
||||||
|
, pythonAtLeast
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
@ -23,6 +25,15 @@ buildPythonPackage {
|
|||||||
|
|
||||||
sourceRoot = "source/python";
|
sourceRoot = "source/python";
|
||||||
|
|
||||||
|
patches = lib.optionals (pythonAtLeast "3.11") [
|
||||||
|
(fetchpatch {
|
||||||
|
url = "https://github.com/protocolbuffers/protobuf/commit/da973aff2adab60a9e516d3202c111dbdde1a50f.patch";
|
||||||
|
stripLen = 2;
|
||||||
|
extraPrefix = "";
|
||||||
|
hash = "sha256-a/12C6yIe1tEKjsMxcfDAQ4JHolA8CzkN7sNG8ZspPs=";
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
prePatch = ''
|
prePatch = ''
|
||||||
if [[ "$(<../version.json)" != *'"python": "'"$version"'"'* ]]; then
|
if [[ "$(<../version.json)" != *'"python": "'"$version"'"'* ]]; then
|
||||||
echo "Python library version mismatch. Derivation version: $version, actual: $(<../version.json)"
|
echo "Python library version mismatch. Derivation version: $version, actual: $(<../version.json)"
|
||||||
|
Loading…
Reference in New Issue
Block a user