[Python-modules-commits] r26407 - in packages/sqlparse/trunk/debian (7 files)

jollyroger-guest at users.alioth.debian.org jollyroger-guest at users.alioth.debian.org
Wed Nov 6 00:28:45 UTC 2013


    Date: Wednesday, November 6, 2013 @ 00:28:42
  Author: jollyroger-guest
Revision: 26407

Switch sqlparse to pybuild

Added:
  packages/sqlparse/trunk/debian/pypy-sqlparse.postinst
  packages/sqlparse/trunk/debian/pypy-sqlparse.prerm
Modified:
  packages/sqlparse/trunk/debian/changelog
  packages/sqlparse/trunk/debian/control
  packages/sqlparse/trunk/debian/python-sqlparse.install
  packages/sqlparse/trunk/debian/python3-sqlparse.install
  packages/sqlparse/trunk/debian/rules

Modified: packages/sqlparse/trunk/debian/changelog
===================================================================
--- packages/sqlparse/trunk/debian/changelog	2013-11-05 21:21:40 UTC (rev 26406)
+++ packages/sqlparse/trunk/debian/changelog	2013-11-06 00:28:42 UTC (rev 26407)
@@ -1,3 +1,13 @@
+sqlparse (0.1.10-1) UNRELEASED; urgency=low
+
+  * New upstream release(Closes: #722198)
+  * Switch to pybuild, create packages for PyPy
+  * debian/control:
+    - Build-Depend on pypy, dh-python
+    - Fix package descriptions
+
+ -- Andriy Senkovych <jolly_roger at itblog.org.ua>  Wed, 23 Oct 2013 20:04:00 +0300
+
 sqlparse (0.1.8-1) unstable; urgency=low
 
   [ Jakub Wilk ]

Modified: packages/sqlparse/trunk/debian/control
===================================================================
--- packages/sqlparse/trunk/debian/control	2013-11-05 21:21:40 UTC (rev 26406)
+++ packages/sqlparse/trunk/debian/control	2013-11-06 00:28:42 UTC (rev 26407)
@@ -3,7 +3,11 @@
 Priority: optional
 Maintainer: Andriy Senkovych <jolly_roger at itblog.org.ua>
 Uploaders: Debian Python Modules Team <python-modules-team at lists.alioth.debian.org>
-Build-Depends: debhelper (>= 7.0.50~), python-all (>= 2.6.5-13~), python3-all (>= 3.2), python-sphinx (>= 1.0.7+dfsg), python-pytest, python3-pytest, python-setuptools, python3-setuptools
+Build-Depends: debhelper (>= 7.0.50~), dh-python,
+ python-all (>= 2.6.5-13~), python3-all (>= 3.2), pypy,
+ python-sphinx (>= 1.0.7+dfsg),
+ python-pytest, python3-pytest,
+ python-setuptools, python3-setuptools
 Standards-Version: 3.9.4
 Homepage: http://code.google.com/p/python-sqlparse/
 Vcs-Svn: svn://anonscm.debian.org/python-modules/packages/sqlparse/trunk/
@@ -13,14 +17,15 @@
 
 Package: python-sqlparse
 Architecture: all
-Depends: ${misc:Depends}, ${python:Depends}
+Depends: ${misc:Depends}, ${python:Depends},
 Breaks: ${python:Breaks}
+Provides: ${python:Provides}
 Suggests: python-sqlparse-doc (>= 0.1.6-1)
-Description: non-validating SQL parser for Python
- Sqlparse is a library which provides support for parsing, splitting and 
- customizable formatting of SQL statements in Python environment. 
+Description: non-validating SQL parser for Python 2
+ Sqlparse is a library which provides support for parsing, splitting and
+ customizable formatting of SQL statements in Python environment.
  .
- This package also provides sqlformat script which can be used as external 
+ This package also provides sqlformat script which can be used as external
  SQL formatting utility.
  .
  This is the Python 2 version of the package.
@@ -29,26 +34,39 @@
 Architecture: all
 Depends: ${misc:Depends}, ${python3:Depends}
 Suggests: python-sqlparse-doc (>= 0.1.6-1)
-Description: non-validating SQL parser for Python
- Sqlparse is a library which provides support for parsing, splitting and 
- customizable formatting of SQL statements in Python environment. 
+Description: non-validating SQL parser for Python 3
+ Sqlparse is a library which provides support for parsing, splitting and
+ customizable formatting of SQL statements in Python environment.
  .
- This package also provides sqlformat script which can be used as external 
+ This package also provides sqlformat script which can be used as external
  SQL formatting utility.
  .
  This is the Python 3 version of the package.
 
+Package: pypy-sqlparse
+Architecture: all
+Depends: ${misc:Depends}, ${pypy:Depends}, pypy
+Suggests: python-sqlparse-doc (>= 0.1.6-1)
+Description: non-validating SQL parser for PyPy
+ Sqlparse is a library which provides support for parsing, splitting and
+ customizable formatting of SQL statements in Python environment.
+ .
+ This package also provides sqlformat script which can be used as external
+ SQL formatting utility.
+ .
+ This is the PyPy version of the package.
+
 Package: python-sqlparse-doc
 Architecture: all
 Section: doc
 Replaces: python-sqlparse(<< 0.1.6-1)
 Breaks: python-sqlparse (<< 0.1.6-1)
 Depends: ${sphinxdoc:Depends}, ${misc:Depends}
-Description: non-validating SQL parser for Python
- Sqlparse is a library which provides support for parsing, splitting and 
- customizable formatting of SQL statements in Python environment. 
+Description: documentation for non-validating SQL parser in Python
+ Sqlparse is a library which provides support for parsing, splitting and
+ customizable formatting of SQL statements in Python environment.
  .
- This package also provides sqlformat script which can be used as external 
+ This package also provides sqlformat script which can be used as external
  SQL formatting utility.
  .
- This is the Python 3 version of the package.
+ This package contains HTML documentation for provided module.

Added: packages/sqlparse/trunk/debian/pypy-sqlparse.postinst
===================================================================
--- packages/sqlparse/trunk/debian/pypy-sqlparse.postinst	                        (rev 0)
+++ packages/sqlparse/trunk/debian/pypy-sqlparse.postinst	2013-11-06 00:28:42 UTC (rev 26407)
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+set -e
+
+case "$1" in
+    configure)
+        update-alternatives --install \
+            /usr/bin/sqlformat sqlformat \
+            /usr/lib/pypy/bin/sqlparse 10 \
+            --slave \
+            /usr/share/man/man1/sqlformat.1.gz sqlformat.1.gz \
+            /usr/share/man/man1/sqlformat-pypy.1.gz
+    ;;
+
+    abort-upgrade|abort-remove|abort-deconfigure)
+    ;;
+
+    *)
+    echo "postinst called with unknown argument \`$1'" >&2
+    exit 1
+    ;;
+esac
+
+#DEBHELPER#
+

