Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 439710 - sci-libs/gdal-1.9.1 does not build or install library for the dev-lang/python-3*
Summary: sci-libs/gdal-1.9.1 does not build or install library for the dev-lang/python-3*
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Sci-geo Project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-26 06:24 UTC by John (EBo) David
Modified: 2012-12-27 23:51 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
required emerge build info (emerge_info,4.78 KB, text/plain)
2012-10-26 06:24 UTC, John (EBo) David
Details

Note You need to log in before you can comment on or make changes to this bug.
Description John (EBo) David 2012-10-26 06:24:50 UTC
Created attachment 327448 [details]
required emerge build info

When emergeing sci-libs/gdal-1.9.1, it installs the library v2.7 in /usr/lib/python2.7/site-packages/ but not install python3.2 (which is the current active version).  Running python-updater does not fix the problem either.  

Suggestions?

===========

# eselect python list
Available Python interpreters:
  [1]   python2.7
  [2]   python3.2 *

Info file attached
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2012-10-26 16:47:04 UTC
Maybe it simply isn't supported?

PYTHON_DEPEND="python? 2:2.6"
Comment 2 John (EBo) David 2012-10-26 17:31:32 UTC
I installed it by hand on my Laptop (running 3.4.0-gentoo, python3.2, and works after a couple of months testing), and there are plenty of evedence on the net that people are using GDAL in the whild with Python3.

I'll try hacking the python version dependencies later this weekend.
Comment 3 John (EBo) David 2012-10-26 20:08:26 UTC
ok... I did a quick check.  By removign "python_set_active_version 2" from the the pkg_setup, and set PYTHON_DEPEND="python? 2:2.6 3:3.2".  This installed into python3, but not python2.  Since I only have moderate experiance with python, I will have to play around to get the library to install in all the python versions available, but I can say from experience that GDAL does work with Python-3.2.

I will play with this some more over the weekend.  If anyone can point me to an example of a package which installs across multiple language versions, please let me know...
Comment 4 Justin Lecher (RETIRED) gentoo-dev 2012-11-14 20:40:59 UTC
Dependencies
Python 2.X (and 3.X since GDAL 1.7.0). Python 2 versions known to work range from 2.3 to 2.7.


So it should be fine
Comment 5 John (EBo) David 2012-11-14 21:13:06 UTC
These are the changes I did to make it work on my machines:

========== cut ============
--- /usr/portage/sci-libs/gdal/gdal-1.9.1.ebuild        2012-08-10 01:31:28.000000000 -0500
+++ gdal-1.9.1-r12.ebuild       2012-10-27 17:05:13.917393571 -0500
@@ -6,7 +6,7 @@
 
 WANT_AUTOCONF="2.5"
 
-PYTHON_DEPEND="python? 2:2.6"
+PYTHON_DEPEND="python? 2:2.6 3:3.2"
 
 inherit autotools eutils libtool perl-module python toolchain-funcs java-pkg-opt-2
 
@@ -74,7 +74,7 @@
 
 pkg_setup() {
        if use python; then
-               python_set_active_version 2
+               #python_set_active_version 2
                python_pkg_setup
        fi
 }
@@ -122,6 +122,9 @@
 
        epatch "${FILESDIR}"/${P}-poppler-0.20.1.patch
 
+       # Update for zlib header changes (see bug #383569)
+       epatch "${FILESDIR}"/mpi.patch
+
        # autoheader fail
 #      eaclocal
 #      eautoconf
========== cut ============

might need to modify PYTHON_DEPEND slightly, but now it compiles and installs for both python2 and 3.

  EBo --
Comment 6 Justin Lecher (RETIRED) gentoo-dev 2012-12-26 13:37:01 UTC
+*gdal-1.9.2 (26 Dec 2012)
+
+  26 Dec 2012; Justin Lecher <jlec@gentoo.org> +gdal-1.9.2.ebuild,
+  metadata.xml:
+  Version Bump, #440716; Respect AR and RANLIB, #444034; do not restrict python
+  to version 2*, #439710; correct dep for USE=pdf and pododof, #433790; respect
+  LDFLAGS with USE=perl, #332101
+
Comment 7 John (EBo) David 2012-12-26 14:34:06 UTC
I've hunted around and do not see any posted eupdated ebuilds.  Will it be released in the main tree, or should I grab it from some place.

Thanks for sorting this out.
Comment 8 Justin Lecher (RETIRED) gentoo-dev 2012-12-26 14:46:11 UTC
(In reply to comment #7)
> I've hunted around and do not see any posted eupdated ebuilds.  Will it be
> released in the main tree, or should I grab it from some place.
> 
> Thanks for sorting this out.

wait some hours and sync your tree.
Comment 9 John (EBo) David 2012-12-27 23:51:27 UTC
gdal-1.9.2 now only builds for which version is currently esellected:

# eselect python list
Available Python interpreters:
  [1]   python2.7
  [2]   python3.2 *

builds gdal in /usr/lib/python3.2

and 

# eselect python set python2.7
# eselect python list
Available Python interpreters:
  [1]   python2.7 *
  [2]   python3.2

builds gdal in /usr/lib/python2.7 and not for all versions of python installed in the system.

I would normally try to come up with some fix, but I am sick as a dog with the nasty cold that is going around.  So I'm back off to bed.