forked from pool/python-Sphinx
- Remove obsolete SUSE version checks
- Don't package locale files twice - Remove obsolete SUSE version checks - Don't package locale files twice OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Sphinx?expand=0&rev=16
This commit is contained in:
parent
2a0d246f68
commit
8c304edb56
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Nov 6 00:24:32 UTC 2012 - saschpe@suse.de
|
||||||
|
|
||||||
|
- Remove obsolete SUSE version checks
|
||||||
|
- Don't package locale files twice
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed May 23 16:02:17 UTC 2012 - highwaystar.ru@gmail.com
|
Wed May 23 16:02:17 UTC 2012 - highwaystar.ru@gmail.com
|
||||||
|
|
||||||
|
@ -25,6 +25,7 @@ License: BSD-2-Clause
|
|||||||
Group: Development/Languages/Python
|
Group: Development/Languages/Python
|
||||||
Source: http://pypi.python.org/packages/source/S/Sphinx/Sphinx-%{version}.tar.gz
|
Source: http://pypi.python.org/packages/source/S/Sphinx/Sphinx-%{version}.tar.gz
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
|
BuildRequires: fdupes
|
||||||
BuildRequires: python-Jinja2
|
BuildRequires: python-Jinja2
|
||||||
BuildRequires: python-devel
|
BuildRequires: python-devel
|
||||||
BuildRequires: python-distribute
|
BuildRequires: python-distribute
|
||||||
@ -33,19 +34,14 @@ Requires: python-Jinja2
|
|||||||
Requires: python-Pygments
|
Requires: python-Pygments
|
||||||
Requires: python-distribute
|
Requires: python-distribute
|
||||||
Requires: python-docutils
|
Requires: python-docutils
|
||||||
%if 0%{?suse_version}
|
|
||||||
Suggests: python-rst2pdf
|
Suggests: python-rst2pdf
|
||||||
%py_requires
|
|
||||||
%if 0%{?suse_version} > 1010
|
|
||||||
BuildRequires: fdupes
|
|
||||||
%endif
|
|
||||||
%if 0%{?suse_version} > 1110
|
|
||||||
BuildArch: noarch
|
|
||||||
%endif
|
|
||||||
%endif
|
|
||||||
Provides: python-sphinx = %{version}
|
Provides: python-sphinx = %{version}
|
||||||
Obsoletes: python-sphinx < %{version}
|
Obsoletes: python-sphinx < %{version}
|
||||||
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
|
%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()")}
|
||||||
|
%else
|
||||||
|
BuildArch: noarch
|
||||||
|
%endif
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Sphinx is a tool that makes it easy to create intelligent and beautiful
|
Sphinx is a tool that makes it easy to create intelligent and beautiful
|
||||||
@ -78,20 +74,14 @@ and translating suite, the Docutils.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n Sphinx-%{version}
|
%setup -q -n Sphinx-%{version}
|
||||||
sed -i '1d' sphinx/pycode/pgen2/token.py # Remove she-bang line
|
sed -i '/#\!/d' sphinx/pycode/pgen2/token.py # Fix non-excutable-script warning
|
||||||
|
|
||||||
%build
|
%build
|
||||||
python setup.py build
|
python setup.py build
|
||||||
cd doc && make html
|
cd doc && make html && rm _build/html/.buildinfo
|
||||||
rm _build/html/.buildinfo
|
|
||||||
mv _build/html ..
|
|
||||||
rm -rf _*
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
||||||
%if 0%{?suse_version} > 1010
|
|
||||||
%fdupes %{buildroot}%{_prefix}
|
|
||||||
%endif
|
|
||||||
%find_lang sphinx
|
%find_lang sphinx
|
||||||
|
|
||||||
%files -f sphinx.lang
|
%files -f sphinx.lang
|
||||||
@ -99,9 +89,10 @@ python setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
|||||||
%doc AUTHORS CHANGES LICENSE README TODO
|
%doc AUTHORS CHANGES LICENSE README TODO
|
||||||
%{_bindir}/sphinx-*
|
%{_bindir}/sphinx-*
|
||||||
%{python_sitelib}/*
|
%{python_sitelib}/*
|
||||||
|
%exclude %{python_sitelib}/sphinx/locale/
|
||||||
|
|
||||||
%files doc
|
%files doc
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
%doc EXAMPLES html
|
%doc EXAMPLES doc/_build/html
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Nov 6 00:24:32 UTC 2012 - saschpe@suse.de
|
||||||
|
|
||||||
|
- Remove obsolete SUSE version checks
|
||||||
|
- Don't package locale files twice
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed May 23 16:02:39 UTC 2012 - highwaystar.ru@gmail.com
|
Wed May 23 16:02:39 UTC 2012 - highwaystar.ru@gmail.com
|
||||||
|
|
||||||
|
@ -24,36 +24,20 @@ Summary: Python documentation generator
|
|||||||
License: BSD-2-Clause
|
License: BSD-2-Clause
|
||||||
Group: Development/Languages/Python
|
Group: Development/Languages/Python
|
||||||
Source: http://pypi.python.org/packages/source/S/Sphinx/Sphinx-%{version}.tar.gz
|
Source: http://pypi.python.org/packages/source/S/Sphinx/Sphinx-%{version}.tar.gz
|
||||||
Patch0: python3-Sphinx-docs.patch
|
Patch0: python3-Sphinx-docs.patch
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRequires: fdupes
|
||||||
|
BuildRequires: python3-2to3
|
||||||
BuildRequires: python3-Jinja2
|
BuildRequires: python3-Jinja2
|
||||||
BuildRequires: python3-devel
|
BuildRequires: python3-devel
|
||||||
BuildRequires: python3-2to3
|
|
||||||
BuildRequires: python3-distribute
|
BuildRequires: python3-distribute
|
||||||
BuildRequires: python3-docutils
|
BuildRequires: python3-docutils
|
||||||
Requires: python3-Jinja2
|
Requires: python3-Jinja2
|
||||||
Requires: python3-Pygments
|
Requires: python3-Pygments
|
||||||
Requires: python3-distribute
|
Requires: python3-distribute
|
||||||
Requires: python3-docutils
|
Requires: python3-docutils
|
||||||
%if 0%{?suse_version}
|
|
||||||
Suggests: python3-rst2pdf
|
Suggests: python3-rst2pdf
|
||||||
%if 0%{?suse_version} > 1010
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
BuildRequires: fdupes
|
BuildArch: noarch
|
||||||
%endif
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%if 0%{?suse_version} && 0%{?suse_version} <= 1140
|
|
||||||
%{!?python3_sitelib: %global python3_sitelib %(python3 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
|
|
||||||
%{!?py3_ver: %global py3_ver %(python3 -c "import sys; version=str(sys.version_info[0]) + '.' + str(sys.version_info[1]); print(version)" 2>/dev/null || echo PYTHON-NOT-FOUND)}
|
|
||||||
%endif
|
|
||||||
Requires: python(abi) = %{py3_ver}
|
|
||||||
%if 0%{?suse_version} && 0%{?suse_version} > 1140
|
|
||||||
BuildRequires: python3-base
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%if %{?suse_version: %{suse_version} > 1110} %{!?suse_version:1}
|
|
||||||
BuildArchitectures: noarch
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Sphinx is a tool that makes it easy to create intelligent and beautiful
|
Sphinx is a tool that makes it easy to create intelligent and beautiful
|
||||||
@ -87,25 +71,20 @@ and translating suite, the Docutils.
|
|||||||
%prep
|
%prep
|
||||||
%setup -q -n Sphinx-%{version}
|
%setup -q -n Sphinx-%{version}
|
||||||
%patch0
|
%patch0
|
||||||
sed -i '1d' sphinx/pycode/pgen2/token.py # Remove she-bang line
|
sed -i '/#\!/d' sphinx/pycode/pgen2/token.py # Fix non-excutable-script warning
|
||||||
|
|
||||||
%build
|
%build
|
||||||
2to3 . -w --nobackups
|
2to3 . -w --nobackups
|
||||||
python3 setup.py build
|
python3 setup.py build
|
||||||
sed -i 's/python/python3/g' doc/Makefile
|
sed -i 's/python/python3/g' doc/Makefile
|
||||||
cd doc && make html
|
cd doc && make html && rm _build/html/.buildinfo
|
||||||
rm _build/html/.buildinfo
|
|
||||||
mv _build/html ..
|
|
||||||
rm -rf _*
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
python3 setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
python3 setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
||||||
for i in %{buildroot}%{_bindir}/*; do
|
for i in %{buildroot}%{_bindir}/*; do
|
||||||
mv "$i" "${i}-python%{py3_ver}"
|
mv "$i" "${i}-python%{py3_ver}"
|
||||||
done
|
done
|
||||||
%if 0%{?suse_version} > 1010
|
|
||||||
%fdupes %{buildroot}%{_prefix}
|
%fdupes %{buildroot}%{_prefix}
|
||||||
%endif
|
|
||||||
%find_lang sphinx
|
%find_lang sphinx
|
||||||
|
|
||||||
%files -f sphinx.lang
|
%files -f sphinx.lang
|
||||||
@ -117,6 +96,6 @@ done
|
|||||||
|
|
||||||
%files doc
|
%files doc
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
%doc EXAMPLES html
|
%doc EXAMPLES doc/_build/html
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
Loading…
x
Reference in New Issue
Block a user