[spyder] 05/08: switch to pybuild

Frédéric-Emmanuel Picca picca at moszumanska.debian.org
Thu Apr 10 21:06:28 UTC 2014


This is an automated email from the git hooks/post-receive script.

picca pushed a commit to branch experimental
in repository spyder.

commit 9624aba3ec80a2b0e617e46ea24116ee2a59a48b
Author: Picca Frédéric-Emmanuel <picca at debian.org>
Date:   Wed Apr 9 22:11:20 2014 +0200

    switch to pybuild
---
 debian/control                                     |  6 ++-
 .../0001-fix-documentation-installation.patch      | 22 ++-------
 debian/python-spyderlib-doc.docs                   |  2 +-
 debian/python-spyderlib.install                    |  1 -
 debian/python3-spyderlib.install                   |  1 -
 debian/rules                                       | 53 ++++++++--------------
 debian/spyder.install                              |  3 --
 debian/spyder3.install                             |  1 -
 8 files changed, 27 insertions(+), 62 deletions(-)

diff --git a/debian/control b/debian/control
index 84ac6f4..c58f88a 100644
--- a/debian/control
+++ b/debian/control
@@ -6,9 +6,13 @@ Uploaders: Ludovic Aubry <laubrycomm at free.fr>,
 Section: science
 Priority: extra
 Build-Depends: debhelper (>= 9),
+               dh-python,
                python-all,
-               python3-all
+               python-setuptools,
+               python3-all,
+               python3-setuptools
 Build-Depends-Indep: python-sphinx,
+                     python3-sphinx,
                      xsltproc
 Standards-Version: 3.9.5
 Vcs-Browser: http://anonscm.debian.org/gitweb/?p=debian-science/packages/spyder.git
diff --git a/debian/patches/0001-fix-documentation-installation.patch b/debian/patches/0001-fix-documentation-installation.patch
index 286db72..bd7a23b 100644
--- a/debian/patches/0001-fix-documentation-installation.patch
+++ b/debian/patches/0001-fix-documentation-installation.patch
@@ -1,29 +1,13 @@
-From: =?UTF-8?q?Picca=20Fr=C3=A9d=C3=A9ric-Emmanuel?= <picca at debian.org>
+From: =?utf-8?q?Picca_Fr=C3=A9d=C3=A9ric-Emmanuel?= <picca at debian.org>
 Date: Sun, 1 Apr 2012 10:08:11 +0200
 Subject: fix-documentation-installation
 
 ---
- setup.py              | 4 ++--
  spyderlib/__init__.py | 3 +++
- 2 files changed, 5 insertions(+), 2 deletions(-)
+ 1 file changed, 3 insertions(+)
 
-diff --git a/setup.py b/setup.py
-index bc81377..7193774 100644
---- a/setup.py
-+++ b/setup.py
-@@ -94,8 +94,8 @@ try:
-         def run(self):
-             build = self.get_finalized_command('build')
-             sys.path.insert(0, os.path.abspath(build.build_lib))
--            dirname = self.distribution.get_command_obj('build').build_purelib
--            self.builder_target_dir = osp.join(dirname, 'spyderlib', 'doc')
-+            #dirname = self.distribution.get_command_obj('build').build_purelib
-+            #self.builder_target_dir = osp.join(dirname, 'spyderlib', 'doc')
- 
-             hhc_exe = get_html_help_exe()
-             self.builder = "html" if hhc_exe is None else "htmlhelp"
 diff --git a/spyderlib/__init__.py b/spyderlib/__init__.py
-index ffa8d53..2018c42 100644
+index bd7a029..28d5de0 100644
 --- a/spyderlib/__init__.py
 +++ b/spyderlib/__init__.py
 @@ -35,6 +35,9 @@ __forum_url__   = 'http://groups.google.com/group/spyderlib'
