[Python-modules-commits] r30448 - in packages/django-countries/trunk/debian (13 files)

fladi-guest at users.alioth.debian.org fladi-guest at users.alioth.debian.org
Mon Sep 1 13:14:15 UTC 2014


    Date: Monday, September 1, 2014 @ 13:14:14
  Author: fladi-guest
Revision: 30448

Add Python3 support.

Added:
  packages/django-countries/trunk/debian/python-django-countries.README.Debian
    (from rev 30319, packages/django-countries/trunk/debian/README.Debian)
  packages/django-countries/trunk/debian/python-django-countries.docs
    (from rev 30319, packages/django-countries/trunk/debian/docs)
  packages/django-countries/trunk/debian/python3-django-countries.README.Debian
  packages/django-countries/trunk/debian/python3-django-countries.dirs
  packages/django-countries/trunk/debian/python3-django-countries.docs
  packages/django-countries/trunk/debian/python3-django-countries.lintian-overrides
  packages/django-countries/trunk/debian/python3-django-countries.postinst
  packages/django-countries/trunk/debian/python3-django-countries.prerm
  packages/django-countries/trunk/debian/python3-django-countries.triggers
Modified:
  packages/django-countries/trunk/debian/control
  packages/django-countries/trunk/debian/rules
Deleted:
  packages/django-countries/trunk/debian/README.Debian
  packages/django-countries/trunk/debian/docs

Deleted: packages/django-countries/trunk/debian/README.Debian
===================================================================
--- packages/django-countries/trunk/debian/README.Debian	2014-09-01 10:13:39 UTC (rev 30447)
+++ packages/django-countries/trunk/debian/README.Debian	2014-09-01 13:14:14 UTC (rev 30448)
@@ -1,38 +0,0 @@
-django-countries for Debian
----------------------------
-
-Flag icon support:
-------------------
-
-This package does not include the flag icons. They are provided in separate
-packages:
-  - famfamfam-flags-png
-  - famfamfam-flags-gif
-
-The package come with a symlink that gets picked up by
-django.contrib.staticfiles. It will make sure that all flag icons from either
-famfamfam-flags-png or famfamfam-flags-gif are copied to your STATIC_ROOT.
-
-Now for PNG flag icons include this in settings.py:
-
-  COUNTRIES_FLAG_URL = '/media/flags/%s.png'
-
-Or just change the suffix to use the GIF flags:
-
-  COUNTRIES_FLAG_URL = '/media/flags/%s.gif'
-
-Translations:
--------------
-
-The package iso-codes comes with it's own translations of country names.
-django-countries has been patched to automatically use these translations.
-
-Custom country codes:
----------------------
-
-It is possible (but not encouraged because of missing translations) to use a
-modified iso_3166.xml file by adding this to your settings.py:
-
-  COUNTRIES_ISO_XML = '/path/to/custom_iso_3166.xml'
-
- -- Fladischer Michael <FladischerMichael at fladi.at>  Sat, 02 Apr 2010 11:11:51 +0100

Modified: packages/django-countries/trunk/debian/control
===================================================================
--- packages/django-countries/trunk/debian/control	2014-09-01 10:13:39 UTC (rev 30447)
+++ packages/django-countries/trunk/debian/control	2014-09-01 13:14:14 UTC (rev 30448)
@@ -8,9 +8,13 @@
                iso-codes,
                python-all,
                python-django,
-               python-setuptools
+               python-setuptools,
+               python3-all,
+               python3-django,
+               python3-setuptools
 Standards-Version: 3.9.5
 X-Python-Version: >= 2.5
+X-Python3-Version: >= 3.3
 Homepage: http://bitbucket.org/smileychris/django-countries/
 Vcs-Svn: svn://anonscm.debian.org/python-modules/packages/django-countries/trunk/
 Vcs-Browser: http://anonscm.debian.org/viewvc/python-modules/packages/django-countries/trunk/
@@ -27,3 +31,18 @@
  use with forms, and a country field for models.
  It also includes a small template filter for getting country flags by
  ISO 3166-1 alpha-2 country code.
+
+Package: python3-django-countries
+Architecture: all
+Depends: famfamfam-flag-png | famfamfam-flag-gif,
+         iso-codes,
+         python3-django,
+         ${misc:Depends},
+         ${python3:Depends}
+Description: provides a country field for Django models (Python3 version)
+ A Django application which provides all ISO 3166-1 countries as choices for
+ use with forms, and a country field for models.
+ It also includes a small template filter for getting country flags by
+ ISO 3166-1 alpha-2 country code.
+ .
+ This package contains the Python 3 version of the library.

Deleted: packages/django-countries/trunk/debian/docs
===================================================================
--- packages/django-countries/trunk/debian/docs	2014-09-01 10:13:39 UTC (rev 30447)
+++ packages/django-countries/trunk/debian/docs	2014-09-01 13:14:14 UTC (rev 30448)
@@ -1 +0,0 @@
-README.rst

