aboutsummaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
Diffstat (limited to 'debian')
-rw-r--r--debian/changelog5
-rw-r--r--debian/patches/django-1.7-compat.patch37
-rw-r--r--debian/patches/fix-testsuite.patch39
-rw-r--r--debian/patches/series2
4 files changed, 82 insertions, 1 deletions
diff --git a/debian/changelog b/debian/changelog
index c8a1198..ae212cd 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,9 @@
-python-django-tagging (1:0.3.1-4) UNRELEASED; urgency=medium
+python-django-tagging (1:0.3.1-4) unstable; urgency=medium
* Drop David Spreen from Uploaders. Closes: #738932
+ * Add fix-testsuite.patch and now run the testsuite.
+ * Add django-1.7-compat.patch to make it work with Django 1.7.
+ Closes: #755624
-- Raphaël Hertzog <hertzog@debian.org> Fri, 14 Feb 2014 09:31:36 +0100
diff --git a/debian/patches/django-1.7-compat.patch b/debian/patches/django-1.7-compat.patch
new file mode 100644
index 0000000..4e50ffe
--- /dev/null
+++ b/debian/patches/django-1.7-compat.patch
@@ -0,0 +1,37 @@
+Description: Add django 1.7 compatibility
+Author: Raphaël Hertzog <hertzog@debian.org>
+Bug-Debian: http://bugs.debian.org/755624
+Origin: vendor
+Last-Update: 2014-08-06
+
+--- python-django-tagging-0.3.1.orig/tagging/models.py
++++ python-django-tagging-0.3.1/tagging/models.py
+@@ -17,6 +17,8 @@ from tagging import settings
+ from tagging.utils import calculate_cloud, get_tag_list, get_queryset_and_model, parse_tag_input
+ from tagging.utils import LOGARITHMIC
+
++import collections
++
+ qn = connection.ops.quote_name
+
+ ############
+@@ -166,9 +168,16 @@ class TagManager(models.Manager):
+ # Django 1.2+
+ compiler = queryset.query.get_compiler(using='default')
+ extra_joins = ' '.join(compiler.get_from_clause()[0][1:])
+- where, params = queryset.query.where.as_sql(
+- compiler.quote_name_unless_alias, compiler.connection
+- )
++ if isinstance(compiler, collections.Callable):
++ # Django 1.7+
++ where, params = queryset.query.where.as_sql(
++ compiler, compiler.connection
++ )
++ else:
++ # Django 1.2-1.6
++ where, params = queryset.query.where.as_sql(
++ compiler.quote_name_unless_alias, compiler.connection
++ )
+ else:
+ # Django pre-1.2
+ extra_joins = ' '.join(queryset.query.get_from_clause()[0][1:])
diff --git a/debian/patches/fix-testsuite.patch b/debian/patches/fix-testsuite.patch
new file mode 100644
index 0000000..11de6c2
--- /dev/null
+++ b/debian/patches/fix-testsuite.patch
@@ -0,0 +1,39 @@
+Description: Fix settings for test suite
+Author: Raphaël Hertzog <hertzog@debian.org>
+Origin: vendor
+
+---
+The information above should follow the Patch Tagging Guidelines, please
+checkout http://dep.debian.net/deps/dep3/ to learn about the format.
+--- python-django-tagging-0.3.1.orig/tagging/tests/settings.py
++++ python-django-tagging-0.3.1/tagging/tests/settings.py
+@@ -3,22 +3,14 @@ DIRNAME = os.path.dirname(__file__)
+
+ DEFAULT_CHARSET = 'utf-8'
+
+-test_engine = os.environ.get("TAGGING_TEST_ENGINE", "sqlite3")
+-
+-DATABASE_ENGINE = test_engine
+-DATABASE_NAME = os.environ.get("TAGGING_DATABASE_NAME", "tagging_test")
+-DATABASE_USER = os.environ.get("TAGGING_DATABASE_USER", "")
+-DATABASE_PASSWORD = os.environ.get("TAGGING_DATABASE_PASSWORD", "")
+-DATABASE_HOST = os.environ.get("TAGGING_DATABASE_HOST", "localhost")
+-
+-if test_engine == "sqlite":
+- DATABASE_NAME = os.path.join(DIRNAME, 'tagging_test.db')
+- DATABASE_HOST = ""
+-elif test_engine == "mysql":
+- DATABASE_PORT = os.environ.get("TAGGING_DATABASE_PORT", 3306)
+-elif test_engine == "postgresql_psycopg2":
+- DATABASE_PORT = os.environ.get("TAGGING_DATABASE_PORT", 5432)
++DATABASES = {
++ 'default': {
++ 'ENGINE': 'django.db.backends.sqlite3',
++ 'NAME': os.path.join(DIRNAME, 'tagging_test.db'),
++ }
++}
+
++SECRET_KEY = 'liewoo1jie7TahTao3ci7xayee8gieg9ukee'
+
+ INSTALLED_APPS = (
+ 'django.contrib.contenttypes',
diff --git a/debian/patches/series b/debian/patches/series
index 4753ab0..5499ba6 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,3 @@
fix_calc_tag_weight
+fix-testsuite.patch
+django-1.7-compat.patch