From 6587a157918abcc1f547317011a164d3a78d7d261e05d3c65dca86841125360a Mon Sep 17 00:00:00 2001 From: Todd R Date: Mon, 24 Apr 2017 16:27:06 +0000 Subject: [PATCH] Accepting request 487005 from home:alarrosa:branches:devel:languages:python singlespec version of python3-cookies OBS-URL: https://build.opensuse.org/request/show/487005 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-cookies?expand=0&rev=1 --- .gitattributes | 23 +++++++++ .gitignore | 1 + cookies-2.2.1.tar.gz | 3 ++ do-not-install-test_cookies.diff | 13 +++++ python-cookies.changes | 23 +++++++++ python-cookies.spec | 88 ++++++++++++++++++++++++++++++++ 6 files changed, 151 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 cookies-2.2.1.tar.gz create mode 100644 do-not-install-test_cookies.diff create mode 100644 python-cookies.changes create mode 100644 python-cookies.spec 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/cookies-2.2.1.tar.gz b/cookies-2.2.1.tar.gz new file mode 100644 index 0000000..8e9c3de --- /dev/null +++ b/cookies-2.2.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d6b698788cae4cfa4e62ef8643a9ca332b79bd96cb314294b864ae8d7eb3ee8e +size 40704 diff --git a/do-not-install-test_cookies.diff b/do-not-install-test_cookies.diff new file mode 100644 index 0000000..44af9f9 --- /dev/null +++ b/do-not-install-test_cookies.diff @@ -0,0 +1,13 @@ +Index: cookies-2.2.1/setup.py +=================================================================== +--- cookies-2.2.1.orig/setup.py ++++ cookies-2.2.1/setup.py +@@ -25,7 +25,7 @@ setup( + author="Sasha Hart", + author_email="s@sashahart.net", + url="https://github.com/sashahart/cookies", +- py_modules=['cookies', 'test_cookies'], ++ py_modules=['cookies'], + description="Friendlier RFC 6265-compliant cookie parser/renderer", + long_description=open('README').read(), + classifiers=[ diff --git a/python-cookies.changes b/python-cookies.changes new file mode 100644 index 0000000..7c39ee4 --- /dev/null +++ b/python-cookies.changes @@ -0,0 +1,23 @@ +------------------------------------------------------------------- +Mon Apr 10 08:30:24 UTC 2017 - alarrosa@suse.com + +- Update for singlespec +- Add do-not-install-test_cookies.diff so test_cookies.py is not + installed in the system. + +------------------------------------------------------------------- +Tue Feb 21 13:22:24 UTC 2017 - jengelh@inai.de + +- Trim long description + +------------------------------------------------------------------- +Mon Feb 20 10:13:44 UTC 2017 - alarrosa@suse.com + +- Use py.test in %check to fix "setup.py test" not working + with python 3.6 + +------------------------------------------------------------------- +Thu Jan 19 14:35:13 UTC 2017 - alarrosa@suse.com + +- Initial release + diff --git a/python-cookies.spec b/python-cookies.spec new file mode 100644 index 0000000..ce841b6 --- /dev/null +++ b/python-cookies.spec @@ -0,0 +1,88 @@ +# +# spec file for package python-cookies +# +# Copyright (c) 2017 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-cookies +Version: 2.2.1 +Release: 0 +Summary: Friendlier RFC 6265-compliant cookie parser/renderer +License: MIT +Group: Development/Languages/Python +Url: https://github.com/sashahart/cookies +Source: https://files.pythonhosted.org/packages/source/c/cookies/cookies-%{version}.tar.gz +# PATCH-FIX-OPENSUSE do-not-install-test_cookies.diff -- Do not install test files +Patch0: do-not-install-test_cookies.diff +BuildRequires: %{python_module devel} +BuildRequires: %{python_module pytest} +BuildRequires: %{python_module setuptools} +BuildRequires: python-rpm-macros +BuildRoot: %{_tmppath}/%{name}-%{version}-build +BuildArch: noarch + +%python_subpackages + +%description +cookies.py is a Python module for working with HTTP cookies: parsing and +rendering 'Cookie:' request headers and 'Set-Cookie:' response headers, +and exposing a convenient API for creating and modifying cookies. It can be +used as a replacement of Python's Cookie.py (aka http.cookies). + +* Rendering according to RFC 6265. It uses URL encoding to represent + non-ASCII by default, like many other languages' libraries. +* Liberal parsing, incorporating many complaints about Cookie.py + barfing on common cookie formats which can be reliably parsed +* Documented code, with chapter and verse from RFCs +* A test suite with 100%% test coverage +* Unlike Cookie.py, it doesn't lock all implementation inside its own + classes. You can suppress minor parse exceptions with parameters + rather than subclass wrappers. You can plug in your own parsers, + renderers and validators for new or existing cookie attributes. You + can render the data out in a dict. You can use the underlying + imperative API or even lift the parser's regexps for your own + parser or project. + +While this is intended to be a good module for handling cookies, it does not +even try to do any of the following: + +* Backward compatibility with Cookie.py +* Implementation of RFC 2109 or 2965 +* Handle every conceivable output from legacy applications +* Provide a means to store pickled Python objects in cookie values + +This does not compete with the cookielib (http.cookiejar) module in the Python +standard library. + +%prep +%setup -q -n cookies-%{version} +%patch0 -p1 + +%build +%python_build + +%install +%python_install + +%check +%python_expand pytest-%{$python_version} test_cookies.py + +%files %{python_files} +%defattr(-,root,root,-) +%doc README +%{python_sitelib}/* + +%changelog