From b47cf6039cac10614b872c4a1a42ed42ba7d32db1ef8dbb2f6980b5ab6d5de5f Mon Sep 17 00:00:00 2001 From: Sascha Peilicke Date: Mon, 14 Jan 2013 08:39:44 +0000 Subject: [PATCH] Accepting request 148308 from home:cataliniacob I'd like to submit a new package python-cssselect, which was previously part of lxml but became a stand alone package starting with lxml 3.0. I want to get this into Factory as soon as possible in order to make it available for 12.3 (it's already pretty late given the feature freeze and upcoming beta) since Calibre's basic functionality is not working without this (see bnc#788151 which was fixed with a workaround for 12.2 but Calibre is broken again for 12.3 where the workaround is gone). The package is building fine in my home project and installing it makes Calibre work again. Thanks! OBS-URL: https://build.opensuse.org/request/show/148308 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-cssselect?expand=0&rev=1 --- .gitattributes | 23 ++++++++++++++++ .gitignore | 1 + cssselect-0.7.1.tar.gz | 3 +++ python-cssselect.changes | 5 ++++ python-cssselect.spec | 57 +++++++++++++++++++++++++++++++++++++++ python3-cssselect.changes | 5 ++++ python3-cssselect.spec | 53 ++++++++++++++++++++++++++++++++++++ 7 files changed, 147 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 cssselect-0.7.1.tar.gz create mode 100644 python-cssselect.changes create mode 100644 python-cssselect.spec create mode 100644 python3-cssselect.changes create mode 100644 python3-cssselect.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/cssselect-0.7.1.tar.gz b/cssselect-0.7.1.tar.gz new file mode 100644 index 0000000..0a3fdd6 --- /dev/null +++ b/cssselect-0.7.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:74f411a349fcfb676b68336fcae8799ba9fbb0a0446562f544dee019fb0e2ae7 +size 30480 diff --git a/python-cssselect.changes b/python-cssselect.changes new file mode 100644 index 0000000..6475787 --- /dev/null +++ b/python-cssselect.changes @@ -0,0 +1,5 @@ +------------------------------------------------------------------- +Tue Jan 8 20:42:17 UTC 2013 - iacobcatalin@gmail.com + +- Initial package 0.7.1 + diff --git a/python-cssselect.spec b/python-cssselect.spec new file mode 100644 index 0000000..886d851 --- /dev/null +++ b/python-cssselect.spec @@ -0,0 +1,57 @@ +# +# spec file for package python-cssselect +# +# Copyright (c) 2013 SUSE LINUX Products 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/ + + +Name: python-cssselect +Version: 0.7.1 +Release: 0 +License: BSD-3-Clause +Summary: CSS3 selectors for Python +Url: http://packages.python.org/cssselect/ +Group: Development/Languages/Python +Source: http://pypi.python.org/packages/source/c/cssselect/cssselect-%{version}.tar.gz +BuildRequires: python-devel +BuildRoot: %{_tmppath}/%{name}-%{version}-build +%if 0%{?suse_version} && 0%{?suse_version} <= 1110 +%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} +%{!?python_sitearch: %global python_sitearch %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} +%else +BuildArch: noarch +%endif + +%description +cssselect parses CSS3 Selectors and translates them to XPath 1.0 +expressions. Such expressions can be used in lxml or another XPath engine to +find the matching elements in an XML or HTML document. + +This module used to live inside of lxml as lxml.cssselect before it was +extracted as a stand-alone project. + +%prep +%setup -q -n cssselect-%{version} + +%build +CFLAGS="%{optflags}" python setup.py build +sed -i '/#!\/usr\/bin\/env python/d' cssselect/tests.py + +%install +python setup.py install --prefix=%{_prefix} --root=%{buildroot} + +%files +%defattr(-,root,root,-) +%{python_sitelib}/* + +%changelog diff --git a/python3-cssselect.changes b/python3-cssselect.changes new file mode 100644 index 0000000..6475787 --- /dev/null +++ b/python3-cssselect.changes @@ -0,0 +1,5 @@ +------------------------------------------------------------------- +Tue Jan 8 20:42:17 UTC 2013 - iacobcatalin@gmail.com + +- Initial package 0.7.1 + diff --git a/python3-cssselect.spec b/python3-cssselect.spec new file mode 100644 index 0000000..ec174f7 --- /dev/null +++ b/python3-cssselect.spec @@ -0,0 +1,53 @@ +# +# spec file for package python3-cssselect +# +# Copyright (c) 2013 SUSE LINUX Products 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/ + + +Name: python3-cssselect +Version: 0.7.1 +Release: 0 +License: BSD-3-Clause +Summary: CSS3 selectors for Python +Url: http://packages.python.org/cssselect/ +Group: Development/Languages/Python +Source: http://pypi.python.org/packages/source/c/cssselect/cssselect-%{version}.tar.gz +BuildRequires: python3-devel +BuildRoot: %{_tmppath}/%{name}-%{version}-build +BuildArch: noarch +Requires: python(abi) = %{py3_ver} + +%description +cssselect parses CSS3 Selectors and translates them to XPath 1.0 +expressions. Such expressions can be used in lxml or another XPath engine to +find the matching elements in an XML or HTML document. + +This module used to live inside of lxml as lxml.cssselect before it was +extracted as a stand-alone project. + +%prep +%setup -q -n cssselect-%{version} + +%build +CFLAGS="%{optflags}" python3 setup.py build +sed -i '/#!\/usr\/bin\/env python/d' cssselect/tests.py + +%install +python3 setup.py install --prefix=%{_prefix} --root=%{buildroot} + +%files +%defattr(-,root,root,-) +%{python3_sitelib}/* + +%changelog