Copied: packages/django-countries/trunk/debian/python-django-countries.README.Debian (from rev 30319, packages/django-countries/trunk/debian/README.Debian)
===================================================================
--- packages/django-countries/trunk/debian/python-django-countries.README.Debian	                        (rev 0)
+++ packages/django-countries/trunk/debian/python-django-countries.README.Debian	2014-09-01 13:14:14 UTC (rev 30448)
@@ -0,0 +1,38 @@
+django-countries for Debian
+---------------------------
+
+Flag icon support:
+------------------
+
+This package does not include the flag icons. They are provided in separate
+packages:
+  - famfamfam-flags-png
+  - famfamfam-flags-gif
+
+The package come with a symlink that gets picked up by
+django.contrib.staticfiles. It will make sure that all flag icons from either
+famfamfam-flags-png or famfamfam-flags-gif are copied to your STATIC_ROOT.
+
+Now for PNG flag icons include this in settings.py:
+
+  COUNTRIES_FLAG_URL = '/media/flags/%s.png'
+
+Or just change the suffix to use the GIF flags:
+
+  COUNTRIES_FLAG_URL = '/media/flags/%s.gif'
+
+Translations:
+-------------
+
+The package iso-codes comes with it's own translations of country names.
+django-countries has been patched to automatically use these translations.
+
+Custom country codes:
+---------------------
+
+It is possible (but not encouraged because of missing translations) to use a
+modified iso_3166.xml file by adding this to your settings.py:
+
+  COUNTRIES_ISO_XML = '/path/to/custom_iso_3166.xml'
+
+ -- Fladischer Michael <FladischerMichael at fladi.at>  Sat, 02 Apr 2010 11:11:51 +0100

Copied: packages/django-countries/trunk/debian/python-django-countries.docs (from rev 30319, packages/django-countries/trunk/debian/docs)
===================================================================
--- packages/django-countries/trunk/debian/python-django-countries.docs	                        (rev 0)
+++ packages/django-countries/trunk/debian/python-django-countries.docs	2014-09-01 13:14:14 UTC (rev 30448)
@@ -0,0 +1 @@
+README.rst

Added: packages/django-countries/trunk/debian/python3-django-countries.README.Debian
===================================================================
--- packages/django-countries/trunk/debian/python3-django-countries.README.Debian	                        (rev 0)
+++ packages/django-countries/trunk/debian/python3-django-countries.README.Debian	2014-09-01 13:14:14 UTC (rev 30448)
@@ -0,0 +1,38 @@
+django-countries for Debian
+---------------------------
+
+Flag icon support:
+------------------
+
+This package does not include the flag icons. They are provided in separate
+packages:
+  - famfamfam-flags-png
+  - famfamfam-flags-gif
+
+The package come with a symlink that gets picked up by
+django.contrib.staticfiles. It will make sure that all flag icons from either
+famfamfam-flags-png or famfamfam-flags-gif are copied to your STATIC_ROOT.
+
+Now for PNG flag icons include this in settings.py:
+
+  COUNTRIES_FLAG_URL = '/media/flags/%s.png'
+
+Or just change the suffix to use the GIF flags:
+
+  COUNTRIES_FLAG_URL = '/media/flags/%s.gif'
+
+Translations:
+-------------
+
+The package iso-codes comes with it's own translations of country names.
+django-countries has been patched to automatically use these translations.
+
+Custom country codes:
+---------------------
+
+It is possible (but not encouraged because of missing translations) to use a
+modified iso_3166.xml file by adding this to your settings.py:
+
+  COUNTRIES_ISO_XML = '/path/to/custom_iso_3166.xml'
+
+ -- Fladischer Michael <FladischerMichael at fladi.at>  Sat, 02 Apr 2010 11:11:51 +0100

Added: packages/django-countries/trunk/debian/python3-django-countries.dirs
===================================================================
--- packages/django-countries/trunk/debian/python3-django-countries.dirs	                        (rev 0)
+++ packages/django-countries/trunk/debian/python3-django-countries.dirs	2014-09-01 13:14:14 UTC (rev 30448)
@@ -0,0 +1 @@
+/usr/share/python3-django-countries/locale

Added: packages/django-countries/trunk/debian/python3-django-countries.docs
===================================================================
--- packages/django-countries/trunk/debian/python3-django-countries.docs	                        (rev 0)
+++ packages/django-countries/trunk/debian/python3-django-countries.docs	2014-09-01 13:14:14 UTC (rev 30448)
@@ -0,0 +1 @@
+README.rst

