From 4383fc83a08a4c948dbf1e5676f518a0b5623699 Mon Sep 17 00:00:00 2001 From: duyyb Date: Mon, 23 Dec 2019 17:29:16 +0800 Subject: [PATCH] package init --- python-kitchen.spec | 95 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 python-kitchen.spec diff --git a/python-kitchen.spec b/python-kitchen.spec new file mode 100644 index 0000000..375fb6b --- /dev/null +++ b/python-kitchen.spec @@ -0,0 +1,95 @@ +Name: python-kitchen +Version: 1.2.5 +Release: 6 +Summary: Useful snippets of python code +License: LGPLv2+ +URL: https://pypi.python.org/pypi/kitchen/ +Source0: https://github.com/fedora-infra/kitchen/archive/v%{version}.tar.gz +Patch0000: python-kitchen-24.patch +BuildArch: noarch + +BuildRequires: python2-devel python2-nose python2-test python2-sphinx python2-chardet +BuildRequires: python3-devel python3-nose +BuildRequires: python3-test python3-chardet +BuildRequires: python3-sphinx + +Requires: python2-chardet + +%description +kitchen comprising gettext easy to use, easy to unicode text processing functions, and for write +code modules but requires python-2.7 running on python-2.3 compatibility module. + + +%package -n python2-kitchen +Summary: Useful snippets of python2 code +%{?python_provide:%python_provide python2-kitchen} + +%description -n python2-kitchen +This package is the python2 version of the kitchen module. + + +%package -n python3-kitchen +Summary: Useful snippets of python3 code + +%{?python_provide:%python_provide python3-kitchen} +Requires: python3 python3-chardet + +%description -n python3-kitchen +This package is the python3 version of the kitchen module. + +%package help +Summary: Kitchen python2 and Kitchen python3 API documentation +Provides: %{name}-doc = %{version}-%{release} +Obsoletes: %{name}-doc < %{version}-%{release} +Provides: %{name}-python3-kitchen-doc = %{version}-%{release} +Obsoletes: %{name}-python3-kitchen-doc < %{version}-%{release} + +%description help +This package contains API documentation for programming with python-2 and python-3 versions +of the kitchen library. + +%prep +%autosetup -n kitchen-%{version} -p1 +rm -rf *.egg* %{py3dir} +cp -a . %{py3dir} + +%build +%{py2_build} +pushd %{py3dir} +%{py3_build} +popd +sphinx-build-2 kitchen2/docs/ build/sphinx/html +cp -pr build/sphinx/html . +rm -rf html/.buildinfo + +pushd %{py3dir} +sphinx-build-3 kitchen3/docs/ build/sphinx/html +cp -pr build/sphinx/html . +rm -rf html/.buildinfo +popd + +%install +%{py2_install} +pushd %{py3dir} +%{py3_install} +popd + +%check +PATH=/bin:/usr/bin +PYTHONPATH=.:kitchen2/ nosetests-%{python2_version} kitchen2/tests/ + +%files -n python2-kitchen +%doc README.rst NEWS.rst COPYING COPYING.LESSER +%{python2_sitelib}/kitchen* + +%files -n python%{python3_pkgversion}-kitchen +%doc README.rst NEWS.rst COPYING COPYING.LESSER +%{python3_sitelib}/kitchen* + + +%files help +%doc {kitchen2,kitchen3}/docs/* html COPYING COPYING.LESSER + +%changelog +* Sat Dec 21 2019 duyeyu - 1.2.5-6 +- initial package