Bug 195221 - graphics/py-gdal: ImportError: numpy.core.multiarray failed to import
Summary: graphics/py-gdal: ImportError: numpy.core.multiarray failed to import
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Po-Chuan Hsieh
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-11-20 14:02 UTC by Matthieu Volat
Modified: 2014-11-24 19:31 UTC (History)
0 users

See Also:
mazhe: maintainer-feedback? (sunpoet)


Attachments
Add fortran to USES (370 bytes, text/plain)
2014-11-20 14:02 UTC, Matthieu Volat
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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!