[Python-modules-commits] [python-axiom] 01/16: Switch from cdbs to dh/pybuild.

Tristan Seligmann mithrandi at moszumanska.debian.org
Sat Sep 10 15:25:42 UTC 2016


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

mithrandi pushed a commit to branch master
in repository python-axiom.

commit a1742c1f3df98c8a23623f1680414efd4294bf89
Author: Tristan Seligmann <mithrandi at debian.org>
Date:   Sat Sep 10 16:05:29 2016 +0200

    Switch from cdbs to dh/pybuild.
---
 debian/control               | 27 ++++++++++++++++++++-------
 debian/python-axiom.manpages |  1 +
 debian/rules                 | 32 ++++++++++++++++----------------
 debian/runtrial.py           | 21 ---------------------
 4 files changed, 37 insertions(+), 44 deletions(-)

diff --git a/debian/control b/debian/control
index a5e3112..bb7bb97 100644
--- a/debian/control
+++ b/debian/control
@@ -2,11 +2,19 @@ Source: python-axiom
 Section: python
 Priority: extra
 Maintainer: Debian Python Modules Team <python-modules-team at lists.alioth.debian.org>
-Uploaders: Tristan Seligmann <mithrandi at debian.org>, Vincent Bernat <bernat at debian.org>
-Build-Depends: debhelper (>= 9), cdbs (>= 0.4.90~), python-all (>= 2.6.6-3~),
-    python-epsilon (>= 0.7.0), dh-python
-Build-Depends-Indep: python-twisted-core, python-pysqlite2,
-    python-zopeinterface, python-setuptools
+Uploaders:
+ Tristan Seligmann <mithrandi at debian.org>,
+ Vincent Bernat <bernat at debian.org>,
+Build-Depends:
+ debhelper (>= 9),
+ dh-python,
+ python-all (>= 2.6.6-3~),
+ python-epsilon (>= 0.7.0),
+Build-Depends-Indep:
+ python-pysqlite2,
+ python-setuptools,
+ python-twisted-core,
+ python-zopeinterface,
 Homepage: https://github.com/twisted/axiom
 Vcs-Git: https://anonscm.debian.org/git/python-modules/packages/python-axiom.git
 Vcs-Browser: https://anonscm.debian.org/cgit/python-modules/packages/python-axiom.git
@@ -15,8 +23,13 @@ X-Python-Version: >= 2.7
 
 Package: python-axiom
 Architecture: all
-Depends: ${python:Depends}, ${misc:Depends}, python-twisted-core,
-    python-epsilon (>= 0.5.11), python-pysqlite2, python-zopeinterface
+Depends:
+ python-epsilon (>= 0.5.11),
+ python-pysqlite2,
+ python-twisted-core,
+ python-zopeinterface,
+ ${misc:Depends},
+ ${python:Depends},
 Breaks: libsqlite3-0 (<< 3.6.12)
 Description: Python object database
  Divmod Axiom is an object database, or alternatively, an
diff --git a/debian/python-axiom.manpages b/debian/python-axiom.manpages
new file mode 100644
index 0000000..f00dea4
--- /dev/null
+++ b/debian/python-axiom.manpages
@@ -0,0 +1 @@
+debian/axiomatic.1
diff --git a/debian/rules b/debian/rules
index 61ffad0..23addc7 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,20 +1,20 @@
 #!/usr/bin/make -f
-export DH_VERBOSE=1
-DEB_INSTALL_MANPAGES_python-axiom := debian/axiomatic.1
-DEB_INSTALL_CHANGELOGS_python-axiom := debian/NEWS.txt
-include /usr/share/cdbs/1/rules/debhelper.mk
-include /usr/share/cdbs/1/class/python-distutils.mk
-PKGDIR=debian/python-axiom/
-# Don't write any bytecode files implicitly during the build process
 export PYTHONDONTWRITEBYTECODE=yes
+export PYBUILD_NAME=axiom
+
+%:
+	dh $@ --with python2 --buildsystem=pybuild
+
+
+override_dh_auto_test:
+	PYBUILD_SYSTEM=custom \
+	PYBUILD_TEST_ARGS="{interpreter} /usr/bin/trial axiom" dh_auto_test
 
-clean::
-	rm -rf _trial_temp
 
-install/python-axiom::
-	rm -rf $(PKGDIR)/usr/lib/python*/site-packages/build
-	rm -rf $(PKGDIR)/usr/lib/python*/site-packages/axiom/examples
-ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
-	$(call cdbs_python_binary,python$(cdbs_python_compile_version)) debian/runtrial.py $(PKGDIR) axiom
-endif
-	find $(PKGDIR) -name dropin.cache -delete
+override_dh_installchangelogs:
+	dh_installchangelogs debian/NEWS.txt
+
+
+override_dh_clean:
+	dh_clean
+	rm -rf _trial_temp
diff --git a/debian/runtrial.py b/debian/runtrial.py
deleted file mode 100644
index c095a62..0000000
--- a/debian/runtrial.py
+++ /dev/null
@@ -1,21 +0,0 @@
-import sys
-import os
-from os.path import join
-from distutils.sysconfig import get_python_lib
-from site import addsitedir
-
-root = sys.argv.pop(1)
-site_packages = get_python_lib()
-
-_path = sys.path[:]
-sys.path[:] = []
-addsitedir(join(root, site_packages[1:]))
-addsitedir(join(root, site_packages[1:].replace('dist-packages', 'site-packages'))) # cdbs installs python modules in site-packages even for Python 2.6
-sys.path.extend(_path)
-
-# Some tests need PYTHONPATH. We provide a sensible value for it (although not really correct)
-if 'PYTHONPATH' not in os.environ:
-    os.environ['PYTHONPATH'] = os.pathsep.join(sys.path)
-
-from twisted.scripts.trial import run
-run()

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-axiom.git



More information about the Python-modules-commits mailing list