Added: packages/sqlparse/trunk/debian/pypy-sqlparse.prerm
===================================================================
--- packages/sqlparse/trunk/debian/pypy-sqlparse.prerm	                        (rev 0)
+++ packages/sqlparse/trunk/debian/pypy-sqlparse.prerm	2013-11-06 00:28:42 UTC (rev 26407)
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+set -e
+
+case "$1" in
+	remove|deconfigure)
+		update-alternatives --remove sqlformat \
+            /usr/lib/pypy/bin/sqlformat
+	;;
+
+	upgrade|failed-upgrade)
+	;;
+
+	*)
+		echo "prerm called with unknown argument \`$1'" >&2
+		exit 1
+	;;
+esac
+
+#DEBHELPER#
+
+exit 0

Modified: packages/sqlparse/trunk/debian/python-sqlparse.install
===================================================================
--- packages/sqlparse/trunk/debian/python-sqlparse.install	2013-11-05 21:21:40 UTC (rev 26406)
+++ packages/sqlparse/trunk/debian/python-sqlparse.install	2013-11-06 00:28:42 UTC (rev 26407)
@@ -1,2 +0,0 @@
-/usr/lib/python2*
-/usr/bin/sqlformat-2*

Modified: packages/sqlparse/trunk/debian/python3-sqlparse.install
===================================================================
--- packages/sqlparse/trunk/debian/python3-sqlparse.install	2013-11-05 21:21:40 UTC (rev 26406)
+++ packages/sqlparse/trunk/debian/python3-sqlparse.install	2013-11-06 00:28:42 UTC (rev 26407)
@@ -1,2 +0,0 @@
-/usr/lib/python3*
-/usr/bin/sqlformat-3*

