Merge pull request #210914 from wegank/protobuf-darwin
python311Packages.protobuf: fix tests
This commit is contained in:
commit
6af676a9a0
|
@ -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 a new issue