diff --git a/debian/python-spyderlib-doc.docs b/debian/python-spyderlib-doc.docs
index 8ed30c1..b2dbf19 100644
--- a/debian/python-spyderlib-doc.docs
+++ b/debian/python-spyderlib-doc.docs
@@ -1 +1 @@
-build/sphinx/html
\ No newline at end of file
+build/html
\ No newline at end of file
diff --git a/debian/python-spyderlib.install b/debian/python-spyderlib.install
deleted file mode 100644
index 9e364b5..0000000
--- a/debian/python-spyderlib.install
+++ /dev/null
@@ -1 +0,0 @@
-usr/lib/python2*
\ No newline at end of file
diff --git a/debian/python3-spyderlib.install b/debian/python3-spyderlib.install
deleted file mode 100644
index 389365a..0000000
--- a/debian/python3-spyderlib.install
+++ /dev/null
@@ -1 +0,0 @@
-usr/lib/python3
\ No newline at end of file
diff --git a/debian/rules b/debian/rules
index 9bfa471..2bb2d90 100755
--- a/debian/rules
+++ b/debian/rules
@@ -2,43 +2,26 @@
 # -*- makefile -*-
 
 # Uncomment this to turn on verbose mode.
-#export DH_VERBOSE=1
-
-PYTHON2=$(shell pyversions -vr)
-PYTHON3=$(shell py3versions -vr)
-DB2MAN = /usr/share/sgml/docbook/stylesheet/xsl/nwalsh/manpages/docbook.xsl
-XP     = xsltproc -''-nonet -''-param man.charmap.use.subset "0"
-
-# Prevent setuptools/distribute from accessing the internet.
-export http_proxy = http://127.0.0.1:9
-
-# for backport on old-stable without bpo
-WITH_SPHINXDOC = $(shell if [ -x /usr/bin/dh_sphinxdoc ]; then echo "--with sphinxdoc"; fi)
-
-debian/spyder.1: debian/manpage.xml
-	$(XP) $(DB2MAN) $<
-
-installman: spyder.1
-	dh installman
+export DH_VERBOSE=1
+export PYBUILD_NAME=spyderlib
+export PYBUILD_BUILD_ARGS=--no-doc
+export PYBUILD_INSTALL_ARGS=--no-doc
 
 %:
-	dh  $@ --with python2,python3 $(WITH_SPHINXDOC)
-
-build-python%:
-	python$* setup.py build
+	dh $@ --with python2,python3,sphinxdoc --buildsystem=pybuild
 
-override_dh_auto_build: $(PYTHON3:%=build-python%)
-	dh_auto_build
+override_dh_auto_build-indep: 
+	PYTHONPATH=. http_proxy='localhost' sphinx-build -N -bhtml doc/ build/html  # HTML generator
+	PYTHONPATH=. http_proxy='localhost' sphinx-build -N -bman doc/ build/man  # HTML generator
 
-install-python%:
-	python$* setup.py install --root=$(CURDIR)/debian/tmp --install-layout=deb
-	# install spyder3
-	mv $(CURDIR)/debian/tmp/usr/bin/spyder $(CURDIR)/debian/tmp/usr/bin/spyder3
-
-override_dh_auto_install: $(PYTHON3:%=install-python%)
+override_dh_auto_install:
 	dh_auto_install
-
-override_dh_auto_clean:
-	dh_auto_clean
-	rm -rf build
-	rm -rf *.egg-info
+	# install the spyder files
+	dh_install --sourcedir=$(CURDIR)/debian/python-spyderlib -p spyder usr/bin
+	rm -rf $(CURDIR)/debian/python-spyderlib/usr/bin
+	rm -f $(CURDIR)/debian/spyder/usr/bin/*.py
+
+	# install the spyder3 files
+	dh_install --sourcedir=$(CURDIR)/debian/python3-spyderlib -p spyder3 usr/bin
+	rm -rf $(CURDIR)/debian/python3-spyderlib/usr/bin
+	rm -f $(CURDIR)/debian/spyder3/usr/bin/*.py
diff --git a/debian/spyder.install b/debian/spyder.install
deleted file mode 100644
index 7befafa..0000000
--- a/debian/spyder.install
+++ /dev/null
@@ -1,3 +0,0 @@
-usr/bin/spyder
-usr/share/applications
-usr/share/pixmaps
diff --git a/debian/spyder3.install b/debian/spyder3.install
deleted file mode 100644
index 5dbc81a..0000000
--- a/debian/spyder3.install
+++ /dev/null
@@ -1 +0,0 @@
-usr/bin/spyder3
\ No newline at end of file

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/spyder.git



More information about the debian-science-commits mailing list