treewide: Use *Platform.extensions
This commit is contained in:
@@ -7,12 +7,12 @@
|
||||
, psutil
|
||||
, memory_profiler
|
||||
, pytest_xdist
|
||||
, sharedLibraryExtension
|
||||
}:
|
||||
|
||||
let
|
||||
magick_wand_library = "${imagemagick}/lib/libMagickWand-6.Q16${sharedLibraryExtension}";
|
||||
imagemagick_library = "${imagemagick}/lib/libMagickCore-6.Q16${sharedLibraryExtension}";
|
||||
soext = stdenv.hostPlatform.extensions.sharedLibrary;
|
||||
magick_wand_library = "${imagemagick}/lib/libMagickWand-6.Q16${soext}";
|
||||
imagemagick_library = "${imagemagick}/lib/libMagickCore-6.Q16${soext}";
|
||||
in buildPythonPackage rec {
|
||||
pname = "Wand";
|
||||
version = "0.4.4";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{ stdenv, buildPythonPackage, fetchPypi
|
||||
, geos, glibcLocales, pytest, cython, sharedLibraryExtension
|
||||
, geos, glibcLocales, pytest, cython
|
||||
, numpy
|
||||
}:
|
||||
|
||||
@@ -26,7 +26,7 @@ buildPythonPackage rec {
|
||||
patchPhase = let
|
||||
libc = if stdenv.isDarwin then "libc.dylib" else "libc.so.6";
|
||||
in ''
|
||||
sed -i "s|_lgeos = load_dll('geos_c', fallbacks=.*)|_lgeos = load_dll('geos_c', fallbacks=['${geos}/lib/libgeos_c${sharedLibraryExtension}'])|" shapely/geos.py
|
||||
sed -i "s|_lgeos = load_dll('geos_c', fallbacks=.*)|_lgeos = load_dll('geos_c', fallbacks=['${geos}/lib/libgeos_c${stdenv.hostPlatform.extensions.sharedLibrary}'])|" shapely/geos.py
|
||||
sed -i "s|free = load_dll('c').free|free = load_dll('c', fallbacks=['${stdenv.cc.libc}/lib/${stdenv.cc.libc}']).free|" shapely/geos.py
|
||||
'';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user