14
0
Files
python-diskcache/python-diskcache.spec
Matej Cepl fd0627b0a0 Accepting request 615253 from home:czerw:test
I would like to submit new package to devel:languages:python and later 
to Factory. Tests are enabled, but Django related tests are excluded
from python3. It requires Djnago 1, which is not available for python3
in distribution.

OBS-URL: https://build.opensuse.org/request/show/615253
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-diskcache?expand=0&rev=1
2018-06-09 06:38:55 +00:00

66 lines
2.0 KiB
RPMSpec

#
# spec file for package python-diskcache
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
#
# 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.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-diskcache
Version: 3.0.6
Release: 0
Summary: Disk and file backed cache
License: Apache-2.0
Group: Development/Languages/Python
URL: http://www.grantjenks.com/docs/diskcache/
Source: https://files.pythonhosted.org/packages/source/d/diskcache/diskcache-%{version}.tar.gz
BuildRequires: %{python_module base}
BuildRequires: %{python_module mock}
BuildRequires: %{python_module nose}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
# Django1 is not available for python3 in distribution
BuildRequires: python2-Django1
BuildArch: noarch
%python_subpackages
%description
DiskCache: Disk Backed Cache
`DiskCache`_ is an Apache2 licensed disk and file backed cache library, written
in pure-Python, and compatible with Django.
%prep
%setup -q -n diskcache-%{version}
%build
%python_build
%install
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
python2 %{_bindir}/nosetests
# Django tests support only Django1 which is not in distribution for python3
python3 %{_bindir}/nosetests --exclude test_djangocache.py
%files %{python_files}
%license LICENSE
%doc README.rst
%{python_sitelib}/*
%changelog