[SCM] Packaging for numexpr branch, master, updated. debian/2.0.1-2-17-gf0bed27

Antonio Valentino antonio.valentino at tiscali.it
Sat Apr 27 16:37:32 UTC 2013


The following commit has been merged in the master branch:
commit b42407062a0224b55611f763627cddebb1619507
Author: Antonio Valentino <antonio.valentino at tiscali.it>
Date:   Sat Apr 27 11:00:36 2013 +0000

    New packages for Python 3

diff --git a/debian/changelog b/debian/changelog
index 046c86a..ccebf64 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -7,6 +7,7 @@ numexpr (2.1-1) UNRELEASED; urgency=low
   * Refresh remaining patches
   * Standards version bumped to 3.9.4 (no change)
   * Compat set to 9
+  * New packages for python3 and python3-dbg (Closes: #683954)
   * Re-enable unittests at build time on sparc
 
  -- Antonio Valentino <antonio.valentino at tiscali.it>  Sat, 27 Apr 2013 10:32:31 +0000
diff --git a/debian/control b/debian/control
index 32621eb..b186fd6 100644
--- a/debian/control
+++ b/debian/control
@@ -5,12 +5,18 @@ Uploaders: Wen Heping <wenheping at gmail.com>,
            Yaroslav Halchenko <debian at onerussian.com>
 Section: python
 Priority: optional
+X-Python-Version: >= 2.6
+X-Python3-Version: >= 3.2
 Build-Depends: debhelper (>= 9.0.0~),
                python-all-dev (>= 2.6.6-3~),
                python-all-dbg (>= 2.6.6-3~),
+               python3-all-dev,
+               python3-all-dbg,
                python-setuptools,
                python-numpy (>= 1:1.6.0),
-               python-numpy-dbg
+               python-numpy-dbg,
+               python3-numpy,
+               python3-numpy-dbg
 Standards-Version: 3.9.4
 Vcs-Browser: http://anonscm.debian.org/gitweb/?p=debian-science/packages/numexpr.git
 Vcs-Git: git://anonscm.debian.org/debian-science/packages/numexpr.git
@@ -28,6 +34,8 @@ Description: Fast numerical array expression evaluator for Python and NumPy
  Python code on the fly. It's the next best thing to writing the
  expression in C and compiling it with a specialized just-in-time
  (JIT) compiler, i.e. it does not require a compiler at runtime.
+ .
+ This is the Python 2 version of the package.
 
 Package: python-numexpr-dbg
 Architecture: any
@@ -49,4 +57,43 @@ Description: Fast numerical array expression evaluator for Python and NumPy (deb
  .
  This package contains the extension built for the Python debug
  interpreter.
+ .
+ This package contains the extension built for the Python 2 debug interpreter.
+
+Package: python3-numexpr
+Architecture: any
+Depends: ${python3:Depends},
+         ${shlibs:Depends},
+         ${misc:Depends}
+Description: Fast numerical array expression evaluator for Python 3 and NumPy
+ Numexpr package evaluates multiple-operator array expressions many
+ times faster than NumPy can. It accepts the expression as a string,
+ analyzes it, rewrites it more efficiently, and compiles it to faster
+ Python code on the fly. It's the next best thing to writing the
+ expression in C and compiling it with a specialized just-in-time
+ (JIT) compiler, i.e. it does not require a compiler at runtime.
+ .
+ This package contains pyepr for Python 3.
 
+Package: python3-numexpr-dbg
+Architecture: any
+Section: debug
+Priority: extra
+Depends: ${python3:Depends},
+         ${shlibs:Depends},
+         ${misc:Depends},
+         python3-numexpr (= ${binary:Version})
+Recommends: python3-dbg,
+            python3-numpy-dbg
+Description: Fast numerical array expression evaluator for Python 3 and NumPy (debug ext)
+ Numexpr package evaluates multiple-operator array expressions many
+ times faster than NumPy can. It accepts the expression as a string,
+ analyzes it, rewrites it more efficiently, and compiles it to faster
+ Python code on the fly. It's the next best thing to writing the
+ expression in C and compiling it with a specialized just-in-time
+ (JIT) compiler, i.e. it does not require a compiler at runtime.
+ .
+ This package contains the extension built for the Python3 debug
+ interpreter.
+ .
+ This package contains the extension built for the Python 3 debug interpreter.
diff --git a/debian/rules b/debian/rules
index 1677817..e98b513 100755
--- a/debian/rules
+++ b/debian/rules
@@ -6,32 +6,61 @@
 
 
 # Get the supported Python versions
-PYVERS = $(shell pyversions -r -v)
+PY2VERS = $(shell pyversions -r -v)
+PY3VERS = $(shell py3versions -r -v)
 
 
 %:
-	dh $@ --with python2 --buildsystem=python_distutils
+	dh $@ --with python2,python3 --buildsystem=python_distutils
+
+
+build-python%:
+	python$* setup.py build
+	python$*-dbg setup.py build
+
+
+override_dh_auto_build: $(PY3VERS:%=build-python%)
+	dh_auto_build
+
+
+install-python%:
+	python$* setup.py install --root=$(CURDIR)/debian/tmp --install-layout=deb
+	python$*-dbg setup.py install --root=$(CURDIR)/debian/tmp --install-layout=deb
+
+
+override_dh_auto_install: $(PY3VERS:%=install-python%)
+	dh_auto_install
 
 
 override_dh_install:
 	# Install everything excluding the *_d.so debug extensions to python-numexpr
-	dh_install -X"*_d.so" "debian/tmp/*" -p python-numexpr
+	dh_install -X"*_d.so" "debian/tmp/usr/lib/python2*" -p python-numexpr
+	dh_install -X"*dmu.so" "debian/tmp/usr/lib/python3*" -p python3-numexpr
 
 	# Install the debug extensions to python-numexpr-dbg
-	dh_install "debian/tmp/usr/lib/python*/*-packages/numexpr/*_d.so" -p python-numexpr-dbg
+	dh_install "debian/tmp/usr/lib/python2*/*-packages/numexpr/*_d.so" -p python-numexpr-dbg
+	dh_install "debian/tmp/usr/lib/python3*/*-packages/numexpr/*dmu.so" -p python3-numexpr-dbg
 
 	# Continue with regular dh_install
 	dh_install
 	dh_numpy
-ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
+	dh_numpy3
+
+
+ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
+
+override_dh_auto_test: $(PYTHON2:%=test-python%) $(PYTHON3:%=test-python%)
 	set -e -x;\
-	for py in $(PYVERS); do \
+	for py in $(PY2VERS) $(PY3VERS); do \
 		cd $(CURDIR)/build/lib.*-$$py;\
 		env PYTHONPATH=. python$$py numexpr/tests/test_numexpr.py;\
 		cd $(CURDIR)/build/lib.*-$$py-pydebug;\
 		env PYTHONPATH=. python$$py-dbg numexpr/tests/test_numexpr.py;\
 	done
+
 endif
 
-.PHONY: dh_auto_install
+
+.PHONY: override_dh_auto_build override_dh_auto_install override_dh_install \
+        override_dh_auto_test
 

-- 
Packaging for numexpr



More information about the debian-science-commits mailing list