[Python-modules-commits] r30216 - in packages/django-classy-tags/trunk/debian (8 files)

fladi-guest at users.alioth.debian.org fladi-guest at users.alioth.debian.org
Thu Aug 21 12:35:32 UTC 2014


    Date: Thursday, August 21, 2014 @ 12:35:30
  Author: fladi-guest
Revision: 30216

Add support for Python3 and Django-1.7.

Added:
  packages/django-classy-tags/trunk/debian/patches/django-1.7.patch
  packages/django-classy-tags/trunk/debian/python3-django-classy-tags.docs
  packages/django-classy-tags/trunk/debian/python3-django-classy-tags.lintian-overrides
Modified:
  packages/django-classy-tags/trunk/debian/changelog
  packages/django-classy-tags/trunk/debian/control
  packages/django-classy-tags/trunk/debian/patches/series
  packages/django-classy-tags/trunk/debian/rules
Deleted:
  packages/django-classy-tags/trunk/debian/python-django-classy-tags.install

Modified: packages/django-classy-tags/trunk/debian/changelog
===================================================================
--- packages/django-classy-tags/trunk/debian/changelog	2014-08-21 10:45:57 UTC (rev 30215)
+++ packages/django-classy-tags/trunk/debian/changelog	2014-08-21 12:35:30 UTC (rev 30216)
@@ -1,8 +1,10 @@
 django-classy-tags (0.5.1-3) unstable; urgency=medium
 
