2019-04-10 06:24:26 +00:00
|
|
|
#
|
|
|
|
# spec file for package python-djet
|
|
|
|
#
|
2022-02-23 05:28:36 +00:00
|
|
|
# Copyright (c) 2022 SUSE LLC
|
2019-04-10 06:24:26 +00:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2019-10-07 13:14:07 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
|
|
|
#
|
2019-04-10 06:24:26 +00:00
|
|
|
|
|
|
|
|
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
2019-10-07 13:14:07 +00:00
|
|
|
%define skip_python2 1
|
2019-04-10 06:24:26 +00:00
|
|
|
Name: python-djet
|
2022-02-23 05:28:36 +00:00
|
|
|
Version: 0.3.0
|
2019-04-10 06:24:26 +00:00
|
|
|
Release: 0
|
|
|
|
Summary: Set of helpers for easy testing of Django apps
|
2019-10-07 13:14:07 +00:00
|
|
|
License: MIT
|
|
|
|
URL: https://github.com/sunscrapers/djet
|
2022-02-23 05:28:36 +00:00
|
|
|
Source: https://files.pythonhosted.org/packages/source/d/djet/djet-%{version}.tar.gz
|
|
|
|
# PATCH-FIX-UPSTREAM gh#sunscrapers/djet#f97c37afeb1b6f17055d2eebadaa42bc316cd15f
|
|
|
|
Patch0: support-public-httpresponse.patch
|
2019-04-10 06:24:26 +00:00
|
|
|
BuildRequires: %{python_module Django}
|
|
|
|
BuildRequires: %{python_module Pillow}
|
|
|
|
BuildRequires: %{python_module djangorestframework}
|
|
|
|
BuildRequires: %{python_module pytest-django}
|
|
|
|
BuildRequires: %{python_module setuptools}
|
2020-04-28 09:13:15 +00:00
|
|
|
BuildRequires: %{python_module six}
|
2019-04-10 06:24:26 +00:00
|
|
|
BuildRequires: fdupes
|
2019-10-07 13:14:07 +00:00
|
|
|
BuildRequires: python-rpm-macros
|
2019-04-10 06:24:26 +00:00
|
|
|
Requires: python-Django
|
|
|
|
Requires: python-Pillow
|
2020-04-28 09:13:15 +00:00
|
|
|
Requires: python-six
|
2019-04-10 06:24:26 +00:00
|
|
|
Suggests: python-djangorestframework
|
|
|
|
BuildArch: noarch
|
|
|
|
%python_subpackages
|
|
|
|
|
|
|
|
%description
|
|
|
|
Set of helpers for easy testing of Django apps.
|
|
|
|
|
|
|
|
%prep
|
2022-02-23 05:28:36 +00:00
|
|
|
%autosetup -p1 -n djet-%{version}
|
2019-04-10 06:24:26 +00:00
|
|
|
|
|
|
|
%build
|
|
|
|
%python_build
|
|
|
|
|
|
|
|
%install
|
|
|
|
%python_install
|
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
|
|
|
|
|
|
|
%check
|
|
|
|
cd testproject/
|
|
|
|
export DJANGO_SETTINGS_MODULE=settings
|
|
|
|
# test_make_inmemory_image_should_pass fails on s390x and ppc64
|
|
|
|
# PIL/ImageFile.py:496: SystemError: tile cannot extend outside image
|
|
|
|
# https://github.com/sunscrapers/djet/issues/31
|
2022-02-23 05:28:36 +00:00
|
|
|
%pytest -k 'not (test_make_inmemory_image_should_pass or test_listdir_should_return_proper_paths)'
|
2019-04-10 06:24:26 +00:00
|
|
|
|
|
|
|
%files %{python_files}
|
2019-10-07 13:14:07 +00:00
|
|
|
%license LICENSE
|
2019-04-10 06:24:26 +00:00
|
|
|
%doc README.rst
|
|
|
|
%{python_sitelib}/*
|
|
|
|
|
|
|
|
%changelog
|