Dear Maintainer,
After enabling tests during build (minimal settings.py is needed) and applying
upstream commit [1][2],
I was able to build your package in a sid chroot environment and all test pass
as well.
Kind Regards
[1]
https://github.com/django-macaddress/django-macaddress/pull/41/commits/a722016312a97
[2] https://github.com/django-macaddress/django-macaddress/pull/44
diff -Nru --exclude changelog django-macaddress-1.5.0/debian/control django-macaddress-1.5.0/debian/control
--- django-macaddress-1.5.0/debian/control 2022-04-25 01:57:12.000000000 +0000
+++ django-macaddress-1.5.0/debian/control 2023-11-20 08:16:34.000000000 +0000
@@ -7,6 +7,10 @@
debhelper-compat (= 12),
dh-python,
python3-all,
+ python3-django,
+ python3-netaddr,
+ python3-pytest,
+ python3-pytest-django,
python3-setuptools,
Standards-Version: 4.5.0
Vcs-Git: https://salsa.debian.org/python-team/packages/django-macaddress.git
diff -Nru --exclude changelog django-macaddress-1.5.0/debian/patches/newdjango.patch django-macaddress-1.5.0/debian/patches/newdjango.patch
--- django-macaddress-1.5.0/debian/patches/newdjango.patch 1970-01-01 00:00:00.000000000 +0000
+++ django-macaddress-1.5.0/debian/patches/newdjango.patch 2023-11-20 08:16:20.000000000 +0000
@@ -0,0 +1,24 @@
+--- /dev/null
++++ b/macaddress/tests/settings.py
+@@ -0,0 +1,10 @@
++INSTALLED_APPS = [
++ 'macaddress',
++]
++
++DATABASES = {
++ 'default': {
++ 'ENGINE': 'django.db.backends.sqlite3',
++ 'NAME': 'mydatabase',
++ }
++}
+--- a/macaddress/formfields.py
++++ b/macaddress/formfields.py
+@@ -1,6 +1,6 @@
++from django.core.validators import EMPTY_VALUES
+ from django.forms import Field
+-from django.forms.fields import EMPTY_VALUES
+-from django.utils.translation import ugettext_lazy as _
++from django.utils.translation import gettext_lazy as _
+ #"From Django 1.8: The django.forms.util module has been renamed. Use django.forms.utils instead."
+ try:
+ from django.forms.utils import ValidationError
diff -Nru --exclude changelog django-macaddress-1.5.0/debian/patches/series django-macaddress-1.5.0/debian/patches/series
--- django-macaddress-1.5.0/debian/patches/series 1970-01-01 00:00:00.000000000 +0000
+++ django-macaddress-1.5.0/debian/patches/series 2023-11-20 08:14:54.000000000 +0000
@@ -0,0 +1 @@
+newdjango.patch
diff -Nru --exclude changelog django-macaddress-1.5.0/debian/rules django-macaddress-1.5.0/debian/rules
--- django-macaddress-1.5.0/debian/rules 2022-04-25 01:57:12.000000000 +0000
+++ django-macaddress-1.5.0/debian/rules 2023-11-20 08:13:26.000000000 +0000
@@ -5,8 +5,7 @@
#export DH_VERBOSE=1
export PYBUILD_NAME=django-macaddress
-
-override_dh_auto_test:
+export DJANGO_SETTINGS_MODULE=macaddress.tests.settings
%:
dh $@ --with python3 --buildsystem=pybuild