[Python-modules-commits] r21308 - in packages/django-markupfield/trunk/debian (4 files)

fladi-guest at users.alioth.debian.org fladi-guest at users.alioth.debian.org
Fri Apr 20 10:13:34 UTC 2012


    Date: Friday, April 20, 2012 @ 10:13:13
  Author: fladi-guest
Revision: 21308

Fix FTBFS with django (>= 1.4) (Closes: #669472).

Added:
  packages/django-markupfield/trunk/debian/settings.py
Modified:
  packages/django-markupfield/trunk/debian/changelog
  packages/django-markupfield/trunk/debian/control
  packages/django-markupfield/trunk/debian/rules

Modified: packages/django-markupfield/trunk/debian/changelog
===================================================================
--- packages/django-markupfield/trunk/debian/changelog	2012-04-20 09:58:01 UTC (rev 21307)
+++ packages/django-markupfield/trunk/debian/changelog	2012-04-20 10:13:13 UTC (rev 21308)
@@ -1,11 +1,14 @@
-django-markupfield (1.0.2-2) unstable; urgency=low
+django-markupfield (1.0.2-2) UNRELEASED; urgency=low
 
   * Change order of my name.
   * Update DEP-5 URL to 1.0.
   * Bump Standards-Version to 3.9.3.
   * Update years in d/copyright.
+  * Fix tests for django (>= 1.4) FTBFS (Closes: #669472).
+    - Ship out own settings.py
+    - Bump B-D for python-django to (>= 1.4)
 
- -- Michael Fladischer <FladischerMichael at fladi.at>  Fri, 20 Apr 2012 11:57:17 +0200
+ -- Michael Fladischer <FladischerMichael at fladi.at>  Fri, 20 Apr 2012 11:58:50 +0200
 
 django-markupfield (1.0.2-1) unstable; urgency=low
 

Modified: packages/django-markupfield/trunk/debian/control
===================================================================
--- packages/django-markupfield/trunk/debian/control	2012-04-20 09:58:01 UTC (rev 21307)
+++ packages/django-markupfield/trunk/debian/control	2012-04-20 10:13:13 UTC (rev 21308)
@@ -5,7 +5,7 @@
 Uploaders: Michael Fladischer <FladischerMichael at fladi.at>
 Build-Depends: debhelper (>= 7.0.50),
                python-all (>= 2.5),
-               python-django (>= 1.1),
+               python-django (>= 1.4),
                python-docutils,
                python-markdown,
                python-support

Modified: packages/django-markupfield/trunk/debian/rules
===================================================================
--- packages/django-markupfield/trunk/debian/rules	2012-04-20 09:58:01 UTC (rev 21307)
+++ packages/django-markupfield/trunk/debian/rules	2012-04-20 10:13:13 UTC (rev 21308)
@@ -6,10 +6,10 @@
 override_dh_auto_test:
 ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
 	django-admin startproject testproject
-	cp markupfield/tests/*.py testproject/
+	cp debian/settings.py testproject/testproject
 	set -e; \
 	for python in $(shell pyversions -r); do \
-	  $$python testproject/manage.py test --settings=testproject.settings --pythonpath=. ; \
+		PYTHONPATH=".:testproject" $$python testproject/manage.py test --settings=testproject.settings ; \
 	done
 	rm -rf testproject
 endif

Added: packages/django-markupfield/trunk/debian/settings.py
===================================================================
--- packages/django-markupfield/trunk/debian/settings.py	                        (rev 0)
+++ packages/django-markupfield/trunk/debian/settings.py	2012-04-20 10:13:13 UTC (rev 21308)
@@ -0,0 +1,22 @@
+import markdown
+from docutils.core import publish_parts
+
+def render_rest(markup):
+    parts = publish_parts(source=markup, writer_name="html4css1")
+    return parts["fragment"]
+
+DATABASES = {
+    'default': {
+        'ENGINE': 'django.db.backends.sqlite3',
+        'NAME': 'testproject/test.db3',
+    }
+}
+
+MARKUP_FIELD_TYPES = [
+    ('markdown', markdown.markdown),
+    ('ReST', render_rest),
+]
+
+INSTALLED_APPS = (
+    'markupfield.tests',
+)




More information about the Python-modules-commits mailing list