|
@@ -5,10 +5,10 @@
|
|
|
Summary: an open-source text processing system written in Python
|
|
|
Summary(ja): Pythonで書かれたテキスト処理システム
|
|
|
Name: python-%{srcname}
|
|
|
-Version: 0.11
|
|
|
-Release: 2%{?_dist_release}
|
|
|
+Version: 0.14
|
|
|
+Release: 1%{?_dist_release}
|
|
|
Group: Development/Languages
|
|
|
-License: Public Domain and MIT and Python and GPLv2
|
|
|
+License: Public Domain and MIT and Python and GPLv3+
|
|
|
URL: http://docutils.sourceforge.net/
|
|
|
Source0: http://prdownloads.sourceforge.net/%{srcname}/%{srcname}-%{version}.tar.gz
|
|
|
## for rst-mode
|
|
@@ -20,13 +20,14 @@ Source4: %{elisppkgname}-init.el
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
|
|
|
BuildArch: noarch
|
|
|
BuildRequires: python-devel
|
|
|
+BuildRequires: python-rpm-macros
|
|
|
BuildRequires: python-setuptools
|
|
|
Requires: python
|
|
|
-Requires: python-imaging
|
|
|
|
|
|
Vendor: Project Vine
|
|
|
Distribution: Vine Linux
|
|
|
Packager: shaolin, munepi, owa
|
|
|
+%{?python_provide:%python_provide python2-%{srcname}}
|
|
|
Provides: docutils = %{version}-%{release}
|
|
|
Obsoletes: docutils <= 0.5
|
|
|
|
|
@@ -42,6 +43,30 @@ Docutilsはオープンソースのテキスト処理システムで、プレー
|
|
|
読みやすく使いやすくWYSIWYGなプレーンテキストのマークアップ言語である
|
|
|
reStructuresTextを含んでいます。
|
|
|
|
|
|
+%package -n python3-%{srcname}
|
|
|
+Summary: an open-source text processing system written in Python
|
|
|
+Summary(ja): Pythonで書かれたテキスト処理システム
|
|
|
+Group: Development/Languages
|
|
|
+
|
|
|
+BuildRequires: python3-devel
|
|
|
+BuildRequires: python3-rpm-macros
|
|
|
+BuildRequires: python3-setuptools
|
|
|
+Requires: python3
|
|
|
+%{?python_provide:%python_provide python3-%{srcname}}
|
|
|
+
|
|
|
+%description -n python3-%{srcname}
|
|
|
+Docutils is an open-source text processing system for processing
|
|
|
+plaintext documentation into useful formats, such as HTML or LaTeX.
|
|
|
+It includes reStructuredText, the easy to read, easy to use,
|
|
|
+what-you-see-is-what-you-get plaintext markup language.
|
|
|
+
|
|
|
+%description -n python3-%{srcname} -l ja
|
|
|
+Docutilsはオープンソースのテキスト処理システムで、プレーンテキストの
|
|
|
+文書をHTMLやLaTeXなどの使いやすいフォーマットに変換するものです。
|
|
|
+読みやすく使いやすくWYSIWYGなプレーンテキストのマークアップ言語である
|
|
|
+reStructuresTextを含んでいます。
|
|
|
+
|
|
|
+
|
|
|
%package -n %{elisppkgname}
|
|
|
Summary: Emacs support for reStructuredText
|
|
|
Summary(ja): reStructuredText の Emacs サポート
|
|
@@ -59,31 +84,49 @@ reStructuredText の Emacs サポート
|
|
|
%prep
|
|
|
%setup -q -n %{srcname}-%{version}
|
|
|
|
|
|
-# Remove a shebang from one of the library files
|
|
|
-#%__sed -i -e '/#! *\/usr\/bin\/.*python.*/{1D}' docutils/readers/python/pynodes.py
|
|
|
+# Remove shebang from library files
|
|
|
+for file in docutils/utils/{code_analyzer.py,punctuation_chars.py,error_reporting.py,smartquotes.py} docutils/utils/math/{latex2mathml.py,math2html.py} docutils/writers/xetex/__init__.py; do
|
|
|
+sed -i -e '/#! *\/usr\/bin\/.*/{1D}' $file
|
|
|
+done
|
|
|
|
|
|
+iconv -f ISO88592 -t UTF8 tools/editors/emacs/IDEAS.rst > tmp
|
|
|
+mv tmp tools/editors/emacs/IDEAS.rst
|
|
|
|
|
|
-%build
|
|
|
-CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build
|
|
|
+rm -rf %{py3dir}
|
|
|
+cp -a . %{py3dir}
|
|
|
|
|
|
+%build
|
|
|
+pushd %{py3dir}
|
|
|
+%py3_build
|
|
|
+popd
|
|
|
+%py_build
|
|
|
|
|
|
%install
|
|
|
%__rm -rf $RPM_BUILD_ROOT
|
|
|
-%{__python} setup.py install --skip-build --root=$RPM_BUILD_ROOT
|
|
|
+
|
|
|
+pushd %{py3dir}
|
|
|
+%py3_install
|
|
|
+# We want the licenses but don't need this build file
|
|
|
+rm -f licenses/docutils.conf
|
|
|
+
|
|
|
+# Flash file is used for testing docutils but shouldn't be in the installed package.
|
|
|
+mv docs/user/rst/images/biohazard.swf ./biohazard.swf
|
|
|
+popd
|
|
|
+
|
|
|
+rm -f %{buildroot}/%{_bindir}/*
|
|
|
+
|
|
|
+%py_install
|
|
|
+
|
|
|
+# docutils setup.py runs 2to3 on a copy of the tests and puts it in sitelib.
|
|
|
+rm -rf %{buildroot}%{python3_sitelib}/test
|
|
|
+
|
|
|
+# Flash file is used for testing docutils but shouldn't be in the installed package.
|
|
|
+mv docs/user/rst/images/biohazard.swf ./biohazard.swf
|
|
|
|
|
|
for file in %{buildroot}/%{_bindir}/*.py; do
|
|
|
mv $file `dirname $file`/`basename $file .py`
|
|
|
- ln -sf `basename $file .py` `dirname $file`/`basename $file`
|
|
|
done
|
|
|
|
|
|
-# We want the licenses but don't need this build file
|
|
|
-%__rm -f licenses/docutils.conf
|
|
|
-
|
|
|
-# docutils only installs this if its not already on the system. Due to the
|
|
|
-# possibility that a previous version of docutils may be installed, we install
|
|
|
-# it manually here.
|
|
|
-#install -D -m644 extras/roman.py ${RPM_BUILD_ROOT}/%{python_sitelib}/roman.py
|
|
|
-
|
|
|
|
|
|
## for Emacs package
|
|
|
mkdir -p %{buildroot}%{_datadir}/emacs/site-lisp/%{elisppkgname}/packages
|
|
@@ -105,6 +148,18 @@ cp -p %{SOURCE3} %{SOURCE4} %{buildroot}%{_datadir}/emacs/site-lisp/%{elisppkgna
|
|
|
|
|
|
|
|
|
|
|
|
+%check
|
|
|
+mv biohazard.swf docs/user/rst/images/biohazard.swf
|
|
|
+python test/alltests.py
|
|
|
+rm docs/user/rst/images/biohazard.swf
|
|
|
+
|
|
|
+pushd %{py3dir}
|
|
|
+mv biohazard.swf docs/user/rst/images/biohazard.swf
|
|
|
+python3 test3/alltests.py
|
|
|
+rm docs/user/rst/images/biohazard.swf
|
|
|
+popd
|
|
|
+
|
|
|
+
|
|
|
%clean
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
@@ -137,13 +192,21 @@ fi
|
|
|
|
|
|
%files
|
|
|
%defattr(-,root,root)
|
|
|
-%doc BUGS.txt HISTORY.txt RELEASE-NOTES.txt docs COPYING.txt THANKS.txt FAQ.txt README.txt
|
|
|
-%doc licenses docs
|
|
|
+%license COPYING.txt licenses/*
|
|
|
+%doc BUGS.txt FAQ.txt HISTORY.txt README.txt RELEASE-NOTES.txt
|
|
|
+%doc THANKS.txt docs tools/editors
|
|
|
%{_bindir}/*
|
|
|
%{python_sitelib}/%{srcname}/
|
|
|
-#%{python_sitelib}/roman.*
|
|
|
%{python_sitelib}/docutils-*.egg-info
|
|
|
|
|
|
+%files -n python3-%{srcname}
|
|
|
+%defattr(-,root,root)
|
|
|
+%license COPYING.txt licenses/*
|
|
|
+%doc BUGS.txt FAQ.txt HISTORY.txt README.txt RELEASE-NOTES.txt
|
|
|
+%doc THANKS.txt docs tools/editors
|
|
|
+%{python3_sitelib}/%{srcname}/
|
|
|
+%{python3_sitelib}/docutils-*.egg-info
|
|
|
+
|
|
|
%files -n %{elisppkgname}
|
|
|
%defattr(-,root,root)
|
|
|
%doc BUGS.txt HISTORY.txt RELEASE-NOTES.txt COPYING.txt THANKS.txt FAQ.txt README.txt
|
|
@@ -154,6 +217,10 @@ fi
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
+* Tue Nov 27 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.14-1
|
|
|
+- new upstream release.
|
|
|
+- added python3 support.
|
|
|
+
|
|
|
* Sun Jan 12 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.11-2
|
|
|
- rebuild with VineSeed environment
|
|
|
|