[Python-modules-commits] r21329 - in packages/scipy/trunk/debian (7 files)

jtaylor-guest at users.alioth.debian.org jtaylor-guest at users.alioth.debian.org
Fri Apr 20 20:00:35 UTC 2012


    Date: Friday, April 20, 2012 @ 20:00:32
  Author: jtaylor-guest
Revision: 21329

* add python3 packages (Closes: #664785)
* debian/rules:
  - split the build into build and install step
  - use .install files instead of direct setup.py install

Added:
  packages/scipy/trunk/debian/python-scipy-dbg.install
  packages/scipy/trunk/debian/python-scipy.install
  packages/scipy/trunk/debian/python3-scipy-dbg.install
  packages/scipy/trunk/debian/python3-scipy.install
Modified:
  packages/scipy/trunk/debian/changelog
  packages/scipy/trunk/debian/control
  packages/scipy/trunk/debian/rules

Modified: packages/scipy/trunk/debian/changelog
===================================================================
--- packages/scipy/trunk/debian/changelog	2012-04-20 19:57:58 UTC (rev 21328)
+++ packages/scipy/trunk/debian/changelog	2012-04-20 20:00:32 UTC (rev 21329)
@@ -1,8 +1,12 @@
 python-scipy (0.10.1+dfsg1-3) UNRELEASED; urgency=low
 
   * wrap-and-sort debian folder
+  * add python3 packages (Closes: #664785)
+  * debian/rules:
+    - split the build into build and install step
+    - use .install files instead of direct setup.py install
 
- -- Julian Taylor <jtaylor.debian at googlemail.com>  Fri, 20 Apr 2012 21:56:20 +0200
+ -- Julian Taylor <jtaylor.debian at googlemail.com>  Fri, 20 Apr 2012 21:59:33 +0200
 
 python-scipy (0.10.1+dfsg1-2) unstable; urgency=low
 

Modified: packages/scipy/trunk/debian/control
===================================================================
--- packages/scipy/trunk/debian/control	2012-04-20 19:57:58 UTC (rev 21328)
+++ packages/scipy/trunk/debian/control	2012-04-20 20:00:32 UTC (rev 21329)
@@ -15,9 +15,14 @@
                python-all-dev (>= 2.6.6-3~),
                python-numpy (>= 1:1.5.1),
                python-numpy-dbg (>= 1:1.5.1),
+               python3-all-dbg,
+               python3-all-dev,
+               python3-numpy,
+               python3-numpy-dbg,
                sharutils,
                swig
 X-Python-Version: >= 2.4
+X-Python3-Version: >= 3.1
 Standards-Version: 3.9.3
 Homepage: http://www.scipy.org/
 Vcs-Svn: svn://svn.debian.org/python-modules/packages/scipy/trunk
@@ -41,6 +46,23 @@
  programming tools, an expression-to-C++ compiler for fast execution, and
  others.
 
+Package: python3-scipy
+Architecture: any
+Depends: python3-numpy, ${misc:Depends}, ${python3:Depends}, ${shlibs:Depends}
+Recommends: g++ | c++-compiler
+Description: scientific tools for Python 3
+ SciPy supplements the popular NumPy module (python-numpy package), gathering a
+ variety of high level science and engineering modules together as a single
+ package.
+ .
+ SciPy is a set of Open Source scientific and numeric tools for Python. It
+ currently supports special functions, integration, ordinary differential
+ equation (ODE) solvers, gradient optimization, genetic algorithms, parallel
+ programming tools, an expression-to-C++ compiler for fast execution, and
+ others.
+ .
+ This package provides the Python 3 version.
+
 Package: python-scipy-dbg
 Section: debug
 Architecture: any
@@ -62,3 +84,25 @@
  others.
  .
  This package provides debugging symbols for python-scipy.
+
+Package: python3-scipy-dbg
+Section: debug
+Architecture: any
+Depends: python3-dbg,
+         python3-numpy-dbg,
+         python3-scipy (= ${binary:Version}),
+         ${misc:Depends},
+         ${python3:Depends},
+         ${shlibs:Depends}
+Description: scientific tools for Python 3 - debugging symbols
+ SciPy supplements the popular NumPy module (python-numpy package), gathering a
+ variety of high level science and engineering modules together as a single
+ package.
+ .
+ SciPy is a set of Open Source scientific and numeric tools for Python. It
+ currently supports special functions, integration, ordinary differential
+ equation (ODE) solvers, gradient optimization, genetic algorithms, parallel
+ programming tools, an expression-to-C++ compiler for fast execution, and
+ others.
+ .
+ This package provides debugging symbols for python3-scipy.

Added: packages/scipy/trunk/debian/python-scipy-dbg.install
===================================================================
--- packages/scipy/trunk/debian/python-scipy-dbg.install	                        (rev 0)
+++ packages/scipy/trunk/debian/python-scipy-dbg.install	2012-04-20 20:00:32 UTC (rev 21329)
@@ -0,0 +1,2 @@
+# extra stuff deleted in rules
+usr/lib/python2*/*-packages/

Added: packages/scipy/trunk/debian/python-scipy.install
===================================================================
--- packages/scipy/trunk/debian/python-scipy.install	                        (rev 0)
+++ packages/scipy/trunk/debian/python-scipy.install	2012-04-20 20:00:32 UTC (rev 21329)
@@ -0,0 +1 @@
+usr/lib/python2*/dist-packages

Added: packages/scipy/trunk/debian/python3-scipy-dbg.install
===================================================================
--- packages/scipy/trunk/debian/python3-scipy-dbg.install	                        (rev 0)
+++ packages/scipy/trunk/debian/python3-scipy-dbg.install	2012-04-20 20:00:32 UTC (rev 21329)
@@ -0,0 +1,2 @@
+# extra stuff deleted in rules
+usr/lib/python3*/*-packages/

Added: packages/scipy/trunk/debian/python3-scipy.install
===================================================================
--- packages/scipy/trunk/debian/python3-scipy.install	                        (rev 0)
+++ packages/scipy/trunk/debian/python3-scipy.install	2012-04-20 20:00:32 UTC (rev 21329)
@@ -0,0 +1 @@
+usr/lib/python3*/dist-packages

Modified: packages/scipy/trunk/debian/rules
===================================================================
--- packages/scipy/trunk/debian/rules	2012-04-20 19:57:58 UTC (rev 21328)
+++ packages/scipy/trunk/debian/rules	2012-04-20 20:00:32 UTC (rev 21329)
@@ -4,42 +4,46 @@
 export FFLAGS="-fPIC"
 export ATLAS=None
 
-PYVERS:= $(shell pyversions -v -r debian/control)
+PY2VERS:= $(shell pyversions -v -r debian/control)
+PY3VERS:= $(shell py3versions -v -r debian/control)
 BASE=$(shell pwd)/debian
 DVER=$(shell dpkg-parsechangelog | egrep '^Version:' | cut -f 2 -d ' ' | sed 's/-[^-]*$$//')
 UVER=$(shell echo $(DVER) | sed "s/+dfsg.*//g")
 
 %:
-	dh --with python2 $@
+	dh $@ --with python2,python3
 
 override_dh_auto_clean:
 	rm -rf build
 	find . -name "*.pyc" -exec rm {} \;
 
-override_dh_auto_install:
-	set -e; for v in $(PYVERS); do                                   \
-		d=$(BASE)/python-scipy;                                  \
-		mkdir -m 755 -p $$d/usr/share/doc/python-scipy;          \
-		python$$v setup.py config_fc --noarch build;             \
-		python$$v setup.py install --prefix $$d/usr              \
-			--no-compile --install-layout=deb;               \
-		rm -f $$d/usr/lib/python$$v/*-packages/scipy/LICENSE.txt;\
-		python$$v setup.py clean --all;                          \
-	done
-	set -e; for v in $(PYVERS); do                                   \
-		d=$(BASE)/python-scipy-dbg;                              \
-		mkdir -m 755 -p $$d/usr/share/doc/python-scipy-dbg;      \
-		CFLAGS="-g -ggdb" python$$v-dbg setup.py config_fc       \
-					--noarch build;                  \
-		python$$v-dbg setup.py install --prefix $$d/usr          \
-			--no-compile --install-layout=deb;               \
-		rm -f $$d/usr/lib/python$$v/*-packages/scipy/LICENSE.txt;\
-		python$$v-dbg setup.py clean --all;                      \
-	done
-	find debian/python-scipy-dbg ! -type d ! -name '*_d.so' | xargs rm -f
+build-python%:
+	python$* setup.py config_fc --noarch build;
+	CFLAGS="-g -ggdb" python$*-dbg setup.py config_fc \
+				--noarch build;
+
+override_dh_auto_build: $(PY3VERS:%=build-python%) $(PY2VERS:%=build-python%)
+
+install-python%:
+	python$* setup.py install --root $(BASE)/tmp \
+		--force --no-compile --install-layout=deb;
+
+	python$*-dbg setup.py install --root $(BASE)/tmp \
+		--force --no-compile --install-layout=deb;
+
+override_dh_install: $(PY3VERS:%=install-python%) $(PY2VERS:%=install-python%)
+	dh_install
+	find debian/python-scipy -type f -name '*_d.so' -delete
+	find debian/python3-scipy -type f -name '*.cpython-*d*.so' -delete
+	find debian/python-scipy-dbg ! -type d ! -name '*_d.so' -delete
+	find debian/python3-scipy-dbg ! -type d ! -name '*.cpython-*d*.so' -delete
 	find debian/python-scipy-dbg -depth -empty -exec rmdir {} \;
+	find debian/python3-scipy-dbg -depth -empty -exec rmdir {} \;
+	rm -f $(BASE)/python-scipy*/usr/lib/python*/*-packages/scipy/LICENSE.txt;
 	rm -fr $(BASE)/python-scipy*/usr/lib/python*/*-packages/scipy/weave/examples/
 
+	# not ported to py3 in 0.10.1
+	rm -rf $(BASE)/python3-scipy/usr/lib/python3/dist-packages/scipy/weave
         #call dh_numpy
 	dh_numpy
 
@@ -50,11 +54,16 @@
 	    		chmod +x $$i;                                      \
 		fi ;                                                       \
 	done
-	sed -i '1s|.|#!/usr/bin/python\n&|' $(BASE)/python-scipy//usr/share/pyshared/scipy/cluster/tests/vq_test.py
-	sed -i '1s|.|#!/usr/bin/python\n&|' $(BASE)/python-scipy//usr/share/pyshared/scipy/stats/tests/test_stats.py
+	sed -i '1s|.|#!/usr/bin/python\n&|' $(BASE)/python-scipy/usr/share/pyshared/scipy/cluster/tests/vq_test.py
+	sed -i '1s|.|#!/usr/bin/python\n&|' $(BASE)/python-scipy/usr/share/pyshared/scipy/stats/tests/test_stats.py
+	sed -i '1s|.|#!/usr/bin/python3\n&|' $(BASE)/python3-scipy/usr/lib/python3/dist-packages/scipy/cluster/tests/vq_test.py
+	sed -i '1s|.|#!/usr/bin/python3\n&|' $(BASE)/python3-scipy/usr/lib/python3/dist-packages/scipy/stats/tests/test_stats.py
+	#replace all the usr/bin/env python
+	find $(BASE)/python3-scipy/usr/lib/python3/ -name "*.py" -type f | xargs sed -i -e "1s#usr/bin/env\s\+python\s*\$$#usr/bin/env python3#"
 
 override_dh_strip:
-	dh_strip --dbg-package=python-scipy-dbg
+	dh_strip -ppython-scipy --dbg-package=python-scipy-dbg
+	dh_strip -ppython3-scipy --dbg-package=python3-scipy-dbg
 
 get-orig-source:
 	-uscan --force-download --download-version $(UVER) --rename




More information about the Python-modules-commits mailing list