commit fd0627b0a0019ccd6c893a3b1dfffe530daccd53c0198bb2e536a4934d03aa38 Author: Matej Cepl Date: Sat Jun 9 06:38:55 2018 +0000 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 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/diskcache-3.0.6.tar.gz b/diskcache-3.0.6.tar.gz new file mode 100644 index 0000000..9dfc7ca --- /dev/null +++ b/diskcache-3.0.6.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:15f0179c612dca07ff98beb4b15e98fc71809f6edd36320213f19ca42724cbf3 +size 489068 diff --git a/python-diskcache.changes b/python-diskcache.changes new file mode 100644 index 0000000..01d984b --- /dev/null +++ b/python-diskcache.changes @@ -0,0 +1,6 @@ +------------------------------------------------------------------- +Fri Jun 8 13:51:38 UTC 2018 - petr@cervinka.net + +- Initial package version +- Django related tests are excluded from python3 tests. Tests are made for Django1 + only. Django1 is for python2 only in distribution. diff --git a/python-diskcache.spec b/python-diskcache.spec new file mode 100644 index 0000000..8ccf08b --- /dev/null +++ b/python-diskcache.spec @@ -0,0 +1,65 @@ +# +# 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