Added: packages/django-countries/trunk/debian/python3-django-countries.lintian-overrides
===================================================================
--- packages/django-countries/trunk/debian/python3-django-countries.lintian-overrides	                        (rev 0)
+++ packages/django-countries/trunk/debian/python3-django-countries.lintian-overrides	2014-09-01 13:14:14 UTC (rev 30448)
@@ -0,0 +1,8 @@
+# This directory is intentionally empty as it is populated by postinst with
+# the symlink farm.
+python3-django-countries: package-contains-empty-directory usr/share/python3-django-countries/locale/
+# Upstream does not provide a separate changelog.
+python3-django-countries: no-upstream-changelog
+# Symlink points to famfamfam-flag-png or famfamfam-flag-gif
+python3-django-countries: package-contains-broken-symlink usr/lib/python3/dist-packages/django_countries/static/flags ../../../../../share/flags/countries/16x11
+

Added: packages/django-countries/trunk/debian/python3-django-countries.postinst
===================================================================
--- packages/django-countries/trunk/debian/python3-django-countries.postinst	                        (rev 0)
+++ packages/django-countries/trunk/debian/python3-django-countries.postinst	2014-09-01 13:14:14 UTC (rev 30448)
@@ -0,0 +1,28 @@
+#!/bin/sh
+
+set -eu
+
+build_locale_symlinks ()
+{
+    local path dest file
+    # Remove existing symlink farm. We will recreate it immediately.
+    rm -rf /usr/share/python3-django-countries/locale/*
+    for file in /usr/share/locale/*/LC_MESSAGES/iso_3166.mo; do
+        # Create the necessary directory structure for each language.
+        path=$(dirname /usr/share/python3-django-countries/locale/${file#/usr/share/locale/})
+        mkdir -p ${path}
+        # Create the symlink with an absolute target path (iso_3166.mo -> django.mo).
+        dest=${path}/django.mo
+        ln -s ../../../../${file#/usr/share/} ${dest}
+    done
+}
+
+if [ "$1" = "configure" ]; then
+    build_locale_symlinks
+elif [ "$1" = "triggered" ]; then
+    # iso-codes has been updated
+    build_locale_symlinks
+    exit 0
+fi
+
+#DEBHELPER#

Added: packages/django-countries/trunk/debian/python3-django-countries.prerm
===================================================================
--- packages/django-countries/trunk/debian/python3-django-countries.prerm	                        (rev 0)
+++ packages/django-countries/trunk/debian/python3-django-countries.prerm	2014-09-01 13:14:14 UTC (rev 30448)
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+set -eu
+
+# Remove directories and symlinks created during postinst.
+if [ "$1" = "remove" ]; then
+     rm -rf /usr/share/python3-django-countries/locale/*
+fi
+
+#DEBHELPER#

Added: packages/django-countries/trunk/debian/python3-django-countries.triggers
===================================================================
--- packages/django-countries/trunk/debian/python3-django-countries.triggers	                        (rev 0)
+++ packages/django-countries/trunk/debian/python3-django-countries.triggers	2014-09-01 13:14:14 UTC (rev 30448)
@@ -0,0 +1,2 @@
+# activated by iso-codes
+interest iso-codes-translation-update

Modified: packages/django-countries/trunk/debian/rules
===================================================================
--- packages/django-countries/trunk/debian/rules	2014-09-01 10:13:39 UTC (rev 30447)
+++ packages/django-countries/trunk/debian/rules	2014-09-01 13:14:14 UTC (rev 30448)
@@ -4,13 +4,15 @@
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
 
+export PYBUILD_NAME=django-countries
+
 %:
-	dh $@ --with python2 --buildsystem=pybuild
+	dh $@ --with python2,python3 --buildsystem=pybuild
 
 override_dh_auto_test:
 ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
 	set -e; \
-	for python in $(shell pyversions -r); do \
+	for python in $(shell pyversions -r) $(shell py3versions -r); do \
 	  PYTHONPATH="." DJANGO_SETTINGS_MODULE=django_countries.tests.settings $$python $(shell which django-admin) test django_countries.tests;\
 	done
 endif
@@ -23,3 +25,12 @@
 		ln -s /usr/share/flags/countries/16x11 debian/python-django-countries/usr/lib/$$python/dist-packages/django_countries/static/flags; \
 	done
 	dh_python2
+
+override_dh_python3:
+	set -e; \
+	for python in $(shell py3versions -r); do \
+		ln -s /usr/share/python3-django-countries/locale debian/python3-django-countries/usr/lib/$$python/dist-packages/django_countries/; \
+		mkdir -p debian/python3-django-countries/usr/lib/$$python/dist-packages/django_countries/static; \
+		ln -s /usr/share/flags/countries/16x11 debian/python3-django-countries/usr/lib/$$python/dist-packages/django_countries/static/flags; \
+	done
+	dh_python3




More information about the Python-modules-commits mailing list