Update to 1.6.0b1

Build python3  module with python3
Add patch from upstream to fix build time import error
This commit is contained in:
Orion Poplawski 2011-04-01 08:56:44 -06:00
parent 6254c09b5c
commit 81d563effe
4 changed files with 64 additions and 6 deletions

1
.gitignore vendored
View File

@ -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

View File

@ -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,

View File

@ -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@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@cora.nwra.com> - 1:1.5.1-1
- Update to 1.5.1 final

View File

@ -1 +1 @@
376ef150df41b5353944ab742145352d numpy-1.5.1.tar.gz
aeab5881974aac595b87a848c0c6344a numpy-1.6.0b1.tar.gz