Modified: packages/sqlparse/trunk/debian/rules
===================================================================
--- packages/sqlparse/trunk/debian/rules	2013-11-05 21:21:40 UTC (rev 26406)
+++ packages/sqlparse/trunk/debian/rules	2013-11-06 00:28:42 UTC (rev 26407)
@@ -1,57 +1,38 @@
 #!/usr/bin/make -f
 
-PYTHON2=$(shell pyversions -vr)
-PYTHON3=$(shell py3versions -vr)
-
 # Prevent setuptools/distribute from accessing the internet.
-export http_proxy = http://127.0.9.1:9
+#export http_proxy = http://127.0.9.1:9
+#export https_proxy = https://127.0.9.1:9
 
+export PYBUILD_DESTDIR_python2=debian/python-sqlparse/
+export PYBUILD_DESTDIR_python3=debian/python3-sqlparse/
+export PYBUILD_DESTDIR_pypy=debian/pypy-sqlparse/
+export PYBUILD_TEST_PYTEST=1
+export PYBUILD_TEST_ARGS=-v {dir}/tests
+export PYBUILD_VERBOSE=1
+
 %:
-	dh $@ --with python2,python3,sphinxdoc --buildsystem python_distutils
+	dh $@ --with python2,python3,pypy,sphinxdoc --buildsystem pybuild
 
-
-ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
-test-python3%:
-	2to3 -w sqlparse tests
-	py.test-3$* -v
-	find . -name \*.bak |xargs rename -vf 's/\.bak$$//' 
-
-test-python%:
-	py.test-$* -v
-
-override_dh_auto_test: $(PYTHON2:%=test-python%) $(PYTHON3:%=test-python%)
-endif
-
-build-python3%:
-	python3 setup.py build
-
-build-python%:
-	python$* setup.py build
-
-override_dh_auto_build: $(PYTHON3:%=build-python%)
-	dh_auto_build
-
-install-python3%:
-	python3$* setup.py install --root=$(CURDIR)/debian/tmp --install-layout=deb
-	mv debian/tmp/usr/bin/sqlformat debian/tmp/usr/bin/sqlformat-3
-	2to3 -nw debian/tmp/usr/bin/sqlformat-3
-
-override_dh_auto_install: $(PYTHON3:%=install-python%)
-	dh_auto_install
-	mv debian/tmp/usr/bin/sqlformat debian/tmp/usr/bin/sqlformat-2
-
 override_dh_auto_clean:
 	dh_auto_clean
-	rm -rf docs/build build *.egg-info
-	rm -f debian/sqlformat-2.1 debian/sqlformat-3.1
+	rm -rf docs/build build *.egg-info debian/sqlformat-*.1
 
-install-manpages3%:
+override_dh_installman:
+	cp docs/sqlformat.1 debian/sqlformat-2.1
+	dh_installman -p python-sqlparse debian/sqlformat-2.1
 	cp docs/sqlformat.1 debian/sqlformat-3.1
 	dh_installman -p python3-sqlparse debian/sqlformat-3.1
+	cp docs/sqlformat.1 debian/sqlformat-pypy.1
+	dh_installman -p pypy-sqlparse debian/sqlformat-pypy.1
 
-override_dh_installman: $(PYTHON3:%=install-manpages%)
-	cp docs/sqlformat.1 debian/sqlformat-2.1
-	dh_installman -p python-sqlparse debian/sqlformat-2.1
+override_dh_auto_install:
+	dh_auto_install
+	sed -i '1s/python/pypy/' $(PYBUILD_DESTDIR_pypy)/usr/lib/pypy/bin/sqlformat
+	mv $(PYBUILD_DESTDIR_python2)/usr/bin/sqlformat \
+		$(PYBUILD_DESTDIR_python2)/usr/bin/sqlformat-2
+	mv $(PYBUILD_DESTDIR_python3)/usr/bin/sqlformat \
+		$(PYBUILD_DESTDIR_python3)/usr/bin/sqlformat-3
 
 build: build-indep
 build-indep: docs/build/html




More information about the Python-modules-commits mailing list