Skip to content

Commit

Permalink
python3Packages.shapely: 1.8.2 -> 1.8.4
Browse files Browse the repository at this point in the history
Fixes #185996 (!!)
where the tests were segfaulting on macOS/aarch64.

Probably fixes the django and other builds for a lot of the ecosystem.
  • Loading branch information
Jade Lovelace committed Sep 21, 2022
1 parent 0446732 commit 2b6c72e
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions pkgs/development/python-modules/shapely/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
, stdenv
, buildPythonPackage
, fetchPypi
, fetchpatch
, substituteAll
, pythonOlder
, geos
Expand All @@ -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 = [
Expand All @@ -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" ];
Expand Down

0 comments on commit 2b6c72e

Please sign in to comment.