From thinker@heaven.branda.to  Thu Dec 21 15:25:50 2006
Return-Path: <thinker@heaven.branda.to>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id D472016A403
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 21 Dec 2006 15:25:50 +0000 (UTC)
	(envelope-from thinker@heaven.branda.to)
Received: from heaven.branda.to (219-84-62-131-adsl-tpe.dynamic.so-net.net.tw [219.84.62.131])
	by mx1.freebsd.org (Postfix) with SMTP id A1D8D13C458
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 21 Dec 2006 15:25:49 +0000 (UTC)
	(envelope-from thinker@heaven.branda.to)
Received: (qmail 25307 invoked by uid 1000); 21 Dec 2006 14:59:05 -0000
Message-Id: <20061221145905.25306.qmail@heaven.branda.to>
Date: 21 Dec 2006 14:59:05 -0000
From: Aho K.F.Li <thinker@branda.to>
Reply-To: Aho K.F.Li <thinker@branda.to>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: py-num is broken with default installation
X-Send-Pr-Version: 3.113
X-GNATS-Notify: db@db.net

>Number:         107022
>Category:       ports
>Synopsis:       math/py-numpy is broken with default installation
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    db
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Dec 21 15:30:16 GMT 2006
>Closed-Date:    Wed Feb 21 18:24:16 GMT 2007
>Last-Modified:  Wed Feb 21 18:24:16 GMT 2007
>Originator:     Aho K.F. Li
>Release:        FreeBSD 7.0-CURRENT i386
>Organization:
Thinker
>Environment:
System: FreeBSD cowboy.branda.to 7.0-CURRENT FreeBSD 7.0-CURRENT #0: Sat Nov 4


	
>Description:
        Py-numpy is not work with default installation.  It causes by
        inconsistent between site.cfg, generated by port, and package
        auto-discovery of system_info.py.  The inconsistent is happen
        when alapack is installed before installing py-numpy.
        
>How-To-Repeat:
        install alapack
        install port of py-numpy
        run python & import numpy
        python yell a run-time error
>Fix:

        Copy following file into files/ .

	

--- patch-numpy-distutils-system_info.py begins here ---
--- numpy/distutils/system_info.py.orig	Mon Jul 31 00:08:48 2006
+++ numpy/distutils/system_info.py	Sun Dec 17 23:24:50 2006
@@ -855,6 +855,8 @@
         atlas_1 = None
         for d in lib_dirs:
             atlas = self.check_libs2(d,atlas_libs,[])
+            if atlas is not None:
+                atlas['libraries'].extend(['g2c', 'm', 'pthread'])
             lapack_atlas = self.check_libs2(d,['lapack_atlas'],[])
             if atlas is not None:
                 lib_dirs2 = [d] + self.combine_paths(d,['atlas*','ATLAS*'])
@@ -1183,8 +1185,9 @@
         atlas_version = None
         need_lapack = 0
         need_blas = 0
+        lapack_type = self.cp.get(self.section, 'lapack_type').strip()
         info = {}
-        if atlas_info:
+        if lapack_type == 'atlas' and atlas_info:
             version_info = atlas_info.copy()
             atlas_version = get_atlas_version(**version_info)
             if not atlas_info.has_key('define_macros'):
--- patch-numpy-distutils-system_info.py ends here ---

--- patch-site.cfg begins here ---
--- site.cfg.orig	Wed Aug 23 03:01:25 2006
+++ site.cfg	Sun Dec 17 23:25:51 2006
@@ -1,3 +1,6 @@
+[DEFAULT]
+lapack_type = blas
+
 [atlas]
 library_dirs = /usr/lib/atlas/3dnow/
 atlas_libs = lapack, blas
--- patch-site.cfg ends here ---

--- site.cfg begins here ---
[DEFAULT]
lapack_type = atlas

[atlas]
library_dirs = /usr/local/lib
atlas_libs = alapack_r, f77blas_r, cblas_r, atlas_r
--- site.cfg ends here ---


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->freebsd-python 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Thu Dec 21 20:31:29 UTC 2006 
Responsible-Changed-Why:  
freebsd-python@ wants to have py- PRs 

http://www.freebsd.org/cgi/query-pr.cgi?pr=107022 
State-Changed-From-To: open->feedback 
State-Changed-By: edwin 
State-Changed-When: Thu Dec 21 20:31:42 UTC 2006 
State-Changed-Why:  
Awaiting maintainers feedback 

http://www.freebsd.org/cgi/query-pr.cgi?pr=107022 
Responsible-Changed-From-To: freebsd-python->xride 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Tue Dec 26 12:35:16 UTC 2006 
Responsible-Changed-Why:  
With portmgr hat, reassign this one to xride, who has two other updates for 
this port pending from db@db.net, who I have now made the new maintainer. 
I hope xride doesn't mind too much :-) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=107022 
Responsible-Changed-From-To: xride->db 
Responsible-Changed-By: xride 
Responsible-Changed-When: Fri Jan 19 18:26:42 UTC 2007 
Responsible-Changed-Why:  
Diane (db) is now a committer herself 

http://www.freebsd.org/cgi/query-pr.cgi?pr=107022 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/107022: commit references a PR
Date: Fri,  9 Feb 2007 18:55:00 +0000 (UTC)

 db          2007-02-09 18:54:54 UTC
 
   FreeBSD ports repository
 
   Modified files:
     math/py-numpy        Makefile 
     math/py-numpy/files  patch-numpy-distutils-fcompiler-gnu.py 
                          patch-numpy-distutils-system_info.py 
                          site.cfg 
   Log:
   - finish g77 to gfortran conversion
   - change maintainer address to FreeBSD.org one
   - fold in changes suggested by [1]
   
   PR:             107022, 108807 (based on) [1]
   Submitted by:   thinker@heaven.branda.to [1]
   Approved by: ehaupt (mentor)
   
   Revision  Changes    Path
   1.8       +17 -3     ports/math/py-numpy/Makefile
   1.2       +11 -2     ports/math/py-numpy/files/patch-numpy-distutils-fcompiler-gnu.py
   1.4       +20 -1     ports/math/py-numpy/files/patch-numpy-distutils-system_info.py
   1.2       +9 -2      ports/math/py-numpy/files/site.cfg
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: feedback->closed 
State-Changed-By: db 
State-Changed-When: Wed Feb 21 18:23:21 UTC 2007 
State-Changed-Why:  
Somehow this did not get closed properly, patch fixing this problem 
has already been committed. 


http://www.freebsd.org/cgi/query-pr.cgi?pr=107022 
>Unformatted:
