Bug 195221

Summary: graphics/py-gdal: ImportError: numpy.core.multiarray failed to import
Product: Ports & Packages Reporter: Matthieu Volat <mazhe>
Component: Individual Port(s)Assignee: Po-Chuan Hsieh <sunpoet>
Status: Closed FIXED    
Severity: Affects Only Me Flags: mazhe: maintainer-feedback? (sunpoet)
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
Add fortran to USES none

Description Matthieu Volat 2014-11-20 14:02:07 UTC
Created attachment 149641 [details]
Add fortran to USES

As py-gdal scripts can use numpy for their ends, the Makefile shoud have fortran in USES (because, sadly, numpy uses it) or else scripts may fail to import stuff, for example, with gdal_calc.py:

% gdal_calc.py -h
ImportError: numpy.core.multiarray failed to import
ImportError: numpy.core.multiarray failed to import
Traceback (most recent call last):
  File "/usr/local/bin/gdal_calc.py", line 50, in <module>
    from gdalnumeric import *
  File "/usr/local/lib/python2.7/site-packages/gdalnumeric.py", line 5, in <module>
    from osgeo.gdal_array import *
  File "/usr/local/lib/python2.7/site-packages/osgeo/gdal_array.py", line 25, in <module>
    _gdal_array = swig_import_helper()
  File "/usr/local/lib/python2.7/site-packages/osgeo/gdal_array.py", line 21, in swig_import_helper
    _mod = imp.load_module('_gdal_array', fp, pathname, description)
ImportError: numpy.core.multiarray failed to import

Attached patch do so.
Comment 1 Bugzilla Automation freebsd_committer freebsd_triage 2014-11-20 14:02:07 UTC
Auto-assigned to maintainer sunpoet@FreeBSD.org
Comment 2 commit-hook freebsd_committer freebsd_triage 2014-11-24 18:30:43 UTC
A commit references this bug:

Author: sunpoet
Date: Mon Nov 24 18:30:03 UTC 2014
New revision: 373303
URL: https://svnweb.freebsd.org/changeset/ports/373303

Log:
  - Fix numpy import

  PR:		ports/195221
  Submitted by:	Matthieu Volat <mazhe@alkumuna.eu>

Changes:
  head/graphics/py-gdal/Makefile
Comment 3 Po-Chuan Hsieh freebsd_committer freebsd_triage 2014-11-24 19:31:26 UTC
Committed. Thanks!