mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-17 06:06:13 +03:00
gdal: unbreak the python lib
This commit is contained in:
parent
165456bba2
commit
1645795c53
@ -13,6 +13,12 @@ composableDerivation.composableDerivation {} (fixed: rec {
|
||||
|
||||
buildInputs = [ unzip libjpeg libtiff libpng python pythonPackages.numpy proj openssl ];
|
||||
|
||||
patches = [
|
||||
# This ensures that the python package is installed into gdal's prefix,
|
||||
# rather than trying to install into python's prefix.
|
||||
./python.patch
|
||||
];
|
||||
|
||||
# Don't use optimization for gcc >= 4.3. That's said to be causing segfaults.
|
||||
# Unset CC and CXX as they confuse libtool.
|
||||
preConfigure = "export CFLAGS=-O0 CXXFLAGS=-O0; unset CC CXX";
|
||||
@ -31,12 +37,23 @@ composableDerivation.composableDerivation {} (fixed: rec {
|
||||
"--with-geos=${geos}/bin/geos-config"# optional
|
||||
];
|
||||
|
||||
# Prevent this:
|
||||
#
|
||||
# Checking .pth file support in /nix/store/xkrmb8xnvqxzjwsdmasqmsdh1a5y2y99-gdal-1.11.2/lib/python2.7/site-packages/
|
||||
# /nix/store/pbi1lgank10fy0xpjckbdpgacqw34dsz-python-2.7.9/bin/python -E -c pass
|
||||
# TEST FAILED: /nix/store/xkrmb8xnvqxzjwsdmasqmsdh1a5y2y99-gdal-1.11.2/lib/python2.7/site-packages/ does NOT support .pth files
|
||||
# error: bad install directory or PYTHONPATH
|
||||
preBuild = ''
|
||||
pythonInstallDir=$out/lib/${python.libPrefix}/site-packages
|
||||
mkdir -p $pythonInstallDir
|
||||
export PYTHONPATH=''${PYTHONPATH:+''${PYTHONPATH}:}$pythonInstallDir
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Translator library for raster geospatial data formats";
|
||||
homepage = http://www.gdal.org/;
|
||||
license = stdenv.lib.licenses.mit;
|
||||
maintainers = [ stdenv.lib.maintainers.marcweber ];
|
||||
platforms = stdenv.lib.platforms.linux;
|
||||
broken = true; # http://hydra.nixos.org/build/21344907/nixlog/1/raw
|
||||
};
|
||||
})
|
||||
|
17
pkgs/development/libraries/gdal/python.patch
Normal file
17
pkgs/development/libraries/gdal/python.patch
Normal file
@ -0,0 +1,17 @@
|
||||
diff --git a/swig/python/GNUmakefile.old b/swig/python/GNUmakefile
|
||||
index b4d5e90..2160b83 100644
|
||||
--- a/swig/python/GNUmakefile
|
||||
+++ b/swig/python/GNUmakefile
|
||||
@@ -67,11 +67,7 @@ egg:
|
||||
|
||||
install:
|
||||
|
||||
-ifeq ($(PY_HAVE_SETUPTOOLS),1)
|
||||
- $(PYTHON) setup.py install
|
||||
-else
|
||||
$(PYTHON) setup.py install --prefix=$(DESTDIR)$(prefix)
|
||||
-endif
|
||||
|
||||
for f in $(SCRIPTS) ; do $(INSTALL) ./scripts/$$f $(DESTDIR)$(INST_BIN) ; done
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user