diff -pruN 0.6.2-5/debian/changelog 0.6.2-5ubuntu1/debian/changelog
--- 0.6.2-5/debian/changelog	2021-01-04 07:04:08.000000000 +0000
+++ 0.6.2-5ubuntu1/debian/changelog	2021-01-04 11:25:57.000000000 +0000
@@ -1,9 +1,27 @@
+python-django-babel (0.6.2-5ubuntu1) hirsute; urgency=low
+
+  * Merge from Debian unstable. Remaining changes:
+    - Extract upstream release tarball content into a patch and apply it
+    - d/rules: Run unit tests using pytest.
+    - d/control: Add BD on python3-pytest-django.
+
+ -- Gianfranco Costamagna <locutusofborg@debian.org>  Mon, 04 Jan 2021 12:25:57 +0100
+
 python-django-babel (0.6.2-5) unstable; urgency=medium
 
   * Define DJANGO_SETTINGS_MODULE when building docs (Closes: #978293).
 
  -- Thomas Goirand <zigo@debian.org>  Mon, 04 Jan 2021 08:04:08 +0100
 
+python-django-babel (0.6.2-4ubuntu1) focal; urgency=low
+
+  * Merge from Debian unstable.  Remaining changes:
+    - Extract upstream release tarball content into a patch and apply it
+    - d/rules: Run unit tests using pytest.
+    - d/control: Add BD on python3-pytest-django.
+
+ -- Gianfranco Costamagna <locutusofborg@debian.org>  Sat, 26 Oct 2019 08:36:38 +0200
+
 python-django-babel (0.6.2-4) unstable; urgency=medium
 
   * Team upload
@@ -18,6 +36,15 @@ python-django-babel (0.6.2-4) unstable;
 
  -- Antonio Terceiro <terceiro@debian.org>  Thu, 24 Oct 2019 07:57:39 -0300
 
+python-django-babel (0.6.2-3ubuntu3) eoan; urgency=low
+
+  * Merge from Debian unstable.  Remaining changes:
+    - Extract upstream release tarball content into a patch and apply it
+    - d/rules: Run unit tests using pytest.
+    - d/control: Add BD on python3-pytest-django.
+
+ -- Gianfranco Costamagna <locutusofborg@debian.org>  Wed, 21 Aug 2019 09:25:14 +0200
+
 python-django-babel (0.6.2-3) unstable; urgency=medium
 
   [ Ondřej Nový ]
@@ -30,6 +57,17 @@ python-django-babel (0.6.2-3) unstable;
 
  -- Thomas Goirand <zigo@debian.org>  Wed, 10 Jul 2019 11:12:01 +0200
 
+python-django-babel (0.6.2-1ubuntu1) cosmic; urgency=medium
+
+  * Execute unit tests as part of package build:
+    - Use upstream release tarball, rather than git snapshot.
+    - d/rules: Run unit tests using pytest.
+    - d/control: Add BD on python{3}-pytest-django.
+  * d/*: wrap-and-sort -bast.
+  - d/control: python-sphinx -> python3-sphinx.
+
+ -- James Page <james.page@ubuntu.com>  Tue, 14 Aug 2018 16:56:58 +0100
+
 python-django-babel (0.6.2-1) unstable; urgency=medium
 
   [ Daniel Baumann ]
diff -pruN 0.6.2-5/debian/control 0.6.2-5ubuntu1/debian/control
--- 0.6.2-5/debian/control	2021-01-04 07:04:08.000000000 +0000
+++ 0.6.2-5ubuntu1/debian/control	2021-01-04 09:17:03.000000000 +0000
@@ -16,6 +16,7 @@ Build-Depends-Indep:
  python3-babel,
  python3-django,
  python3-pytest,
+ python3-pytest-django,
 Standards-Version: 4.4.1
 Vcs-Browser: https://salsa.debian.org/openstack-team/python/python-django-babel
 Vcs-Git: https://salsa.debian.org/openstack-team/python/python-django-babel.git
diff -pruN 0.6.2-5/debian/patches/add-egg-info.patch 0.6.2-5ubuntu1/debian/patches/add-egg-info.patch
--- 0.6.2-5/debian/patches/add-egg-info.patch	1970-01-01 00:00:00.000000000 +0000
+++ 0.6.2-5ubuntu1/debian/patches/add-egg-info.patch	2019-08-21 07:25:14.000000000 +0000
@@ -0,0 +1,552 @@
+--- /dev/null
++++ python-django-babel-0.6.2/django_babel.egg-info/PKG-INFO
+@@ -0,0 +1,487 @@
++Metadata-Version: 1.1
++Name: django-babel
++Version: 0.6.2
++Summary: Utilities for using Babel in Django
++Home-page: https://github.com/python-babel/django-babel/
++Author: Thomas Grainger
++Author-email: django-babel@graingert.co.uk
++License: BSD
++Description-Content-Type: UNKNOWN
++Description: Tools for using Babel with Django
++        =================================
++        
++        This package contains various utilities for integration of `Babel`_ into the
++        `Django`_ web framework:
++        
++         * A message extraction plugin for Django templates.
++         * A middleware class that adds the Babel `Locale`_ object to requests.
++         * A set of template tags for date and number formatting.
++        
++        
++        Extracting Messages
++        -------------------
++        
++        Babel provides a message extraction framework similar to GNU ``xgettext``, but
++        more extensible and geared towards Python applications. While Django does
++        provide `wrapper scripts`_ for making the use of ``xgettext`` more
++        convenient, the extraction functionality is rather limited. For example, you
++        can't use template files with an extension other than ``.html``, and everything
++        needs to be in your project package directory.
++        
++        Extraction Method Mapping
++        ^^^^^^^^^^^^^^^^^^^^^^^^^
++        
++        So django-babel comes with an extraction method plugin that can extract
++        localizable messages from Django template files. Python is supported out of the
++        box by Babel. To use this extraction functionality, create a file called
++        ``babel.cfg`` in your project directory (the directory above your project
++        package), with the content:
++        
++        .. code-block:: ini
++        
++            [django: templates/**.*]
++            [django: mypkg/*/templates/**.*]
++            [python: mypkg/**.py]
++        
++        This instructs Babel to look for any files in the top-level ``templates``
++        directory, or any files in application ``templates`` directories, and use the
++        extraction method named “django” to extract messages from those template files.
++        You'll need to adjust those glob patterns to wherever you my be storing your
++        templates.
++        
++        Also, any files with the extension ``.py`` inside your package directory (replace
++        “mypkg” with the actual name of your Django project package) are processed by
++        the “python” extraction method.
++        
++        If you don't use setuptools, or for some reason haven't installed django-babel
++        using setuptools/pip, you'll need to define what function the extraction method
++        “django” maps to. This is done in an extra section at the top of the
++        configuration file:
++        
++        .. code-block:: ini
++        
++            [extractors]
++            django = django_babel.extract:extract_django
++        
++        The encoding of the templates is assumed to be UTF-8. If you are using a
++        different encoding, you will need to specify it in the configuration. For
++        example:
++        
++        .. code-block:: ini
++        
++            [django: templates/**.*]
++            encoding = iso-8859-1
++        
++        
++        Running the Extraction Process
++        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
++        
++        Once you've set up the configuration file, the actual extraction is performed
++        by executing the command-line program ``pybabel`` which is installed alongside
++        the Babel package:
++        
++        .. code-block:: bash
++        
++            $ cd projectdir
++            $ pybabel extract -F babel.cfg -o mypkg/locale/django.pot .
++        
++        This creates the PO file template in ``mypkg/locale/django.pot``.
++        
++        
++        Creating and Updating Translations Catalogs
++        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
++        
++        If you don't already have translation catalogs, you need to create them. This
++        is done using the ``pybabel init`` command:
++        
++        .. code-block:: bash
++        
++            $ pybabel init -D django -i mypkg/locale/django.pot -d mypkg/locale -l en_US
++            $ pybabel init -D django -i mypkg/locale/django.pot -d mypkg/locale -l de_DE
++        
++        This should create two files: ``mypkg/locale/en_US/django.po`` and
++        ``mypkg/locale/de_DE/django.po``. These files are where you put the actual
++        translations.
++        
++        When you modify your Python source files or your templates, you genereally need
++        to sync the translation catalogs. For that, you first perform a fresh
++        extraction as described in the previous section, so that the ``django.pot`` file
++        gets updated.
++        
++        Then, you run the ``pybabel update`` command to merge the changes into the
++        translation catalogs:
++        
++        ```bash
++        $ pybabel update -D django -i mypkg/locale/django.pot -d mypkg/locale
++        ```
++        
++        This will update all the ``.po`` files found in the ``mypkg/locale`` directory.
++        
++        
++        Compiling Translations Catalogs
++        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
++        
++        Finally, you need to compile those ``.po`` files to binary ``.mo`` files. Use the
++        `pybabel compile` command for that:
++        
++        .. code-block:: bash
++        
++            $ pybabel compile -D django -d mypkg/locale
++        
++        Add the ``--statistics`` option to get information about the completeness of your
++        translations:
++        
++        .. code-block:: bash
++        
++            $ pybabel compile -D django -d mypkg/locale --statistics
++        
++        
++        Using ``setup.py``
++        ^^^^^^^^^^^^^^^^^^
++        
++        Much of the above process can be automated if you add a ``setup.py`` script to
++        your project and use the distutils/setuptools commands that come with Babel.
++        This is described at `Distutils/Setuptools Integration`_.
++        
++        
++        Using the Middleware
++        --------------------
++        
++        To use the Babel middleware, add it to the list of ``MIDDLEWARE_CLASSES`` in your
++        settings module. If you're also using Django's own ``LocaleMiddleware`` to vary
++        the locale based on user preference, the Babel middleware must be inserted
++        after the Django one:
++        
++        .. code-block:: python
++        
++            MIDDLEWARE_CLASSES = (
++                ...
++                'django.middleware.locale.LocaleMiddleware',
++                'django_babel.middleware.LocaleMiddleware',
++                ...
++            )
++        
++        This adds a ``locale`` attribute to the request object, which is an instance of
++        the Babel ``Locale`` class. You can access the locale via ``request.locale`` when
++        the request object is available, or otherwise use the
++        ``django_babel.middleware.get_current_locale()`` function to get the current
++        locale from a thread-local cache.
++        
++        
++        Using the Template Tags
++        -----------------------
++        
++        The template filters provided by django-babel allow formatting of date/time and
++        number values in a locale-sensitive manner, providing much more powerful
++        alternatives to the ``date``, ``time``, and ``floatformat`` filters that come with
++        Django.
++        
++        To make the template filters/tags available, you need to add django-babel to
++        the list of ``INSTALLED_APPS`` in your settings module:
++        
++        .. code-block:: python
++        
++            INSTALLED_APPS = (
++                ...
++                'django_babel',
++                ...
++            )
++        
++        And in every template you want to use the filters, you need to explicitly load
++        the django-babel library:
++        
++        .. code-block:: django
++        
++            {% load babel %}
++        
++        General information on date/time and number formatting can be found at
++        `Date Formatting`_ and `Number Formatting`_.
++        
++        The following filters are made available. The examples assume a locale of
++        ``en_US``.
++        
++        
++        ``datefmt``
++        ^^^^^^^^^^^
++        
++        Renders a string representation of a date.
++        
++        * **Input**:  ``datetime.date``, ``datetime.datetime``, or a float/int timestamp
++        * **Parameters**:  the format name or pattern (optional)
++        
++        Assuming that ``book.pubdate`` returns a ``datetime.date`` or
++        ``datetime.datetime`` object:
++        
++        .. code-block:: django
++        
++            {{ book.pubdate|datefmt:"short" }}
++        
++        would render: **4/1/07**, and
++        
++        .. code-block:: django
++        
++            {{ book.pubdate|datefmt:"E, MMM dd yyyy GGG" }}
++        
++        would render: **Sun, Apr 01 2007 AD**
++        
++        ``datetimefmt``
++        ^^^^^^^^^^^^^^^
++        
++        Renders a string representation of a date and time.
++        
++        * **Input**:  ``datetime.datetime``, or a float/int timestamp
++        * **Parameters**:  the format name or pattern (optional)
++        
++        Examples:
++        
++        .. code-block:: django
++        
++            {{ book.pubdate|datetimefmt:"short" }}
++        
++        would render: **4/1/07 3:30 PM**, and
++        
++        .. code-block:: django
++        
++            {{ book.pubdate|datetimefmt:"E, MMM dd yyyy GGG' - 'HH:mm:ss'" }}
++        
++        would render: **Sun, Apr 01 2007 AD - 15:30:00**
++        
++        ``timefmt``
++        ^^^^^^^^^^^
++        
++        Renders a string representation of a time.
++        
++        * **Input**:  ``datetime.datetime``, ``datetime.time``, or a float/int timestamp
++        * **Parameters**:  the format name or pattern (optional)
++        
++        Examples:
++        
++        .. code-block:: django
++        
++            {{ book.pubdate|timefmt:"short" }}
++        
++        would render: **3:30 PM**, and
++        
++        .. code-block:: django
++        
++            {{ book.pubdate|timefmt:"h 'o''clock' a'" }}
++        
++        would render: **3 o'clock PM**
++        
++        ``decimalfmt``
++        ^^^^^^^^^^^^^^
++        
++        Renders a string representation of a decimal number.
++        
++        * **Input**:  a `Decimal` object, or a float/int/long value
++        * **Parameters**:  the format name or pattern (optional)
++        
++        Examples:
++        
++        .. code-block:: django
++        
++            {{ book.pagecount|decimalfmt }}
++        
++        would render: **1,234**, and
++        
++        .. code-block:: django
++        
++            {{ book.pagecount|decimalfmt:"#,##0.00" }}
++        
++        would render: **1,234.00**
++        
++        ``currencyfmt``
++        ^^^^^^^^^^^^^^^
++        
++        Renders a number formatted as a currency value.
++        
++        * **Input**:  a ``Decimal`` object, or a float/int/long value
++        * **Parameters**:  the currency code
++        
++        Examples:
++        
++        .. code-block:: django
++        
++            {{ book.price|currencyfmt:"USD" }}
++        
++        would render: **$49.90**
++        
++        ``percentfmt``
++        ^^^^^^^^^^^^^^
++        
++        Renders a string representation of a number as a percentage.
++        
++        * **Input**:  a ``Decimal`` object, or a float/int/long value
++        * **Parameters**:  the format name or pattern (optional)
++        
++        Examples:
++        
++        Assuming ``book.rebate`` would return ``0.15``,
++        
++        .. code-block:: django
++        
++            {{ book.rebate|percentfmt }}
++        
++        would render **15%**, and
++        
++        .. code-block:: django
++        
++            {{ book.rebate|percentfmt:"#,##0.00%" }}
++        
++        would render **15.00%**.
++        
++        ``scientificfmt``
++        ^^^^^^^^^^^^^^^^^
++        
++        Renders a string representation of a number using scientific notation.
++        
++        * **Input**:  a ``Decimal`` object, or a float/int/long value
++        * **Parameters**:  none
++        
++        Examples:
++        
++        Assuming ``book.numsold`` would return 1.000.000,
++        
++        .. code-block:: django
++        
++            {{ book.numsold|scientificfmt }}
++        
++        would render **10E5**.
++        
++        
++        
++        .. _Babel: http://babel.pocoo.org/
++        .. _Django: https://www.djangoproject.com/
++        .. _wrapper scripts: https://docs.djangoproject.com/en/dev/topics/i18n/translation/#localization-how-to-create-language-files
++        .. _Distutils/Setuptools Integration: http://babel.pocoo.org/en/stable/setup.html
++        .. _Date Formatting: http://babel.pocoo.org/en/stable/dates.html
++        .. _Number Formatting: http://babel.pocoo.org/en/stable/numbers.html
++        .. _Locale: http://babel.pocoo.org/en/stable/api/core.html#babel.core.Locale
++        
++        
++        Changelog
++        =========
++        
++        0.6.2 (2017-12-18)
++        ------------------
++        
++        - compatibility with Django 2.0 added
++        
++        
++        0.6.1 (2017-12-18)
++        ------------------
++        
++        * compatibility with Django 1.11 added
++        
++        0.6.0 - 2017-04-25
++        ------------------
++        
++        * compatibility with unsupported Django versions (<1.8) is dropped
++        * compatibility with Django 1.10+ middlewares was added
++        
++        0.5.1 - 2016-03-30
++        ------------------
++        
++        * make imports absolute in babel templatetags
++        * strip quotes from translations via _()
++        * fix links in docs
++        * Add support for "trimmed" blocktrans content
++        
++        0.5.0 - 2016-02-29
++        ------------------
++        
++        * Add compatibility for Django-1.9
++        
++        0.4.0 - 2015-04-22
++        ------------------
++        
++        * Add compatibility for Django 1.8
++        * Add compatibility for latest django master
++        * Various python 3 fixes
++        
++        
++        0.3.9 - 2014-12-24
++        ------------------
++        
++        * Fix dependencies on Django/Babel to use lower-case egg names.
++        
++        0.3.8 - 2014-10-14
++        ------------------
++        
++        * Fix old reference to `babeldjango` module in entry points.
++        
++        0.3.7 - 2014-10-14
++        ------------------
++        
++        * Fix Python 3.x compatibility in `babel makemessages` command.
++        
++        0.3.6 - 2014-10-05
++        ------------------
++        
++        * Django 1.7 compatibility
++        
++        
++        0.3.5 - 2014-09-10
++        ------------------
++        
++        * Create .po and .pot files if not existing, plus it's specific base directories.
++        
++        
++        0.3.4 - 2014-05-25
++        ------------------
++        
++        * Fixed django compatibility
++        
++        0.3.3 - 2014-04-22
++        ------------------
++        
++        * Fixed release builds
++        
++        
++        0.3.2 - 2014-04-22
++        ------------------
++        
++        * Initial testing infrastructure
++        * Add management command `babel` with `makemessages` and `compilemessages`
++          labels. Mimics django's `makemessages` and `compilemessages` commands.
++        * Various unicode fixes
++        
++        
++        0.3.1 - 2013-12-11
++        ------------------
++        
++        * fix relative import in template tags
++        
++        
++        0.3.0 - 2013-12-11
++        ------------------
++        
++        * Rename package to django_babel
++        
++        
++        0.2.3 - 2013-12-11
++        ------------------
++        
++        * Rename package on PyPI
++        * Use GitHub as source control
++        
++        
++        .. _`master`: https://github.com/python-babel/django-babel
++        
++Platform: UNKNOWN
++Classifier: Development Status :: 4 - Beta
++Classifier: Environment :: Web Environment
++Classifier: Intended Audience :: Developers
++Classifier: License :: OSI Approved :: BSD License
++Classifier: Operating System :: OS Independent
++Classifier: Programming Language :: Python
++Classifier: Topic :: Software Development :: Libraries :: Python Modules
++Classifier: Framework :: Django
++Classifier: Programming Language :: Python :: 2
++Classifier: Programming Language :: Python :: 2.7
++Classifier: Programming Language :: Python :: 3
++Classifier: Programming Language :: Python :: 3.4
++Classifier: Programming Language :: Python :: 3.5
++Classifier: Programming Language :: Python :: 3.6
++Classifier: Programming Language :: Python :: Implementation :: PyPy
++Classifier: Programming Language :: Python :: Implementation :: CPython
+--- /dev/null
++++ python-django-babel-0.6.2/django_babel.egg-info/SOURCES.txt
+@@ -0,0 +1,39 @@
++CHANGELOG.rst
++COPYING
++MANIFEST.in
++README.rst
++setup.cfg
++setup.py
++django_babel/__init__.py
++django_babel/extract.py
++django_babel/middleware.py
++django_babel.egg-info/PKG-INFO
++django_babel.egg-info/SOURCES.txt
++django_babel.egg-info/dependency_links.txt
++django_babel.egg-info/entry_points.txt
++django_babel.egg-info/requires.txt
++django_babel.egg-info/top_level.txt
++django_babel/management/__init__.py
++django_babel/management/commands/__init__.py
++django_babel/management/commands/babel.py
++django_babel/templatetags/__init__.py
++django_babel/templatetags/babel.py
++docs/Makefile
++docs/conf.py
++docs/extract.rst
++docs/index.rst
++docs/make.bat
++docs/management-commands.rst
++docs/middleware.rst
++docs/template-tags.rst
++tests/babel.cfg
++tests/conftest.py
++tests/test_command.py
++tests/test_extract.py
++tests/test_render.py
++tests/testproject/__init__.py
++tests/testproject/settings.py
++tests/testproject/urls.py
++tests/testproject/locale/en/LC_MESSAGES/.gitkeep
++tests/testproject/locale/fi/LC_MESSAGES/django.po
++tests/testproject/templates/test.txt
+\ No newline at end of file
+--- /dev/null
++++ python-django-babel-0.6.2/django_babel.egg-info/dependency_links.txt
+@@ -0,0 +1 @@
++
+--- /dev/null
++++ python-django-babel-0.6.2/django_babel.egg-info/entry_points.txt
+@@ -0,0 +1,3 @@
++[babel.extractors]
++django = django_babel.extract:extract_django
++
+--- /dev/null
++++ python-django-babel-0.6.2/django_babel.egg-info/requires.txt
+@@ -0,0 +1,2 @@
++django<3.0,>=1.8
++babel>=1.3
+--- /dev/null
++++ python-django-babel-0.6.2/django_babel.egg-info/top_level.txt
+@@ -0,0 +1 @@
++django_babel
diff -pruN 0.6.2-5/debian/patches/series 0.6.2-5ubuntu1/debian/patches/series
--- 0.6.2-5/debian/patches/series	2021-01-04 07:04:08.000000000 +0000
+++ 0.6.2-5ubuntu1/debian/patches/series	2021-01-04 09:17:03.000000000 +0000
@@ -1 +1,2 @@
 Fix-For-Django2.patch
+add-egg-info.patch
diff -pruN 0.6.2-5/debian/rules 0.6.2-5ubuntu1/debian/rules
--- 0.6.2-5/debian/rules	2021-01-04 07:04:08.000000000 +0000
+++ 0.6.2-5ubuntu1/debian/rules	2021-01-04 09:17:03.000000000 +0000
@@ -12,7 +12,12 @@ override_dh_auto_clean:
 	for i in $$(find . -type d -iname __pycache__) ; do rm -rf $$i ; done
 
 override_dh_auto_test:
-	echo "Do nothing..."
+ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS)))
+	#PYTHONPATH=$(CURDIR)/debian/python-django-babel/usr/lib/python2.7/dist-packages PYTHON=python2.7 python2.7 -m pytest tests
+	set -e ; set -x ; for i in $(PYTHON3S) ; do \
+		PYTHONPATH=$(CURDIR)/debian/python3-django-babel/usr/lib/python3/dist-packages PYTHONPATH=$(CURDIR) PYTHON=python$$i python$$i -m pytest tests ; \
+	done
+endif
 
 override_dh_auto_build:
 	echo "Do nothing..."
