From 942f47eb9d2814d2066bf110d8410f7af13498b69096b02564cc149d60dc7a0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Thu, 30 Apr 2020 05:16:55 +0000 Subject: [PATCH] - Add patch to fix the 32bit build: * 32bit.patch OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:django/python-Django?expand=0&rev=59 --- 32bit.patch | 27 +++++++++++++++++++++++++++ python-Django.changes | 6 ++++++ python-Django.spec | 5 ++--- 3 files changed, 35 insertions(+), 3 deletions(-) create mode 100644 32bit.patch diff --git a/32bit.patch b/32bit.patch new file mode 100644 index 0000000..1f2ec89 --- /dev/null +++ b/32bit.patch @@ -0,0 +1,27 @@ +From f12162107327b88a2f1faaab15d048e2535ec642 Mon Sep 17 00:00:00 2001 +From: Hasan Ramezani +Date: Wed, 29 Apr 2020 23:22:41 +0200 +Subject: [PATCH] Fixed #31521 -- Skipped test_parsing_rfc850 test on 32-bit + systems. + +--- + tests/utils_tests/test_http.py | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/tests/utils_tests/test_http.py b/tests/utils_tests/test_http.py +index ed6824429d51..aa9f194a8a53 100644 +--- a/tests/utils_tests/test_http.py ++++ b/tests/utils_tests/test_http.py +@@ -1,3 +1,4 @@ ++import platform + import unittest + from datetime import datetime + from unittest import mock +@@ -317,6 +318,7 @@ def test_parsing_rfc1123(self): + parsed = parse_http_date('Sun, 06 Nov 1994 08:49:37 GMT') + self.assertEqual(datetime.utcfromtimestamp(parsed), datetime(1994, 11, 6, 8, 49, 37)) + ++ @unittest.skipIf(platform.architecture()[0] == '32bit', 'The Year 2038 problem.') + @mock.patch('django.utils.http.datetime.datetime') + def test_parsing_rfc850(self, mocked_datetime): + mocked_datetime.side_effect = datetime diff --git a/python-Django.changes b/python-Django.changes index 10bb508..7f50180 100644 --- a/python-Django.changes +++ b/python-Django.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Apr 30 05:14:28 UTC 2020 - Tomáš Chvátal + +- Add patch to fix the 32bit build: + * 32bit.patch + ------------------------------------------------------------------- Thu Apr 23 16:58:12 UTC 2020 - Marcus Rueckert diff --git a/python-Django.spec b/python-Django.spec index 45d1f94..68bd293 100644 --- a/python-Django.spec +++ b/python-Django.spec @@ -35,6 +35,7 @@ Source99: python-Django-rpmlintrc Patch0: i18n_test.patch Patch1: test_clear_site_cache-sort.patch Patch2: fix-selenium-test.patch +Patch3: 32bit.patch BuildRequires: %{python_module Jinja2 >= 2.9.2} BuildRequires: %{python_module Pillow} BuildRequires: %{python_module PyYAML} @@ -99,9 +100,7 @@ echo "`grep -e '^[0-9a-f]\{40\} Django-%{version}.tar.gz' %{SOURCE1} | cut -c1- echo "`grep -e '^[0-9a-f]\{64\} Django-%{version}.tar.gz' %{SOURCE1} | cut -c1-64` %{SOURCE0}" | sha256sum -c %setup -q -n Django-%{version} -%patch0 -p1 -%patch1 -p1 -%patch2 -p1 +%autopatch -p1 chmod a-x django/contrib/admin/static/admin/js/vendor/xregexp/xregexp.js %build