python-docutils/python-docutils.spec

125 lines
3.1 KiB
RPMSpec
Raw Normal View History

2019-12-17 11:34:08 +08:00
%global modname docutils
%global flashfilename biohazard.swf
%global flashfilepath docs/user/rst/images/
Name: python-%{modname}
2022-01-12 16:31:13 +08:00
Version: 0.17.1
Release: 1
2019-12-17 11:34:08 +08:00
Summary: Documentation Utilities Written in Python, for General- and Special-Purpose Use
License: Public Domain and BSD and Python and GPLv3+
URL: http://docutils.sourceforge.net
2022-01-12 16:31:13 +08:00
Source0: http://downloads.sourceforge.net/docutils/docutils-%{version}.tar.gz
2019-12-17 11:34:08 +08:00
BuildArch: noarch
BuildRequires: python3-devel
2019-12-17 11:34:08 +08:00
%global _description \
Docutils is an open-source text processing system for processing plaintext\
documentation into useful formats, such as HTML, LaTeX, man-pages,\
open-document or XML. It includes reStructuredText, the easy to read, easy\
to use, what-you-see-is-what-you-get plaintext markup language.
%description
%{_description}
%package -n python3-%{modname}
Summary: %{summary} for python3
2020-09-10 18:01:37 +08:00
Requires: python3-lxml
2019-12-17 11:34:08 +08:00
%{?python_provide:%python_provide python3-%{modname}}
%description -n python3-%{modname}
%{_description}
This package run under python3.
%package_help
%prep
2020-08-03 18:39:28 +08:00
%autosetup -n %{modname}-%{version} -p1
2019-12-17 11:34:08 +08:00
# Remove shebang from library files
for file in {code_analyzer,punctuation_chars,error_reporting,smartquotes,math/latex2mathml,math/math2html}; do
sed -i -e '/#! *\/usr\/bin\/.*/{1D}' docutils/utils/$file.py
done
sed -i -e '/#! *\/usr\/bin\/.*/{1D}' docutils/writers/xetex/__init__.py
iconv -f ISO88592 -t UTF8 tools/editors/emacs/IDEAS.rst > tmp
mv tmp tools/editors/emacs/IDEAS.rst
rm -rf %{py3dir}
cp -a . %{py3dir}
2020-06-24 17:29:04 +08:00
pushd %{py3dir}
rm -rf test/test_writers/test_odt.py
popd
2019-12-17 11:34:08 +08:00
%build
pushd %{py3dir}
%py3_build
popd
%install
rm -rf %{buildroot}%{python3_sitelib}/test
mv %{flashfilepath}%{flashfilename} ./%{flashfilename}
rm -f %{buildroot}/%{_bindir}/*
pushd %{py3dir}
%py3_install
mv %{flashfilepath}%{flashfilename} ./%{flashfilename}
popd
for file in %{buildroot}/%{_bindir}/*.py; do
mv $file `dirname $file`/`basename $file .py`
done
%check
pushd %{py3dir}
mv %{flashfilename} %{flashfilepath}%{flashfilename}
2020-07-29 18:31:11 +08:00
python3 test/alltests.py
2019-12-17 11:34:08 +08:00
rm %{flashfilepath}%{flashfilename}
popd
%files -n python3-%{modname}
%license COPYING.txt licenses/*.txt
%{python3_sitelib}/*
%{_bindir}/*
%files help
%doc BUGS.txt FAQ.txt HISTORY.txt README.txt RELEASE-NOTES.txt
%doc THANKS.txt docs tools/editors
%changelog
2022-01-12 16:31:13 +08:00
* Wed Jan 12 2022 shixuantong <shixuantong@huawei.com> - 0.17.1-1
- update version to 0.17.1
* Mon Nov 2 2020 wangjie<wangjie294@huawei.com> -0.16-5
- Type:NA
- ID:NA
- SUG:NA
- DESC:remove python2
2020-09-10 18:01:37 +08:00
* Thu Sep 10 2020 wangxiao <wangxiao65@huawei.com> - 0.16-4
- fix rst2odt_prepstyles error
2020-08-03 18:39:28 +08:00
* Mon Aug 3 2020 wutao <wutao61@huawei.com> - 0.16-3
- fix test error problem
2020-07-29 18:31:11 +08:00
* Wed Jul 29 2020 dingyue <dingyue5@huawei.com> - 0.16-2
- Fix 0.16-1 for error
2020-07-24 15:04:58 +08:00
* Thu Jul 23 2020 dingyue <dingyue5@huawei.com> - 0.16-1
- NA
2020-06-24 17:29:04 +08:00
* Wed Jun 24 2020 wangyue <wangyue92@huawei.com> - 0.14-8
- Fix python3.8 complied failed
2020-01-10 14:15:44 +08:00
* Fri Jan 10 2020 qinjian <qinjian18@huawei.com> - 0.14-7
- Update Source0
2019-12-17 11:34:08 +08:00
* Tue Dec 10 2019 mengxian <mengxian@huawei.com> - 0.14-6
- Package init