[numpy] Update to 1.6.0b1 Build python3 module with python3 Add patch from upstream to fix build time impor

Orion Poplawski orion at fedoraproject.org
Fri Apr 1 14:58:24 UTC 2011


commit 81d563effef16e85c771dde87421d467a73e6510
Author: Orion Poplawski <orion at cora.nwra.com>
Date:   Fri Apr 1 08:56:44 2011 -0600

    Update to 1.6.0b1
    Build python3  module with python3
    Add patch from upstream to fix build time import error

 .gitignore                 |    1 +
 numpy-1.6.0b1-import.patch |   47 ++++++++++++++++++++++++++++++++++++++++++++
 numpy.spec                 |   20 ++++++++++++++----
 sources                    |    2 +-
 4 files changed, 64 insertions(+), 6 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 99accc4..d547472 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
 numpy-1.4.1.tar.gz
 /numpy-1.5.1rc1.tar.gz
 /numpy-1.5.1.tar.gz
+/numpy-1.6.0b1.tar.gz
diff --git a/numpy-1.6.0b1-import.patch b/numpy-1.6.0b1-import.patch
new file mode 100644
index 0000000..e453351
--- /dev/null
+++ b/numpy-1.6.0b1-import.patch
@@ -0,0 +1,47 @@
+diff --git a/setup.py b/setup.py
+index 14e2d6f..74add2e 100755
+--- a/setup.py
++++ b/setup.py
+@@ -94,19 +94,11 @@ if os.path.exists('MANIFEST'): os.remove('MANIFEST')
+ # a lot more robust than what was previously being used.
+ builtins.__NUMPY_SETUP__ = True
+ 
+-# Construct full version info. Needs to be in setup.py namespace, otherwise it
+-# can't be accessed from pavement.py at build time.
++# Full version info needs to be in setup.py namespace, otherwise it
++# can't be accessed from pavement.py at build time. Adding the git rev number
++# needs to be done inside write_version_py() however, otherwise the import of
++# numpy.version messes up the build under Python 3.
+ FULLVERSION = VERSION
+-if os.path.exists('.git'):
+-    GIT_REVISION = git_version()
+-elif os.path.exists('numpy/version.py'):
+-    # must be a source distribution, use existing version file
+-    from numpy.version import git_revision as GIT_REVISION
+-else:
+-    GIT_REVISION = "Unknown"
+-
+-if not ISRELEASED:
+-    FULLVERSION += '.dev-' + GIT_REVISION[:7]
+ 
+ def write_version_py(filename='numpy/version.py'):
+     cnt = """
+@@ -120,6 +112,18 @@ release = %(isrelease)s
+ if not release:
+     version = full_version
+ """
++    FULLVERSION = VERSION
++    if os.path.exists('.git'):
++        GIT_REVISION = git_version()
++    elif os.path.exists('numpy/version.py'):
++        # must be a source distribution, use existing version file
++        from numpy.version import git_revision as GIT_REVISION
++    else:
++        GIT_REVISION = "Unknown"
++
++    if not ISRELEASED:
++        FULLVERSION += '.dev-' + GIT_REVISION[:7]
++
+     a = open(filename, 'w')
+     try:
+         a.write(cnt % {'version': VERSION,
diff --git a/numpy.spec b/numpy.spec
index 6835d11..019477b 100644
--- a/numpy.spec
+++ b/numpy.spec
@@ -5,11 +5,11 @@
 %endif
 
 #uncomment next line for a release candidate or a beta
-#global relc rc1
+%global relc b1
 
 Name:           numpy
-Version:        1.5.1
-Release:        1%{?dist}
+Version:        1.6.0
+Release:        0.1.b1%{?dist}
 Epoch:		1
 Summary:        A fast multidimensional array facility for Python
 
@@ -17,6 +17,8 @@ Group:          Development/Languages
 License:        BSD
 URL:            http://numeric.scipy.org/
 Source0:        http://downloads.sourceforge.net/numpy/%{name}-%{version}%{?relc}.tar.gz
+# Patch https://github.com/rgommers/numpy/commit/a9fb1be2 to fix import errors
+Patch0:         numpy-1.6.0b1-import.patch
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
@@ -83,6 +85,7 @@ This package includes a version of f2py that works properly with NumPy.
 
 %prep
 %setup -q -n %{name}-%{version}%{?relc}
+%patch0 -p1 -b .import
 
 %if 0%{?with_python3}
 rm -rf %{py3dir}
@@ -94,7 +97,7 @@ cp -a . %{py3dir}
 pushd %{py3dir}
 env ATLAS=%{_libdir} FFTW=%{_libdir} BLAS=%{_libdir} \
     LAPACK=%{_libdir} CFLAGS="%{optflags}" \
-    %{__python} setup.py build
+    %{__python3} setup.py build
 popd
 %endif # with _python3
 
@@ -158,6 +161,9 @@ rm -f %{buildroot}%{python_sitearch}/%{name}/README.txt
 rm -f %{buildroot}%{python_sitearch}/%{name}/THANKS.txt
 rm -f %{buildroot}%{python_sitearch}/%{name}/site.cfg.example
 
+# Incorrectly installs some docs here
+rm -r %{buildroot}%{python_sitearch}/doc
+
 %check
 # doc/io.py conflicts with the regular io module causing
 # AttributeError: 'module' object has no attribute 'BufferedIOBase' in tests
@@ -202,7 +208,6 @@ rm -rf %{buildroot}
 %{python_sitearch}/%{name}/random
 %{python_sitearch}/%{name}/testing
 %{python_sitearch}/%{name}/tests
-%{python_sitearch}/%{name}/tools
 %{python_sitearch}/%{name}/compat
 %{python_sitearch}/%{name}/matrixlib
 %{python_sitearch}/%{name}/polynomial
@@ -249,6 +254,11 @@ rm -rf %{buildroot}
 
 
 %changelog
+* Thu Mar 31 2011 Orion Poplawski <orion at cora.nwra.com> - 1:1.6.0-0.1.b1
+- Update to 1.6.0b1
+- Build python3  module with python3
+- Add patch from upstream to fix build time import error
+
 * Wed Mar 30 2011 Orion Poplawski <orion at cora.nwra.com> - 1:1.5.1-1
 - Update to 1.5.1 final
 
diff --git a/sources b/sources
index e524293..ee61ad8 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-376ef150df41b5353944ab742145352d  numpy-1.5.1.tar.gz
+aeab5881974aac595b87a848c0c6344a  numpy-1.6.0b1.tar.gz


More information about the scm-commits mailing list