From 97d91bb9d9db9880465d6a599556cb52eba770ff5f29d3272d7c7b8b968a21cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Wed, 8 Jul 2020 06:38:04 +0000 Subject: [PATCH] Accepting request 819305 from home:winski:python itemadapter is a wrapper for data container objects & required for updating python-Scrapy (already in repos) because it is not a dependency. itemadapter is made by the Scrapy team. I have also updated python-Scrapy (with this package as a dep) and have submitted that as another request. UPDATED: added tests to package as requested by d:l:p maintainer. OBS-URL: https://build.opensuse.org/request/show/819305 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-itemadapter?expand=0&rev=1 --- .gitattributes | 23 +++++++++++++ .gitignore | 1 + itemadapter-0.1.0.tar.gz | 3 ++ python-itemadapter.changes | 12 +++++++ python-itemadapter.spec | 68 ++++++++++++++++++++++++++++++++++++++ 5 files changed, 107 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 itemadapter-0.1.0.tar.gz create mode 100644 python-itemadapter.changes create mode 100644 python-itemadapter.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/itemadapter-0.1.0.tar.gz b/itemadapter-0.1.0.tar.gz new file mode 100644 index 0000000..3977dab --- /dev/null +++ b/itemadapter-0.1.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4bfe70d1d621d9341c89190027ac92f5232da1443394977e49a31a1c42d25781 +size 9184 diff --git a/python-itemadapter.changes b/python-itemadapter.changes new file mode 100644 index 0000000..992ef9c --- /dev/null +++ b/python-itemadapter.changes @@ -0,0 +1,12 @@ +------------------------------------------------------------------- +Tue Jul 7 23:30:56 UTC 2020 - Jacob W + +- Update spec file: + * Change to github archive, which includes tests. + * Enable tests. + * Add BuildRequires that is required for tests to pass. + +------------------------------------------------------------------- +Thu Jul 2 20:16:51 UTC 2020 - Jacob W + +- Initial package of python-itemadapter version 0.1.0 diff --git a/python-itemadapter.spec b/python-itemadapter.spec new file mode 100644 index 0000000..df7770d --- /dev/null +++ b/python-itemadapter.spec @@ -0,0 +1,68 @@ +# +# spec file for package python-itemadapter +# +# Copyright (c) 2020 SUSE LLC +# Copyright (c) 2016, Martin Hauke +# +# 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 https://bugs.opensuse.org/ +# + + +%{?!python_module:%define python_module() python-%{**} python3-%{**}} +%define skip_python2 1 +Name: python-itemadapter +Version: 0.1.0 +Release: 0 +Summary: Wrapper for data container objects +License: BSD-3-Clause +Group: Development/Languages/Python +URL: https://github.com/scrapy/itemadapter +Source: https://github.com/scrapy/itemadapter/archive/v%{version}.tar.gz#/itemadapter-%{version}.tar.gz +BuildRequires: %{python_module attrs} +BuildRequires: %{python_module devel} +BuildRequires: %{python_module pytest} +BuildRequires: %{python_module setuptools >= 40.5.0} +BuildRequires: fdupes +BuildRequires: pkgconfig +BuildRequires: python-rpm-macros +BuildRequires: pkgconfig(libffi) +# python3-Scrapy is required for tests +BuildRequires: python3-Scrapy >= 2.2.0 +Requires: python-attrs +%python_subpackages + +%description +The ItemAdapter class is a wrapper for data container objects, providing +a common interface to handle objects of different types in an uniform +manner, regardless of their underlying implementation. + +%prep +%setup -q -n itemadapter-%{version} + +%build +export CFLAGS="%{optflags}" +%python_build + +%install +%python_install +%python_expand %fdupes %{buildroot}%{$python_sitearch} + +%check +%pytest + +%files %{python_files} +%license LICENSE +%doc README.md +%{python_sitelib}/itemadapter +%{python_sitelib}/itemadapter-%{version}-py*.egg-info + +%changelog