[Python-modules-commits] r12597 - in packages/sqlalchemy/trunk/debian (5 files)

piotr at users.alioth.debian.org piotr at users.alioth.debian.org
Tue Apr 13 22:16:13 UTC 2010


    Date: Tuesday, April 13, 2010 @ 22:16:11
  Author: piotr
Revision: 12597

* Add Python 3 support (closes: #575194)
  - new python3-sqlalchemy binary package, no python3-sqlalchemy-ext
    package for now as C extension is not compatible with Python 3 yet
  - python3-all-dev and python3-setuptools added to build dependencies

Added:
  packages/sqlalchemy/trunk/debian/python3-sqlalchemy.postinst
  packages/sqlalchemy/trunk/debian/python3-sqlalchemy.prerm
Modified:
  packages/sqlalchemy/trunk/debian/changelog
  packages/sqlalchemy/trunk/debian/control
  packages/sqlalchemy/trunk/debian/rules

Modified: packages/sqlalchemy/trunk/debian/changelog
===================================================================
--- packages/sqlalchemy/trunk/debian/changelog	2010-04-13 20:39:52 UTC (rev 12596)
+++ packages/sqlalchemy/trunk/debian/changelog	2010-04-13 22:16:11 UTC (rev 12597)
@@ -1,3 +1,12 @@
+sqlalchemy (0.6~beta3-2) experimental; urgency=low
+
+  * Add Python 3 support (closes: #575194)
+    - new python3-sqlalchemy binary package, no python3-sqlalchemy-ext
+      package for now as C extension is not compatible with Python 3 yet
+    - python3-all-dev and python3-setuptools added to build dependencies
+
+ -- Piotr Ożarowski <piotr at debian.org>  Tue, 13 Apr 2010 23:00:42 +0200
+
 sqlalchemy (0.6~beta3-1) experimental; urgency=low
 
   * New upstream release

Modified: packages/sqlalchemy/trunk/debian/control
===================================================================
--- packages/sqlalchemy/trunk/debian/control	2010-04-13 20:39:52 UTC (rev 12596)
+++ packages/sqlalchemy/trunk/debian/control	2010-04-13 22:16:11 UTC (rev 12597)
@@ -3,8 +3,9 @@
 Priority: optional
 Maintainer: Piotr Ożarowski <piotr at debian.org>
 Uploaders: Debian Python Modules Team <python-modules-team at lists.alioth.debian.org>
-Build-Depends: debhelper (>= 5.0.38), python-all-dev (>= 2.3.5-11),
- python-support (>= 0.6.4), python-setuptools (>= 0.6b3-1~)
+Build-Depends: debhelper (>= 5.0.38), python-support (>= 0.6.4),
+ python-all-dev (>= 2.3.5-11), python3-all-dev,
+ python-setuptools (>= 0.6b3-1~), python3-setuptools
 Build-Depends-Indep: python-sphinx (>= 0.6), python-mako
 Standards-Version: 3.8.4
 Homepage: http://www.sqlalchemy.org/
@@ -80,3 +81,44 @@
  This package contains the documentation for SQLAlchemy in HTML format.
  It's usable as a comprehensive reference, a user guide and a tutorial
  all-in-one.
+
+Package: python3-sqlalchemy
+Architecture: all
+Depends: ${python:Depends}, ${misc:Depends}
+Recommends: python3-sqlalchemy-ext
+Suggests: python-sqlalchemy-doc
+Description: SQL toolkit and Object Relational Mapper for Python 3
+ SQLAlchemy is an SQL database abstraction library for Python.
+ Its strengths are:
+  * full power and flexibility of SQL. SQLAlchemy provides a full suite
+    of well known enterprise-level persistence patterns, designed for
+    efficient and high-performing database access, adapted into a simple
+    and Pythonic domain language.
+  * extremely easy to use for all the basic tasks, such as: accessing pooled
+    connections, constructing SQL from Python expressions, finding object
+    instances, and committing object modifications back to the database.
+  * powerful enough for complicated tasks, such as: eager load a graph of
+    objects and their dependencies via joins; map recursive adjacency
+    structures automatically; map objects to not just tables but to any
+    arbitrary join or select statement; combine multiple tables together to
+    load whole sets of otherwise unrelated objects from a single result set;
+    commit entire graphs of object changes in one step.
+  * built to conform to what DBAs demand, including the ability to swap out
+    generated SQL with hand-optimized statements, full usage of bind parameters
+    for all literal values, fully transactionalized and consistent updates
+    using Unit of Work.
+  * modular. Different parts of SQLAlchemy can be used independently of the
+    rest, including the connection pool, SQL construction, and ORM. SQLAlchemy
+    is constructed in an open style that allows plenty of customization, with
+    an architecture that supports custom datatypes, custom SQL extensions, and
+    ORM plugins which can augment or extend mapping functionality.
+
+#Package: python3-sqlalchemy-ext
+#Architecture: any
+#Depends: python-sqlalchemy (= ${source:Version}), ${python:Depends}, ${shlibs:Depends}, ${misc:Depends}
+#Provides: ${python:Provides}
+#XB-Python-Version: ${python:Versions}
+#Description: SQL toolkit and Object Relational Mapper for Python3 - C extension
+# SQLAlchemy is an SQL database abstraction library for Python.
+# .
+# This package contains C coded extension accelerator for SQLAlchemy.

Added: packages/sqlalchemy/trunk/debian/python3-sqlalchemy.postinst
===================================================================
--- packages/sqlalchemy/trunk/debian/python3-sqlalchemy.postinst	                        (rev 0)
+++ packages/sqlalchemy/trunk/debian/python3-sqlalchemy.postinst	2010-04-13 22:16:11 UTC (rev 12597)
@@ -0,0 +1,8 @@
+#! /bin/sh -e
+
+#if which pycompile >/dev/null 2>&1; then
+#	pycompile -p python3-sqlalchemy
+#fi
+dpkg -L python3-sqlalchemy | grep 3.1/dist-packages/sqlalchemy.*\.py$ | python3.1 -m compileall -qi -
+
+#DEBHELPER#

Added: packages/sqlalchemy/trunk/debian/python3-sqlalchemy.prerm
===================================================================
--- packages/sqlalchemy/trunk/debian/python3-sqlalchemy.prerm	                        (rev 0)
+++ packages/sqlalchemy/trunk/debian/python3-sqlalchemy.prerm	2010-04-13 22:16:11 UTC (rev 12597)
@@ -0,0 +1,8 @@
+#! /bin/sh -e
+
+#if which pyclean >/dev/null 2>&1; then
+#	pyclean -p python3-sqlalchemy
+#fi
+find /usr/lib/python3.1/dist-packages/sqlalchemy/ -name '*\.pyc' -delete >/dev/null
+
+#DEBHELPER#

Modified: packages/sqlalchemy/trunk/debian/rules
===================================================================
--- packages/sqlalchemy/trunk/debian/rules	2010-04-13 20:39:52 UTC (rev 12596)
+++ packages/sqlalchemy/trunk/debian/rules	2010-04-13 22:16:11 UTC (rev 12597)
@@ -2,16 +2,19 @@
 
 #export DH_VERBOSE=1
 p_name=python-sqlalchemy
-m_name=SQLAlchemy
 
 PYVERS=$(shell pyversions -vr)
-PKGDIR=$(CURDIR)/debian/${p_name}
-#-include /usr/share/python/python.mk # for py_setup_install_args (ignore if not available yet)
+pkgdir = $(CURDIR)/debian/python$(if $(patsubst 3.%,,$(1)),,3)-sqlalchemy
 
+-include /usr/share/python/python.mk
+ifeq (,$(py_libdir))
+   py_libdir = /usr/lib/python$(subst python,,$(1))/site-packages
+endif
+
 clean:
 	dh_testdir
 	dh_testroot
-	rm -rf $(CURDIR)/lib/${m_name}.egg-info $(CURDIR)/build/
+	rm -rf $(CURDIR)/lib/SQLAlchemy.egg-info $(CURDIR)/build/
 	find . -name '*\.py[co]' -delete
 	dh_clean build-docs build-stamp install-docs \
 		$(PYVERS:%=install-python%) $(PYVERS:%=build-python%) \
@@ -34,8 +37,8 @@
 	dh_testdir
 	dh_installdirs -i
 	cd doc/build && sphinx-build -N -q -E -b html . \
-	 $(PKGDIR)-doc/usr/share/doc/${p_name}-doc/html/
-	rm -rf $(PKGDIR)-doc/usr/share/doc/${p_name}-doc/html/.doctrees
+	 $(call pkgdir,2.X)-doc/usr/share/doc/${p_name}-doc/html/
+	rm -rf $(call pkgdir,2.X)-doc/usr/share/doc/${p_name}-doc/html/.doctrees
 	touch $@
 
 install-docs: build-docs
@@ -53,18 +56,22 @@
 		/usr/share/doc/${p_name}/rst
 	touch $@
 
-install: build $(PYVERS:%=install-python%)
+install: build $(PYVERS:%=install-python%) install-python3.1
 install-python%: build
 	#python$* ./setup.py install --skip-build \
-	#	--root $(PKGDIR) $(py_setup_install_args)
+	#	--root $(call pkgdir,$*) $(py_setup_install_args)
 	#touch $@
-	mkdir -p $(PKGDIR)-ext/usr/lib/python$*/site-packages/sqlalchemy
+	mkdir -p $(call pkgdir,$*)-ext$(call py_libdir,$*)/sqlalchemy
 	mv $(CURDIR)/build/lib.*-$*/sqlalchemy/*.so \
-	 $(PKGDIR)-ext/usr/lib/python$*/site-packages/sqlalchemy/
+	 $(call pkgdir,$*)-ext$(call py_libdir,$*)/sqlalchemy/
 	# hack to workaround distutils/setuptools bug:
-	mkdir -p $(PKGDIR)/usr/lib/python$*/site-packages/
-	cp -R $(CURDIR)/build/lib.*-$*/* $(PKGDIR)/usr/lib/python$*/site-packages/
+	mkdir -p $(call pkgdir,$*)$(call py_libdir,$*)
+	cp -R $(CURDIR)/build/lib.*-$*/* $(call pkgdir,$*)$(call py_libdir,$*)
 
+install-python3.1:
+	python3.1 ./setup.py install $(py_setup_install_args) \
+		--root $(call pkgdir,3.1)
+
 binary-indep: build install install-docs
 	dh_testdir -i
 	dh_testroot -i
@@ -72,8 +79,10 @@
 	dh_installchangelogs -i
 	dh_installdocs -i
 	dh_installexamples -i
-	rm -rf $(PKGDIR)-doc/usr/share/doc/${p_name}-doc/doc/build \
-	       $(PKGDIR)-doc/usr/share/doc/${p_name}-doc/examples/README
+	rm -rf $(call pkgdir,2.X)-doc/usr/share/doc/${p_name}-doc/doc/build \
+	       $(call pkgdir,2.X)-doc/usr/share/doc/${p_name}-doc/examples/README
+	rm -f $(call pkgdir,3.X)/usr/share/doc/NEWS.Debian
+	find $(CURDIR)/debian/ -name '*.py[co]' -delete
 	dh_pysupport -i
 	dh_compress -i -X.py -X.js -X.html
 	dh_fixperms -i




More information about the Python-modules-commits mailing list