python-kitchen/python-kitchen.spec

138 lines
3.9 KiB
RPMSpec
Raw Permalink Normal View History

2019-11-19 19:34:59 +08:00
%global with_python3 1
%global python3_pkgversion 3
2019-12-23 17:29:16 +08:00
Name: python-kitchen
2020-02-15 11:24:40 +08:00
Version: 1.2.6
Release: 8
2019-11-19 19:34:59 +08:00
Summary: Small, useful pieces of code to make python coding easier
2019-12-23 17:29:16 +08:00
License: LGPLv2+
URL: https://pypi.python.org/pypi/kitchen/
2020-02-15 11:24:40 +08:00
Source0: https://files.pythonhosted.org/packages/d9/ca/3365cb1160533be8c8b57dbfd6502f367d35e30935ee89a003c664740714/kitchen-1.2.6.tar.gz
2019-12-23 17:29:16 +08:00
2019-11-19 19:34:59 +08:00
BuildArch: noarch
2019-12-23 17:29:16 +08:00
2019-11-19 19:34:59 +08:00
BuildRequires: python-sphinx
BuildRequires: python%{python3_pkgversion}-devel
BuildRequires: python%{python3_pkgversion}-test
BuildRequires: python%{python3_pkgversion}-chardet
2019-12-23 17:29:16 +08:00
2020-08-06 10:47:43 +08:00
Patch0: 0001-replace-obsolete-pngmath-with-imgmath.patch
2019-12-23 17:29:16 +08:00
%description
2019-11-19 19:34:59 +08:00
kitchen includes functions to make gettext easier to use, handling unicode
text easier (conversion with bytes, outputting xml, and calculating how many
columns a string takes), and compatibility modules for writing code that uses
python-2.7 modules but needs to run on python-2.3.
2019-12-23 17:29:16 +08:00
2019-11-19 19:34:59 +08:00
%if 0%{?with_python3}
%package -n python%{python3_pkgversion}-kitchen
Summary: Small, useful pieces of code to make python 3 coding easier
%{?python_provide:%python_provide python%{python3_pkgversion}-kitchen}
2019-12-23 17:29:16 +08:00
2019-11-19 19:34:59 +08:00
Requires: python%{python3_pkgversion}
Requires: python%{python3_pkgversion}-chardet
2019-12-23 17:29:16 +08:00
2019-11-19 19:34:59 +08:00
%description -n python%{python3_pkgversion}-kitchen
kitchen includes functions to make gettext easier to use, handling unicode
text easier (conversion with bytes, outputting xml, and calculating how many
columns a string takes).
2019-12-23 17:29:16 +08:00
2019-11-19 19:34:59 +08:00
This is the python3 version of the kitchen module.
2019-12-23 17:29:16 +08:00
%package help
2019-11-19 19:34:59 +08:00
Summary: API documentation for the Kitchen python3 module
#Requires: python2-kitchen = %{version}-%{release}
%description help
2019-11-19 19:34:59 +08:00
kitchen includes functions to make gettext easier to use, handling unicode
text easier (conversion with bytes, outputting xml, and calculating how many
columns a string takes).
2019-12-23 17:29:16 +08:00
2019-11-19 19:34:59 +08:00
This package contains the API documenation for programming with the
python-3 version of the kitchen library.
%endif
2019-12-23 17:29:16 +08:00
2019-11-19 19:34:59 +08:00
%prep
%autosetup -p1 -n kitchen-%{version}
2019-12-23 17:29:16 +08:00
2019-11-19 19:34:59 +08:00
# Remove bundled egg info, if any.
rm -rf *.egg*
2019-12-23 17:29:16 +08:00
2019-11-19 19:34:59 +08:00
%if 0%{?with_python3}
rm -rf %{py3dir}
2019-12-23 17:29:16 +08:00
cp -a . %{py3dir}
2019-11-19 19:34:59 +08:00
%endif
2019-12-23 17:29:16 +08:00
%build
2019-11-19 19:34:59 +08:00
%if 0%{?with_python3}
2019-12-23 17:29:16 +08:00
pushd %{py3dir}
%{py3_build}
popd
2019-11-19 19:34:59 +08:00
%endif
2019-12-23 17:29:16 +08:00
2019-11-19 19:34:59 +08:00
# Build docs
2019-12-23 17:29:16 +08:00
pushd %{py3dir}
sphinx-build-3 kitchen3/docs/ build/sphinx/html
cp -pr build/sphinx/html .
2019-11-19 19:34:59 +08:00
find . -name html
ls ./html
2019-12-23 17:29:16 +08:00
rm -rf html/.buildinfo
popd
%install
2019-11-19 19:34:59 +08:00
%if 0%{?with_python3}
2019-12-23 17:29:16 +08:00
pushd %{py3dir}
%{py3_install}
popd
2019-11-19 19:34:59 +08:00
%endif
# %check
# # In current mock, the PATH isn't being reset. This causes failures in some
# # subprocess tests as a check tests /root/bin/PROGRAM and fails with Permission
# # Denied instead of File Not Found. reseting the PATH works around this.
# PATH=/bin:/usr/bin
# PYTHONPATH=.:kitchen3/ nosetests-%{python3_version} kitchen3/tests/
%if 0%{?with_python3}
%files -n python%{python3_pkgversion}-kitchen
%doc README.rst NEWS.rst
%license COPYING COPYING.LESSER
2019-12-23 17:29:16 +08:00
%{python3_sitelib}/kitchen*
%files help
2019-11-19 19:34:59 +08:00
%doc kitchen3/docs/*
%license COPYING COPYING.LESSER
%endif
2019-12-23 17:29:16 +08:00
%changelog
* Wed Oct 26 2022 zhangruifang <zhangruifang1@h-partners.com> - 1.2.6-8
- Rebuild for next release
* Tue Mar 15 2022 shixuantong <shixuantong@h-partners.com> - 1.2.6-7
- rename python3-kitchen-help to python-kitchen-help
* Mon Feb 21 2022 shixuantong <shixuantong@h-partners.com> - 1.2.6-6
- rename python-kitchen-doc to python-kitchen-help
2022-01-08 10:23:08 +08:00
* Sat Jan 08 2022 shixuantong <shixuantong@huawei.com> - 1.2.6-5
- remove python3-nose buildrequire
2020-12-09 09:43:29 +08:00
* Wed Dec 09 2020 tianwei <tianwei12@huawei.com> - 1.2.6-4
- delete sensitive word
2020-08-06 10:47:43 +08:00
* Thu Aug 06 2020 zhangjiapeng <zhangjiapeng9@huawei.com> - 1.2.6-3
- replace obsolete pngmath with imgmath
* Wed Aug 05 2020 Guoshuai Sun <sunguoshuai@huawei.com> - 1.2.6-2
2019-11-19 19:34:59 +08:00
- Del the python2 and fix build error
2020-02-15 11:24:40 +08:00
* Sat Feb 15 2020 openEuler Buildteam <buildteam@openeuler.org> - 1.2.6-1
- Update to 1.2.6 and enable python3 test
2019-12-23 17:29:16 +08:00
* Sat Dec 21 2019 duyeyu <duyeyu@huawei.com> - 1.2.5-6
- initial package