[Python-modules-commits] r20488 - in packages/python-sunlight/trunk/debian (4 files)

paultag-guest at users.alioth.debian.org paultag-guest at users.alioth.debian.org
Fri Feb 17 16:40:22 UTC 2012


    Date: Friday, February 17, 2012 @ 16:40:18
  Author: paultag-guest
Revision: 20488

Building for python2, and python3.

Added:
  packages/python-sunlight/trunk/debian/python-sunlight-doc.doc-base
Modified:
  packages/python-sunlight/trunk/debian/control
  packages/python-sunlight/trunk/debian/rules
Deleted:
  packages/python-sunlight/trunk/debian/python-sunlight.doc-base

Modified: packages/python-sunlight/trunk/debian/control
===================================================================
--- packages/python-sunlight/trunk/debian/control	2012-02-17 15:31:44 UTC (rev 20487)
+++ packages/python-sunlight/trunk/debian/control	2012-02-17 16:40:18 UTC (rev 20488)
@@ -3,18 +3,49 @@
 Priority: optional
 Maintainer: Debian Python Modules Team <python-modules-team at lists.alioth.debian.org>
 Uploaders: Paul Tagliamonte <paultag at ubuntu.com>
-Build-Depends: debhelper (>= 8.0.0), python-all (>= 2.5),
- python-setuptools, python-sphinx (>= 1.0.7+dfsg)
+Build-Depends: debhelper (>= 8.0.0),
+ python-all (>= 2.5),
+ python-setuptools,
+ python-sphinx (>= 1.0.7+dfsg),
+ python3-all (>= 3.1.2),
+ python3-setuptools
 Standards-Version: 3.9.2
 Homepage: https://github.com/sunlightlabs/python-sunlight
 Vcs-Svn: svn://svn.debian.org/python-modules/packages/python-sunlight/
 Vcs-Browser: http://anonscm.debian.org/viewvc/python-modules/packages/python-sunlight/
 X-Python-Version: >= 2.6
+X-Python3-Version: >= 3.2
 
 Package: python-sunlight
 Architecture: all
-Depends: ${misc:Depends}, ${python:Depends}, ${sphinxdoc:Depends}
-Description: programmatically access U.S. goverment data
+Depends: ${misc:Depends}, ${python:Depends}
+Suggests: python-sunlight-doc
+Description: programmatically access U.S. goverment data (Python 2)
  Access U.S. Goverment data (such as federal and state legislators,
  bills, committees, and congressional record) through The Sunlight
  Foundation's set of APIs.
+ .
+ This package contains the Sunlight bindings for Python 2.
+
+Package: python3-sunlight
+Architecture: all
+Depends: ${misc:Depends}, ${python3:Depends}
+Suggests: python-sunlight-doc
+Description: programmatically access U.S. goverment data (Python 3)
+ Access U.S. Goverment data (such as federal and state legislators,
+ bills, committees, and congressional record) through The Sunlight
+ Foundation's set of APIs.
+ .
+ This package contains the Sunlight bindings for Python 3.
+
+Package: python-sunlight-doc
+Section: doc
+Architecture: all
+Depends: ${misc:Depends}, ${sphinxdoc:Depends}
+Description: documentation for the python-sunlight API bindings
+ API documentation and examples for the Python bindings into the Sunlight
+ Foundation's API set. The Sunlight Foundation provides data that relates to
+ the Goverment, such as federal and state Legislators, the Congressional Record,
+ or legislative instrument status and information.
+ .
+ This package contains documentation only.

Added: packages/python-sunlight/trunk/debian/python-sunlight-doc.doc-base
===================================================================
--- packages/python-sunlight/trunk/debian/python-sunlight-doc.doc-base	                        (rev 0)
+++ packages/python-sunlight/trunk/debian/python-sunlight-doc.doc-base	2012-02-17 16:40:18 UTC (rev 20488)
@@ -0,0 +1,9 @@
+Document: python-sunlight
+Title: Python Sunlight API bindings
+Author: Sunlight Labs
+Abstract: This manual describes the Python bindings to the Sunlight APIs.
+Section: Programming/Python
+
+Format: HTML
+Index: /usr/share/doc/python-sunlight-doc/html/index.html
+Files: /usr/share/doc/python-sunlight-doc/html/*

Deleted: packages/python-sunlight/trunk/debian/python-sunlight.doc-base
===================================================================
--- packages/python-sunlight/trunk/debian/python-sunlight.doc-base	2012-02-17 15:31:44 UTC (rev 20487)
+++ packages/python-sunlight/trunk/debian/python-sunlight.doc-base	2012-02-17 16:40:18 UTC (rev 20488)
@@ -1,9 +0,0 @@
-Document: python-sunlight
-Title: Python Sunlight API bindings
-Author: Sunlight Labs
-Abstract: This manual describes the Python bindings to the Sunlight APIs.
-Section: Programming/Python
-
-Format: HTML
-Index: /usr/share/doc/python-sunlight/html/index.html
-Files: /usr/share/doc/python-sunlight/html/*

Modified: packages/python-sunlight/trunk/debian/rules
===================================================================
--- packages/python-sunlight/trunk/debian/rules	2012-02-17 15:31:44 UTC (rev 20487)
+++ packages/python-sunlight/trunk/debian/rules	2012-02-17 16:40:18 UTC (rev 20488)
@@ -1,18 +1,42 @@
 #!/usr/bin/make -f
 
-PACKAGE_NAME=python-sunlight
-PACKAGE_DOCDIR=debian/$(PACKAGE_NAME)/usr/share/doc/$(PACKAGE_NAME)
+DOC_PACKAGE_NAME=python-sunlight-doc
+PY2_PACKAGE_NAME=python-sunlight
+PY3_PACKAGE_NAME=python3-sunlight
 
+PACKAGE_DOCDIR=debian/$(DOC_PACKAGE_NAME)/usr/share/doc/$(DOC_PACKAGE_NAME)
+
+PYVERS   := $(shell pyversions -r)
+PY3VERS  := $(shell py3versions -r)
+
 %:
-	dh $@ --with python2
+	dh $@ --with python2,python3,sphinxdoc
 
 override_dh_auto_clean:
 	dh_auto_clean
 	rm -rvf docs/build src/*.egg-info
 
+override_dh_auto_build:
+	set -xe; \
+	for py in $(PYVERS) $(PY3VERS); do \
+		$$py setup.py build; \
+	done
+	make -C docs html
+
+override_dh_auto_install:
+	set -xe; \
+	for py in $(PYVERS); do \
+		$$py setup.py install --skip-build --root debian/$(PY2_PACKAGE_NAME) \
+		--install-layout deb; \
+	done
+	set -xe; \
+		for py in $(PY3VERS); do \
+		$$py setup.py install --skip-build --root debian/$(PY3_PACKAGE_NAME) \
+		--install-layout deb; \
+	done
+
 override_dh_installdocs:
-	make -C docs html
-	mkdir -vp $(PACKAGE_DOCDIR)
+	mkdir -vp                $(PACKAGE_DOCDIR)
 	cp -vr ./docs/build/html $(PACKAGE_DOCDIR)
 	cp -vr ./examples        $(PACKAGE_DOCDIR)
 	dh_installdocs




More information about the Python-modules-commits mailing list