python3Packages.shapely: 1.8.2 -> 1.8.4

Fixes https://github.com/NixOS/nixpkgs/issues/185996 (!!)
where the tests were segfaulting on macOS/aarch64.

Probably fixes the django and other builds for a lot of the ecosystem.
This commit is contained in:
Jade Lovelace 2022-09-07 10:07:53 -07:00
parent 0446732359
commit 2b6c72e173

View File

@ -2,7 +2,6 @@
, stdenv
, buildPythonPackage
, fetchPypi
, fetchpatch
, substituteAll
, pythonOlder
, geos
@ -13,12 +12,12 @@
buildPythonPackage rec {
pname = "Shapely";
version = "1.8.2";
version = "1.8.4";
disabled = pythonOlder "3.6";
src = fetchPypi {
inherit pname version;
sha256 = "sha256-Vyr51QBv1eMhPjfuVIkSsDQfsmck1tyKTjlQwQGX67Y=";
sha256 = "sha256-oZXlHKr6IYKR8suqP+9p/TNTyT7EtlsqRyLEz0DDGYw=";
};
nativeBuildInputs = [
@ -44,20 +43,21 @@ buildPythonPackage rec {
libgeos_c = GEOS_LIBRARY_PATH;
libc = lib.optionalString (!stdenv.isDarwin) "${stdenv.cc.libc}/lib/libc${stdenv.hostPlatform.extensions.sharedLibrary}.6";
})
(fetchpatch {
name = "fix-tests-geos-3.11.patch";
url = "https://github.com/shapely/shapely/commit/21c8e8a7909e7fb3cce6daa5c5b8284ac927fcb0.patch";
includes = [ "tests/test_parallel_offset.py" ];
sha256 = "sha256-85c8NlmAzzfCgepe/411ug5Sq+665dFMb3ySaUt9Kew=";
})
];
preCheck = ''
rm -r shapely # prevent import of local shapely
'';
disabledTests = [
"test_collection"
disabledTests = lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [
# FIXME(lf-): these logging tests are broken, which is definitely our
# fault. I've tried figuring out the cause and failed.
#
# It is apparently some sandbox or no-sandbox related thing on macOS only
# though.
"test_error_handler_exception"
"test_error_handler"
"test_info_handler"
];
pythonImportsCheck = [ "shapely" ];