[SciPy-dev] How to avoid arch specific compiler flags in scipy_distutils?
![](https://secure.gravatar.com/avatar/e9718c61e5f3da247f137d3bf463bf2b.jpg?s=120&d=mm&r=g)
I've finally been doing some work updating the scipy & f2py debian packages and things are slowly progressing. The showstopper ATM, is the fact that the fortran sources are being compiled with architecture specific compiler flags ("-march=pentium4 -msse2 -msse ..."). I know that this is done automatically in scipy_distutils/gnufcompiler.py . Is there any non-intrusive way (i.e., from command line) to prevent that? José Fonseca
![](https://secure.gravatar.com/avatar/9b85a909fbfc71a3ea3275c7872e714d.jpg?s=120&d=mm&r=g)
On Wed, 11 Feb 2004, José Fonseca wrote:
I've finally been doing some work updating the scipy & f2py debian packages and things are slowly progressing.
Good to hear.
The showstopper ATM, is the fact that the fortran sources are being compiled with architecture specific compiler flags ("-march=pentium4 -msse2 -msse ..."). I know that this is done automatically in scipy_distutils/gnufcompiler.py . Is there any non-intrusive way (i.e., from command line) to prevent that?
Yes, there is. Use build_src branch of scipy_distutils (soon it will be merged into the HEAD branch): cd cvs/scipy/scipy_core/scipy_distutils/ cvs -z7 update -r build_src Then build scipy as follows python setup.py config_fc --noarch build Pearu
![](https://secure.gravatar.com/avatar/e9718c61e5f3da247f137d3bf463bf2b.jpg?s=120&d=mm&r=g)
Pearu, On Wed, 11 Feb 2004 12:20:18 -0600 (CST), Pearu Peterson wrote:
Yes, there is. Use build_src branch of scipy_distutils (soon it will be merged into the HEAD branch):
cd cvs/scipy/scipy_core/scipy_distutils/ cvs -z7 update -r build_src
Then build scipy as follows
python setup.py config_fc --noarch build
Thanks, this did the trick. The new packages on http://jrfonseca.dyndns.org/debian/ should now be sub-architecture independent. Strangely, now when I do "import scipy" I get a warning "No module named __cvs_version__", probably due to the branch merging, but I'm not very concerned about it since you say that branch will be soon be merged in the repository. These are the remaining lintian errors & warnings:
E: python2.3-scipy: wrong-path-for-python ./usr/lib/python2.3/site-packages/scipy/optimize/tests/test_zeros.py #!/usr/local/lib/python
E: python2.3-f2py: binary-without-manpage f2py2.3
E: python2.2-scipy: wrong-path-for-python ./usr/lib/python2.2/site-packages/scipy/optimize/tests/test_zeros.py #!/usr/local/lib/python
W: python2.2-scipy: unusual-interpreter ./usr/lib/python2.2/site-packages/scipy/special/tests/Test.py #!/usb/bin/env
E: python2.2-f2py: binary-without-manpage f2py2.2
E: python2.1-scipy: wrong-path-for-python ./usr/lib/python2.1/site-packages/scipy/optimize/tests/test_zeros.py #!/usr/local/lib/python
W: python2.1-scipy: unusual-interpreter ./usr/lib/python2.1/site-packages/scipy/special/tests/Test.py #!/usb/bin/env
E: python2.1-f2py: binary-without-manpage f2py2.1
If you don't mind commiting this patch below fixing the python binary paths, that would save me the trouble of patching-up afterwards: Index: Lib/optimize/tests/test_zeros.py =================================================================== RCS file: /home/cvsroot/world/scipy/Lib/optimize/tests/test_zeros.py,v retrieving revision 1.6 diff -u -r1.6 test_zeros.py --- Lib/optimize/tests/test_zeros.py 24 Oct 2003 15:15:48 -0000 1.6 +++ Lib/optimize/tests/test_zeros.py 12 Feb 2004 18:09:55 -0000 @@ -1,4 +1,4 @@ -#!/usr/local/lib/python +#!/usr/bin/env python import sys from scipy_test.testing import * Index: Lib/special/tests/Test.py =================================================================== RCS file: /home/cvsroot/world/scipy/Lib/special/tests/Test.py,v retrieving revision 1.3 diff -u -r1.3 Test.py --- Lib/special/tests/Test.py 7 Aug 2001 04:51:47 -0000 1.3 +++ Lib/special/tests/Test.py 12 Feb 2004 18:09:55 -0000 @@ -1,4 +1,4 @@ -#!/usb/bin/env python +#!/usr/bin/env python # import pickle import Numeric, cephes, RandomArray So, besides this, the remaining steps to get scipy in debian proper are: - write a manpage for f2py - wait 1-2 weeks for feedback of latest packages - get a Debian sponsor and address any concerns he may have It's much closer now than ever before (having chaco out of scipy also saved me from quite a few headaches). Jose Fonseca
![](https://secure.gravatar.com/avatar/9b85a909fbfc71a3ea3275c7872e714d.jpg?s=120&d=mm&r=g)
Hi José, On Thu, 12 Feb 2004, José Fonseca wrote:
On Wed, 11 Feb 2004 12:20:18 -0600 (CST), Pearu Peterson wrote:
Yes, there is. Use build_src branch of scipy_distutils (soon it will be merged into the HEAD branch):
cd cvs/scipy/scipy_core/scipy_distutils/ cvs -z7 update -r build_src
Then build scipy as follows
python setup.py config_fc --noarch build
Thanks, this did the trick. The new packages on http://jrfonseca.dyndns.org/debian/ should now be sub-architecture independent.
Strangely, now when I do "import scipy" I get a warning "No module named __cvs_version__", probably due to the branch merging, but I'm not very concerned about it since you say that branch will be soon be merged in the repository.
Yes, it turns out that whenever using branches, __cvs_version__ will not be available. Btw, the build_src branch is now in HEAD, so rm -rf scipy_distutils && cvs update -Pd is in order for whoever used build_src branch.
If you don't mind commiting this patch below fixing the python binary paths, that would save me the trouble of patching-up afterwards:
Done.
So, besides this, the remaining steps to get scipy in debian proper are: - write a manpage for f2py
Done in f2py CVS. Thanks, Pearu
![](https://secure.gravatar.com/avatar/e9718c61e5f3da247f137d3bf463bf2b.jpg?s=120&d=mm&r=g)
Pearu, On Thu, 12 Feb 2004 14:13:29 -0600 (CST), Pearu Peterson wrote: [...]
Btw, the build_src branch is now in HEAD, so
rm -rf scipy_distutils && cvs update -Pd
is in order for whoever used build_src branch.
If you don't mind commiting this patch below fixing the python binary paths, that would save me the trouble of patching-up afterwards:
Done.
So, besides this, the remaining steps to get scipy in debian proper are: - write a manpage for f2py
Done in f2py CVS.
Thanks for your tremendous help! The new packages in my repository no longer get any complaint from lintian. I'll now annouce them in the users list just to get some feedback before bugging a mentor. Regards, Jose Fonseca
participants (2)
-
José Fonseca
-
Pearu Peterson