forked from pool/python-Django
- 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
This commit is contained in:
parent
4a8fb12bb9
commit
942f47eb9d
27
32bit.patch
Normal file
27
32bit.patch
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
From f12162107327b88a2f1faaab15d048e2535ec642 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Hasan Ramezani <hasan.r67@gmail.com>
|
||||||
|
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
|
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Apr 30 05:14:28 UTC 2020 - Tomáš Chvátal <tchvatal@suse.com>
|
||||||
|
|
||||||
|
- Add patch to fix the 32bit build:
|
||||||
|
* 32bit.patch
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Apr 23 16:58:12 UTC 2020 - Marcus Rueckert <mrueckert@suse.de>
|
Thu Apr 23 16:58:12 UTC 2020 - Marcus Rueckert <mrueckert@suse.de>
|
||||||
|
|
||||||
|
@ -35,6 +35,7 @@ Source99: python-Django-rpmlintrc
|
|||||||
Patch0: i18n_test.patch
|
Patch0: i18n_test.patch
|
||||||
Patch1: test_clear_site_cache-sort.patch
|
Patch1: test_clear_site_cache-sort.patch
|
||||||
Patch2: fix-selenium-test.patch
|
Patch2: fix-selenium-test.patch
|
||||||
|
Patch3: 32bit.patch
|
||||||
BuildRequires: %{python_module Jinja2 >= 2.9.2}
|
BuildRequires: %{python_module Jinja2 >= 2.9.2}
|
||||||
BuildRequires: %{python_module Pillow}
|
BuildRequires: %{python_module Pillow}
|
||||||
BuildRequires: %{python_module PyYAML}
|
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
|
echo "`grep -e '^[0-9a-f]\{64\} Django-%{version}.tar.gz' %{SOURCE1} | cut -c1-64` %{SOURCE0}" | sha256sum -c
|
||||||
|
|
||||||
%setup -q -n Django-%{version}
|
%setup -q -n Django-%{version}
|
||||||
%patch0 -p1
|
%autopatch -p1
|
||||||
%patch1 -p1
|
|
||||||
%patch2 -p1
|
|
||||||
chmod a-x django/contrib/admin/static/admin/js/vendor/xregexp/xregexp.js
|
chmod a-x django/contrib/admin/static/admin/js/vendor/xregexp/xregexp.js
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
Loading…
Reference in New Issue
Block a user