From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:41761) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hmPNE-00039U-22 for guix-patches@gnu.org; Sat, 13 Jul 2019 17:16:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hmPNC-0000ss-4a for guix-patches@gnu.org; Sat, 13 Jul 2019 17:16:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:34643) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hmPNB-0000sb-QC for guix-patches@gnu.org; Sat, 13 Jul 2019 17:16:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hmPNB-000774-Ix for guix-patches@gnu.org; Sat, 13 Jul 2019 17:16:01 -0400 Subject: [bug#36623] [PATCH] gnu: gdal: add python support Resent-Message-ID: References: <20190712213247.23250-1-arne_bab@web.de> <5E0BF317-99AC-43D9-9E30-1528A1A61DAA@lepiller.eu> From: Arne Babenhauserheide In-reply-to: <5E0BF317-99AC-43D9-9E30-1528A1A61DAA@lepiller.eu> Date: Sat, 13 Jul 2019 23:14:56 +0200 Message-ID: <87pnmdr60f.fsf@web.de> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Julien Lepiller Cc: 36623@debbugs.gnu.org --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Julien Lepiller writes: > Le 12 juillet 2019 23:32:47 GMT+02:00, Arne Babenhauserheide a =C3=A9crit : >>* gnu/packages/geo.scm (gdal): add python support >>--- >> gnu/packages/geo.scm | 29 +++++++++++++++++++++++++++-- >> 1 file changed, 27 insertions(+), 2 deletions(-) >> >>diff --git a/gnu/packages/geo.scm b/gnu/packages/geo.scm >>index 4cccd97643..3e2ec04b53 100644 >>--- a/gnu/packages/geo.scm >>+++ b/gnu/packages/geo.scm >>@@ -537,6 +537,8 @@ development.") >> (build-system gnu-build-system) >> (arguments >> `(#:tests? #f >>+ ;; validating runpath does not work yet for Python, so skip >>this phase. >>+ #:validate-runpath? #f >> #:configure-flags >> (let-syntax ((with (syntax-rules () >> ((_ option input) >>@@ -544,6 +546,10 @@ development.") >> (assoc-ref %build-inputs input)))))) >> (list >> ;; TODO: --with-pcidsk, --with-pcraster >>+ ;; Add $libdir to the RUNPATH of all the executables. >>+ (string-append "LDFLAGS=3D-Wl,-rpath=3D" %output "/apps/.libs= ") >>+ (string-append "LD_RUN_PATH=3D" %output "/apps/.libs") >>+ (string-append "LD_LIBRARY_PATH=3D" %output "/apps/.libs") >> (with "--with-freexl" "freexl") >> (with "--with-libjson-c" "json-c") >> (with "--with-png" "libpng") >>@@ -553,13 +559,27 @@ development.") >> (with "--with-libtiff" "libtiff") >> (with "--with-geotiff" "libgeotiff") >> (with "--with-libz" "zlib") >>- "--with-pcre")) >>+ "--with-pcre" >>+ "--with-python")) >> #:phases >> (modify-phases %standard-phases >> (add-before 'build 'fix-path >> (lambda _ >> (substitute* "frmts/mrf/mrf_band.cpp" >>- (("\"../zlib/zlib.h\"") ""))))))) >>+ (("\"../zlib/zlib.h\"") "")))) >>+ (add-after >>+ 'unpack 'patch-test-shebangs >>+ (lambda _ >>+ (substitute* '("apps/GNUmakefile") >>+ (("/bin/sh") (which "sh"))) >>+ #t)) >>+ (add-after >>+ 'unpack 'patch-test-shebangs >>+ (lambda _ >>+ (substitute* '("GDALmake.opt.in") >>+ (("LDFLAGS =3D @LDFLAGS@") (string-append "LDFLAGS=20= =20=20 >>=3D @LDFLAGS@ -Wl,-rpath=3D" %output "/apps -Wl,-rpath=3D" %output >>"/apps/.libs"))) >>+ #t) >>+ )))) > > Could you rename that phase to something like 'patch-rpath? Is it needed = since you already pass it to the configure? Renamed, see the new patch :-) I did not get this to work without it. >> (inputs >> `(("freexl" ,freexl) >> ("geos" ,geos) >>@@ -572,6 +592,11 @@ development.") >> ("libwebp" ,libwebp) >> ("pcre" ,pcre) >> ("zlib" ,zlib))) >>+ (native-inputs >>+ `(("pkg-config" ,pkg-config))) >>+ (propagated-inputs >>+ `(("python" ,python) >>+ ("python-setuptools" ,python-setuptools))) > > Is setuptools really necessary at runtime? Can we patch gdal so to embed = python's store path? I'd prefer not to propagate it. I=E2=80=99m not really sure why it is, but I did not get it working without. Activating Python-support was harder than I thought (but I need it working for a project on a deadline). >> (home-page "http://www.gdal.org/") >> (synopsis "Raster and vector geospatial data format library") >>(description "GDAL is a translator library for raster and vector >>geospatial >>-- >>2.22.0 > > Thank you! Thank you for reviewing! --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-gnu-gdal-add-python-support.patch Content-Transfer-Encoding: quoted-printable From=205f8b1dc1bb5ce7b061bcca10174f9330cf89696c Mon Sep 17 00:00:00 2001 From: Arne Babenhauserheide Date: Sat, 11 May 2019 15:16:22 +0200 Subject: [PATCH] gnu: gdal: add python support * gnu/packages/geo.scm (gdal): add python support =2D-- gnu/packages/geo.scm | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/gnu/packages/geo.scm b/gnu/packages/geo.scm index 4cccd97643..a6942d2a45 100644 =2D-- a/gnu/packages/geo.scm +++ b/gnu/packages/geo.scm @@ -537,6 +537,8 @@ development.") (build-system gnu-build-system) (arguments `(#:tests? #f + ;; validating runpath does not work yet for Python, so skip this ph= ase. + #:validate-runpath? #f #:configure-flags (let-syntax ((with (syntax-rules () ((_ option input) @@ -544,6 +546,10 @@ development.") (assoc-ref %build-inputs input= )))))) (list ;; TODO: --with-pcidsk, --with-pcraster + ;; Add $libdir to the RUNPATH of all the executables. + (string-append "LDFLAGS=3D-Wl,-rpath=3D" %output "/apps/.libs") + (string-append "LD_RUN_PATH=3D" %output "/apps/.libs") + (string-append "LD_LIBRARY_PATH=3D" %output "/apps/.libs") (with "--with-freexl" "freexl") (with "--with-libjson-c" "json-c") (with "--with-png" "libpng") @@ -553,13 +559,27 @@ development.") (with "--with-libtiff" "libtiff") (with "--with-geotiff" "libgeotiff") (with "--with-libz" "zlib") =2D "--with-pcre")) + "--with-pcre" + "--with-python")) #:phases (modify-phases %standard-phases (add-before 'build 'fix-path (lambda _ (substitute* "frmts/mrf/mrf_band.cpp" =2D (("\"../zlib/zlib.h\"") ""))))))) + (("\"../zlib/zlib.h\"") "")))) + (add-after + 'unpack 'patch-test-shebangs + (lambda _ + (substitute* '("apps/GNUmakefile") + (("/bin/sh") (which "sh"))) + #t)) + (add-after + 'unpack 'patch-rpath + (lambda _ + (substitute* '("GDALmake.opt.in") + (("LDFLAGS =3D @LDFLAGS@") (string-append "LDFLAGS = =3D @LDFLAGS@ -Wl,-rpath=3D" %output "/apps -Wl,-rpath=3D" %output "/apps/.= libs"))) + #t) + )))) (inputs `(("freexl" ,freexl) ("geos" ,geos) @@ -572,6 +592,11 @@ development.") ("libwebp" ,libwebp) ("pcre" ,pcre) ("zlib" ,zlib))) + (native-inputs + `(("pkg-config" ,pkg-config))) + (propagated-inputs + `(("python" ,python) + ("python-setuptools" ,python-setuptools))) (home-page "http://www.gdal.org/") (synopsis "Raster and vector geospatial data format library") (description "GDAL is a translator library for raster and vector geosp= atial =2D-=20 2.22.0 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Best wishes, Arne =2D-=20 Unpolitisch sein hei=C3=9Ft politisch sein ohne es zu merken --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEE801qEjXQSQPNItXAE++NRSQDw+sFAl0qSdQACgkQE++NRSQD w+v4wxAA1CZIrptd6O+YGtpCjmyrDuek1gEEQg+I3iQjuRwDacLGVE2wJp4gQbry j5T9C8+LgVeudfWYUXfe2YVn/ucwoT2PogUYMzEuqCF+iytLEy+J1L0hLf7v9R7Z nmDWl0gNl+U0ue7WpiPX0QHRiuxv/c+8u0Smw2GbKPoPM0uNX3+3lM05c2UqhZQd XnLo4hiomuA83Z/iqQvLonxpKquq8Do2a8EnzlAJ9kbaMzfkT8KSCl1cmkxfJScV I6N69zQ/+2KZPYsvxLfeBCnAq0eXbbwfhgy7g5ucHhZhLzeJg/yVPfntuvtneFXs Dpv7Uy86st9vaHS+dpny18ruUDgALgo1K8voOuK+9QHAnORdl+8RdF1Td7WG95CZ 85Se1/kPoiSB0Mry9ifZzThjvzKs8BhWJNcBDlxojZVT/Lryv2MjEmOb8EEIWi8/ esn6IIp9QMxaSeIIN9xnc2Fd1W4K4HYPMu7aurcHtfQySM/dWXKSqa0+Edp0PWON j81tqJiixNPO/E8J64rLIAt1XUXSncBCD5Jx8IEA02sPUiZqwScGNC+C4rL6awS3 ZtsjIT1dmeW45ajysfMnfZHGN+SsOhRJ3msrTDk1D2cPSA9FQY+jfdmb6EN8qYMr CIBrkpLhYuXz4pxT6ktSL9iO37Op8uOUuvhV0TquL+WWbHapQcmIswQBAQgAHRYh BN0ovebZh1yrzkqLHdzPDbMLwQVIBQJdKknUAAoJENzPDbMLwQVI1vkD/AyL9Y6I C4VjxluX/11LSk7ZdtzJmPaX3OPgXZVjSb0OKWUMXWRV6JxO+gx6YpmrViAN7lcy qA+f6uURZJpLNAKhK2Ui9Kil8XI63R9fwZIG5qS6Z+KXdHJWSWcVfDhDeRoEZhGc 5LSSaiLtfep5+hg5iBlXHQYT8INmJkGEI2v3 =vcoq -----END PGP SIGNATURE----- --==-=-=--