[Python-modules-commits] r30688 - in packages/python-pygraphviz/trunk/debian (7 files)
morph at users.alioth.debian.org
morph at users.alioth.debian.org
Sat Sep 20 19:34:51 UTC 2014
Date: Saturday, September 20, 2014 @ 19:34:50
Author: morph
Revision: 30688
* Switch from CDBS + pysupport to dh sequencer and dh_python2; Closes: #759709
* debian/patches/*
- don't install data from setup.py, use dh_installexamples instead
Added:
packages/python-pygraphviz/trunk/debian/patches/dont_install_data.patch
Modified:
packages/python-pygraphviz/trunk/debian/changelog
packages/python-pygraphviz/trunk/debian/control
packages/python-pygraphviz/trunk/debian/patches/20_doc_install_path
packages/python-pygraphviz/trunk/debian/patches/series
packages/python-pygraphviz/trunk/debian/rules
Deleted:
packages/python-pygraphviz/trunk/debian/patches/10_ship_examples_miles.dat
Modified: packages/python-pygraphviz/trunk/debian/changelog
===================================================================
--- packages/python-pygraphviz/trunk/debian/changelog 2014-09-20 16:47:21 UTC (rev 30687)
+++ packages/python-pygraphviz/trunk/debian/changelog 2014-09-20 19:34:50 UTC (rev 30688)
@@ -1,3 +1,11 @@
+python-pygraphviz (1.2-2) UNRELEASED; urgency=medium
+
+ * Switch from CDBS + pysupport to dh sequencer and dh_python2; Closes: #759709
+ * debian/patches/*
+ - don't install data from setup.py, use dh_installexamples instead
+
+ -- Sandro Tosi <morph at debian.org> Sat, 20 Sep 2014 20:32:21 +0100
+
python-pygraphviz (1.2-1) unstable; urgency=low
[ Jakub Wilk ]
Modified: packages/python-pygraphviz/trunk/debian/control
===================================================================
--- packages/python-pygraphviz/trunk/debian/control 2014-09-20 16:47:21 UTC (rev 30687)
+++ packages/python-pygraphviz/trunk/debian/control 2014-09-20 19:34:50 UTC (rev 30688)
@@ -3,7 +3,7 @@
Priority: optional
Maintainer: Debian Python Modules Team <python-modules-team at lists.alioth.debian.org>
Uploaders: Sandro Tosi <morph at debian.org>
-Build-Depends: debhelper (>= 5), cdbs (>= 0.4.43), python-support (>= 0.6.4), python-all-dev (>= 2.3.5-11), python-all-dbg, libgraphviz-dev, python-setuptools, pkg-config
+Build-Depends: debhelper (>= 5), dh-python, python-all-dev (>= 2.3.5-11), python-all-dbg, libgraphviz-dev, python-setuptools, pkg-config
Standards-Version: 3.9.4
XS-Python-Version: >= 2.5
Homepage: http://networkx.lanl.gov/pygraphviz/
Deleted: packages/python-pygraphviz/trunk/debian/patches/10_ship_examples_miles.dat
===================================================================
--- packages/python-pygraphviz/trunk/debian/patches/10_ship_examples_miles.dat 2014-09-20 16:47:21 UTC (rev 30687)
+++ packages/python-pygraphviz/trunk/debian/patches/10_ship_examples_miles.dat 2014-09-20 19:34:50 UTC (rev 30688)
@@ -1,12 +0,0 @@
-Description: Install also *.txt.gz files
-
---- a/setup.py
-+++ b/setup.py
-@@ -140,6 +140,7 @@
- (os.path.join(docdirbase, 'examples'),glob("examples/*.py")),
- (os.path.join(docdirbase, 'examples'),glob("examples/*.dat")),
- (os.path.join(docdirbase, 'examples'),glob("examples/*.dat.gz")),
-+ (os.path.join(docdirbase, 'examples'),glob("examples/*.txt.gz")),
- ]
- extension = [Extension("pygraphviz._graphviz",
- ["pygraphviz/graphviz_wrap.c"],
Modified: packages/python-pygraphviz/trunk/debian/patches/20_doc_install_path
===================================================================
--- packages/python-pygraphviz/trunk/debian/patches/20_doc_install_path 2014-09-20 16:47:21 UTC (rev 30687)
+++ packages/python-pygraphviz/trunk/debian/patches/20_doc_install_path 2014-09-20 19:34:50 UTC (rev 30688)
@@ -1,10 +1,8 @@
Install the documentation in the expected Debian directory
-Index: python-pygraphviz-1.0/setup.py
-===================================================================
---- python-pygraphviz-1.0.orig/setup.py 2010-09-16 22:53:44.265277906 +0200
-+++ python-pygraphviz-1.0/setup.py 2010-09-16 22:54:06.741278023 +0200
-@@ -98,7 +98,7 @@
+--- a/setup.py
++++ b/setup.py
+@@ -109,7 +109,7 @@ release.write_versionfile()
sys.path.pop(0)
packages = ["pygraphviz","pygraphviz.tests"]
Added: packages/python-pygraphviz/trunk/debian/patches/dont_install_data.patch
===================================================================
--- packages/python-pygraphviz/trunk/debian/patches/dont_install_data.patch (rev 0)
+++ packages/python-pygraphviz/trunk/debian/patches/dont_install_data.patch 2014-09-20 19:34:50 UTC (rev 30688)
@@ -0,0 +1,10 @@
+--- a/setup.py
++++ b/setup.py
+@@ -142,7 +142,6 @@ if __name__ == "__main__":
+ download_url = release.download_url,
+ classifiers = release.classifiers,
+ packages = packages,
+- data_files = data,
+ ext_modules = extension,
+ package_data = package_data
+ )
Modified: packages/python-pygraphviz/trunk/debian/patches/series
===================================================================
--- packages/python-pygraphviz/trunk/debian/patches/series 2014-09-20 16:47:21 UTC (rev 30687)
+++ packages/python-pygraphviz/trunk/debian/patches/series 2014-09-20 19:34:50 UTC (rev 30688)
@@ -1,2 +1,2 @@
-10_ship_examples_miles.dat
20_doc_install_path
+dont_install_data.patch
Modified: packages/python-pygraphviz/trunk/debian/rules
===================================================================
--- packages/python-pygraphviz/trunk/debian/rules 2014-09-20 16:47:21 UTC (rev 30687)
+++ packages/python-pygraphviz/trunk/debian/rules 2014-09-20 19:34:50 UTC (rev 30688)
@@ -1,68 +1,24 @@
#!/usr/bin/make -f
-# Commodity variables
-DOC_INSTDIR=$(CURDIR)/debian/python-pygraphviz/usr/share/doc/python-pygraphviz
+PYTHON2=$(shell pyversions -r)
-# Needed before including python-distutils.mk
-DEB_PYTHON_SYSTEM = pysupport
+%:
+ dh $@ --with python2
-
-include /usr/share/cdbs/1/rules/debhelper.mk
-include /usr/share/cdbs/1/class/python-distutils.mk
-
-
-# Some variables
-DEB_PYTHON_MODULE_PACKAGE = pygraphviz
-DEB_PYTHON_CLEAN_ARGS = --all
-DEB_PYTHON_INSTALL_ARGS_ALL = --no-compile --force
-
-# Install egg-info directories, using setup_egg.py instead of setup.py
-DEB_PYTHON_SETUP_CMD = setup_egg.py
-DEB_PYTHON_INSTALL_ARGS_ALL += --single-version-externally-managed \
- --prefix=/usr --root $(CURDIR)/debian/python-pygraphviz
-
-install/python-pygraphviz::
- # Fix test.py permissions (not an upstream problem):
- for i in `pyversions -s`; do \
- chmod +x debian/*/usr/lib/$$i/*-packages/pygraphviz/tests/test.py; \
+override_dh_install:
+ set -e; \
+ for python in $(PYTHON2); do \
+ $$python setup.py install --install-layout=deb --root=$(CURDIR)/debian/python-pygraphviz; \
+ $$python-dbg setup.py install --install-layout=deb --root=$(CURDIR)/debian/python-pygraphviz-dbg; \
done
-binary-install/python-pygraphviz::
- # Remove extraneous license file, and rename the README file
- rm $(DOC_INSTDIR)/INSTALL.txt
- mv -f $(DOC_INSTDIR)/README.txt $(DOC_INSTDIR)/README
+override_dh_strip:
+ifeq (,$(filter nostrip,$(DEB_BUILD_OPTIONS)))
+ dh_strip -ppython-pygraphviz --dbg-package=python-pygraphviz-dbg
+endif
- # Fix example permissions, until upstream fixes it
- chmod a+x $(DOC_INSTDIR)/examples/*.py
+override_dh_installexamples:
+ dh_installexamples -ppython-pygraphviz examples/*
-# BUILD_ARGS should contain --build-base but it's:
-# - neither supported by the setup.py script
-# - nor needed
-DEB_PYTHON_BUILD_ARGS =
-
-
-# CDBS doesn't allow separate build steps for module and extension, let's hack it:
-# - copied the following target from the python-distutils.mk (CDBS Makefile)
-# - deleted arch=all test since we _do_ have an extension => arch=any
-python-build-stamp-%::
- cd $(DEB_SRCDIR) && python$* $(DEB_PYTHON_SETUP_CMD) build_ext $(DEB_PYTHON_BUILD_ARGS) $(DEB_PYTHON_BUILD_EXTENSION_ARGS)
- cd $(DEB_SRCDIR) && python$* $(DEB_PYTHON_SETUP_CMD) build_py $(DEB_PYTHON_BUILD_ARGS)
- touch $@
-
-install/python-pygraphviz-dbg::
- for i in $(cdbs_python_build_versions); do \
- python$$i-dbg $(DEB_PYTHON_SETUP_CMD) install --root $(CURDIR)/debian/python-pygraphviz-dbg; \
- done
- find debian/python-pygraphviz-dbg \
- ! -type d ! -name '*_d.so' | xargs rm -f
- find debian/python-pygraphviz-dbg -depth -empty -exec rmdir {} \;
-
-binary-predeb/python-pygraphviz-dbg::
- rm -rf debian/python-pygraphviz-dbg/usr/share/doc/python-pygraphviz-dbg
- ln -s python-pygraphviz debian/python-pygraphviz-dbg/usr/share/doc/python-pygraphviz-dbg
-
-
-clean::
- # Shipped in the source tarball, generated again during the build
- rm -rf pygraphviz.egg-info
- rm -rf python-build-stamp build
+override_dh_installdocs:
+ dh_installdocs --link-doc=python-pygraphviz
More information about the Python-modules-commits
mailing list