+  * Add django-1.7.patch to make tests run with Django-1.7 (Closes: #755595).
+  * Add Python3 support.
   * Fix grammar mistakes in package description (Closes: #688340).
 
- -- Michael Fladischer <FladischerMichael at fladi.at>  Fri, 20 Jun 2014 14:21:12 +0200
+ -- Michael Fladischer <FladischerMichael at fladi.at>  Thu, 21 Aug 2014 14:21:52 +0200
 
 django-classy-tags (0.5.1-2) unstable; urgency=low
 

Modified: packages/django-classy-tags/trunk/debian/control
===================================================================
--- packages/django-classy-tags/trunk/debian/control	2014-08-21 10:45:57 UTC (rev 30215)
+++ packages/django-classy-tags/trunk/debian/control	2014-08-21 12:35:30 UTC (rev 30216)
@@ -8,9 +8,13 @@
                python-all,
                python-django (>= 1.5),
                python-setuptools,
-               python-sphinx (>= 1.0.7+dfsg)
+               python-sphinx (>= 1.0.7+dfsg),
+               python3-all,
+               python3-django,
+               python3-setuptools
 Standards-Version: 3.9.5
 X-Python-Version: >= 2.6
+X-Python3-Version: >= 3.0
 Homepage: https://github.com/ojii/django-classy-tags
 Vcs-Svn: svn://anonscm.debian.org/python-modules/packages/django-classy-tags/trunk/
 Vcs-Browser: http://anonscm.debian.org/viewvc/python-modules/packages/django-classy-tags/trunk/
@@ -37,6 +41,30 @@
  arguments into keyword arguments in it’s render method and calls its
  render_tag method with those keyword arguments.
 
+Package: python3-django-classy-tags
+Architecture: all
+Depends: python3-django,
+         ${misc:Depends},
+         ${python3:Depends}
+Suggests: python-django-classy-tags-doc
+Description: Class based template tags for Django projects (Python3 version)
+ django-classy-tags is an approach at making writing template tags in
+ Django easier, shorter and more fun. It provides an extensible
+ argument parser which reduces most of the boiler plate code you
+ usually have to write when coding custom template tags.
+ .
+ django-classy-tags does no magic by design. Thus you will not get
+ automatic registering/loading of your tags like other solutions
+ provide. You will not get automatic argument guessing from function
+ signatures but rather you have to declare what arguments your tag
+ accepts. There is no magic in your template tag class either,
+ it’s just a subclass of django.template.Node which invokes a parser
+ class to parse the arguments when it’s initialized and resolves those
+ arguments into keyword arguments in it’s render method and calls its
+ render_tag method with those keyword arguments.
+ .
+ This package contains the Python 3 version of the library.
+
 Package: python-django-classy-tags-doc
 Section: doc
 Architecture: all

Added: packages/django-classy-tags/trunk/debian/patches/django-1.7.patch
===================================================================
--- packages/django-classy-tags/trunk/debian/patches/django-1.7.patch	                        (rev 0)
+++ packages/django-classy-tags/trunk/debian/patches/django-1.7.patch	2014-08-21 12:35:30 UTC (rev 30216)
@@ -0,0 +1,26 @@
+Description: Initialize Django before tests are run.
+ Django 1.7 introduced changes to its start-up sequence. See:
+ https://docs.djangoproject.com/en/dev/releases/1.7/#standalone-scripts
+Author: Michael Fladischer <FladischerMichael at fladi.at>
+Last-Update: 2014-08-21
+Forwarded: https://github.com/ojii/django-classy-tags/pull/20
+
+--- a/runtests.py
++++ b/runtests.py
+@@ -28,6 +28,7 @@
+ ROOT_URLCONF = 'runtests'
+ 
+ def main():
++    import django
+     from django.conf import settings
+     settings.configure(
+         INSTALLED_APPS = INSTALLED_APPS,
+@@ -44,6 +45,8 @@
+ 
+     test_runner = TestRunner(verbosity=1, interactive=False, failfast=False)
+     warnings.simplefilter("ignore")
++    if django.VERSION >= (1, 7):
++        django.setup()
+     failures = test_runner.run_tests(['classytags'])
+     sys.exit(failures)
+ 

Modified: packages/django-classy-tags/trunk/debian/patches/series
===================================================================
--- packages/django-classy-tags/trunk/debian/patches/series	2014-08-21 10:45:57 UTC (rev 30215)
+++ packages/django-classy-tags/trunk/debian/patches/series	2014-08-21 12:35:30 UTC (rev 30216)
@@ -1 +1,2 @@
 intersphinx.patch
+django-1.7.patch

Deleted: packages/django-classy-tags/trunk/debian/python-django-classy-tags.install
===================================================================
--- packages/django-classy-tags/trunk/debian/python-django-classy-tags.install	2014-08-21 10:45:57 UTC (rev 30215)
+++ packages/django-classy-tags/trunk/debian/python-django-classy-tags.install	2014-08-21 12:35:30 UTC (rev 30216)
@@ -1 +0,0 @@
-usr/

Added: packages/django-classy-tags/trunk/debian/python3-django-classy-tags.docs
===================================================================
--- packages/django-classy-tags/trunk/debian/python3-django-classy-tags.docs	                        (rev 0)
+++ packages/django-classy-tags/trunk/debian/python3-django-classy-tags.docs	2014-08-21 12:35:30 UTC (rev 30216)
@@ -0,0 +1 @@
+README.rst

Added: packages/django-classy-tags/trunk/debian/python3-django-classy-tags.lintian-overrides
===================================================================
--- packages/django-classy-tags/trunk/debian/python3-django-classy-tags.lintian-overrides	                        (rev 0)
+++ packages/django-classy-tags/trunk/debian/python3-django-classy-tags.lintian-overrides	2014-08-21 12:35:30 UTC (rev 30216)
@@ -0,0 +1,2 @@
+# Upstream does not provide a separate changelog.
+python3-django-classy-tags: no-upstream-changelog

Modified: packages/django-classy-tags/trunk/debian/rules
===================================================================
--- packages/django-classy-tags/trunk/debian/rules	2014-08-21 10:45:57 UTC (rev 30215)
+++ packages/django-classy-tags/trunk/debian/rules	2014-08-21 12:35:30 UTC (rev 30216)
@@ -1,16 +1,44 @@
 #!/usr/bin/make -f
 
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+PYVERS :=  $(shell pyversions -r)
+PY3VERS := $(shell py3versions -r)
+
 %:
-	dh $@ --with python2,sphinxdoc
+	dh $@ --with python2,python3,sphinxdoc
 
 override_dh_auto_build:
+	set -e; \
+	for py in $(PYVERS) $(PY3VERS); do \
+		$$py -B setup.py build; \
+	done
 	PYTHONPATH=. sphinx-build -b html -d docs/_build/.doctrees -N docs docs/_build/html
-	dh_auto_build
 
+override_dh_auto_clean:
+	set -e; \
+	for py in $(PYVERS) $(PY3VERS); do \
+		$$py -B setup.py clean; \
+		rm -rf build; \
+	done
+
+override_dh_auto_install:
+	set -e; \
+	for py in $(PYVERS); do \
+		$$py -B setup.py install --skip-build --root debian/python-django-classy-tags \
+		                      --install-layout deb; \
+	done
+	set -e; \
+	for py in $(PY3VERS); do \
+		$$py -B setup.py install --skip-build --root debian/python3-django-classy-tags \
+		                      --install-layout deb; \
+	done
+
 override_dh_auto_test:
 ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
 	set -e; \
-	for python in $(shell pyversions -r); do \
+	for python in $(PYVERS) $(PY3VERS); do \
 		PYTHONPATH="." $$python runtests.py; \
 	done
 endif




More information about the Python-modules-commits mailing list