diff --git a/0001-add-setup.py.patch b/0001-add-setup.py.patch new file mode 100644 index 0000000000000000000000000000000000000000..33e61fe27e6a924b28eeec24f750ccac7d71392f --- /dev/null +++ b/0001-add-setup.py.patch @@ -0,0 +1,58 @@ +--- c/setup.py 1970-01-01 08:00:00.000000000 +0800 ++++ a/setup.py 2022-11-14 15:19:35.122703109 +0800 +@@ -0,0 +1,55 @@ ++#!/usr/bin/env python ++ ++from setuptools import setup ++ ++ ++if __name__ == "__main__": ++ setup( ++ name = "Sphinx", ++ version = "5.3.0", ++ python_requires='>=3.6', ++ license = "BSD", ++ url = "https://www.sphinx-doc.org/", ++ author="Georg Brandl", ++ author_email="georg@python.org", ++ classifiers = [ ++ "Development Status :: 5 - Production/Stable", ++ "Environment :: Console", ++ "Environment :: Web Environment", ++ "Intended Audience :: Developers", ++ "Intended Audience :: Education", ++ "Intended Audience :: End Users/Desktop", ++ "Intended Audience :: Science/Research", ++ "Intended Audience :: System Administrators", ++ "License :: OSI Approved :: BSD License", ++ "Operating System :: OS Independent", ++ "Programming Language :: Python", ++ "Programming Language :: Python :: 3", ++ "Programming Language :: Python :: 3 :: Only", ++ "Programming Language :: Python :: 3.6", ++ "Programming Language :: Python :: 3.7", ++ "Programming Language :: Python :: 3.8", ++ "Programming Language :: Python :: 3.9", ++ "Programming Language :: Python :: 3.10", ++ "Programming Language :: Python :: 3.11", ++ "Programming Language :: Python :: Implementation :: CPython", ++ "Programming Language :: Python :: Implementation :: PyPy", ++ "Framework :: Setuptools Plugin", ++ "Framework :: Sphinx", ++ "Framework :: Sphinx :: Extension", ++ "Framework :: Sphinx :: Theme", ++ "Topic :: Documentation", ++ "Topic :: Documentation :: Sphinx", ++ "Topic :: Internet :: WWW/HTTP :: Site Management", ++ "Topic :: Printing", ++ "Topic :: Software Development", ++ "Topic :: Software Development :: Documentation", ++ "Topic :: Text Processing", ++ "Topic :: Text Processing :: General", ++ "Topic :: Text Processing :: Indexing", ++ "Topic :: Text Processing :: Markup", ++ "Topic :: Text Processing :: Markup :: HTML", ++ "Topic :: Text Processing :: Markup :: LaTeX", ++ "Topic :: Utilities", ++ ] ++ ) diff --git a/Sphinx-4.4.0.tar.gz b/Sphinx-5.3.0.tar.gz similarity index 50% rename from Sphinx-4.4.0.tar.gz rename to Sphinx-5.3.0.tar.gz index f3e99d66e59b31270f0050184605a12a109cc80d..1239bbfc249fc655e3ab8114ac858afe8e628910 100644 Binary files a/Sphinx-4.4.0.tar.gz and b/Sphinx-5.3.0.tar.gz differ diff --git a/python-sphinx.spec b/python-sphinx.spec index 5db765aad15d08d9707180bfbbd4e45684725925..0065763f03b30eb30aab5c1ca16a94965ed19583 100644 --- a/python-sphinx.spec +++ b/python-sphinx.spec @@ -1,43 +1,21 @@ -Name: python-sphinx -Version: 4.4.0 -Release: 1 -Epoch: 1 -Summary: Python documentation generator -License: BSD and MIT -URL: http://sphinx-doc.org/ -Source0: https://files.pythonhosted.org/packages/source/S/Sphinx/Sphinx-%{version}.tar.gz - -BuildArch: noarch - -BuildRequires: python3-devel -BuildRequires: python3-setuptools -BuildRequires: python3-babel -BuildRequires: python3-docutils -BuildRequires: python3-imagesize -BuildRequires: python3-jinja2 -BuildRequires: python3-packaging -BuildRequires: python3-pygments -BuildRequires: python3-requests -BuildRequires: python3-sphinxcontrib-applehelp -BuildRequires: python3-sphinxcontrib-devhelp -BuildRequires: python3-sphinxcontrib-htmlhelp -BuildRequires: python3-sphinxcontrib-jsmath -BuildRequires: python3-sphinxcontrib-qthelp -BuildRequires: python3-sphinxcontrib-serializinghtml -BuildRequires: python3-sphinx-theme-alabaster - -BuildRequires: dos2unix - -BuildRequires: python3-test -BuildRequires: python3-html5lib -BuildRequires: python3-mock -BuildRequires: python3-pytest -BuildRequires: python3-snowballstemmer - -BuildRequires: gettext -BuildRequires: graphviz -BuildRequires: texinfo - +%global _empty_manifest_terminate_build 0 +Name: python-sphinx +Version: 5.3.0 +Release: 1 +Summary: Python documentation generator +License: BSD and MIT +URL: https://www.sphinx-doc.org/ +Source0: https://files.pythonhosted.org/packages/af/b2/02a43597980903483fe5eb081ee8e0ba2bb62ea43a70499484343795f3bf/Sphinx-5.3.0.tar.gz +Patch0: 0001-add-setup.py.patch +BuildArch: noarch + +Requires: python-sphinx-locale = %{?epoch}:%{version}-%{release} +Requires: python3-babel python3-docutils python3-jinja2 python3-pygments +Requires: python3-snowballstemmer python3-sphinx_rtd_theme python3-sphinx-theme-alabaster +Requires: python3-imagesize python3-requests python3-six python3-packaging +Requires: environment(modules) python3-sphinxcontrib-websupport python3-mock +Requires(pre): /usr/sbin/alternatives +Requires: python(Sphinx) = %{?epoch}:%{version}-%{release} %description Sphinx is a tool that makes it easy to create intelligent and @@ -68,22 +46,37 @@ the Python docs: snippets and inclusion of appropriately formatted docstrings. %package -n python3-sphinx -Summary:Python documentation generator - -Requires: python-sphinx-locale = %{?epoch}:%{version}-%{release} -Requires: python3-babel python3-docutils python3-jinja2 python3-pygments -Requires: python3-snowballstemmer python3-sphinx_rtd_theme python3-sphinx-theme-alabaster -Requires: python3-imagesize python3-requests python3-six python3-packaging -Requires: environment(modules) python3-sphinxcontrib-websupport python3-mock -Requires(pre): /usr/sbin/alternatives -Recommends: graphviz ImageMagick - +Summary: Python documentation generator Obsoletes: python3-sphinxcontrib-napoleon < 0.3.0 +Provides: python-Sphinx = %{version}-%{release} Provides: python3-sphinxcontrib-napoleon = %{?epoch}:%{version}-%{release} Provides: python(Sphinx) = %{?epoch}:%{version}-%{release} Conflicts: python2-Sphinx < %{?epoch}:%{version}-%{release} -%{?python_provide:%python_provide python3-sphinx} - +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-babel +BuildRequires: python3-docutils +BuildRequires: python3-imagesize +BuildRequires: python3-jinja2 +BuildRequires: python3-packaging +BuildRequires: python3-pygments +BuildRequires: python3-requests +BuildRequires: python3-sphinxcontrib-applehelp +BuildRequires: python3-sphinxcontrib-devhelp +BuildRequires: python3-sphinxcontrib-htmlhelp +BuildRequires: python3-sphinxcontrib-jsmath +BuildRequires: python3-sphinxcontrib-qthelp +BuildRequires: python3-sphinxcontrib-serializinghtml +BuildRequires: python3-sphinx-theme-alabaster +BuildRequires: dos2unix +BuildRequires: python3-test +BuildRequires: python3-html5lib +BuildRequires: python3-mock +BuildRequires: python3-pytest +BuildRequires: python3-snowballstemmer +BuildRequires: gettext +BuildRequires: graphviz +BuildRequires: texinfo %description -n python3-sphinx Sphinx is a tool that makes it easy to create intelligent and @@ -113,14 +106,13 @@ the Python docs: * Various extensions are available, e.g. for automatic testing of snippets and inclusion of appropriately formatted docstrings. -%package help -Summary:Documentation for %{name} -Requires: python(Sphinx) = %{?epoch}:%{version}-%{release} +%package help +Summary: Development documents and examples for Sphinx Provides: python-sphinx-doc python-sphinx-latex Obsoletes: python-sphinx-doc < %{?epoch}:%{version}-%{release} Obsoletes: python-sphinx-latex < %{?epoch}:%{version}-%{release} -%description help +%description help This package contains help documentation in reST and HTML formats. %package locale @@ -130,100 +122,49 @@ Summary:Locale files for python-sphinx This package contains locale files for Sphinx. %prep -%autosetup -n Sphinx-%{version} -p1 - -dos2unix -k ./sphinx/themes/basic/static/jquery.js +%autosetup -n Sphinx-%{version} %build %py3_build -export PYTHONPATH=$PWD -pushd doc -export SPHINXBUILD="%{__python3} ../sphinx/cmd/build.py" -make html SPHINXBUILD="$SPHINXBUILD" -make man SPHINXBUILD="$SPHINXBUILD" -rm -rf _build/html/.buildinfo -mv _build/html .. -popd - - %install %py3_install - -# For backwards compatibility. Remove around Fedora 33 (with care) -install -d %{buildroot}%{_libexecdir}/python3-sphinx -for i in sphinx-{apidoc,autogen,build,quickstart}; do - ln -s %{_bindir}/$i %{buildroot}%{_bindir}/$i-%{python3_version} - ln -s %{_bindir}/$i %{buildroot}%{_bindir}/$i-3 - ln -s %{_bindir}/$i %{buildroot}%{_libexecdir}/python3-sphinx/$i -done - -rm -f %{buildroot}%{python3_sitelib}/sphinx/locale/.DS_Store -rm -rf %{buildroot}%{python3_sitelib}/sphinx/locale/.tx - -pushd doc -install -d %{buildroot}%{_mandir}/man1 -for f in _build/man/sphinx-*.1; -do - cp -p $f %{buildroot}%{_mandir}/man1/$(basename $f) -done +install -d -m755 %{buildroot}/%{_pkgdocdir} +if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi +if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi +if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi +if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi +pushd %{buildroot} +if [ -d usr/lib ]; then + find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/lib64 ]; then + find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/bin ]; then + find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/sbin ]; then + find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst +fi +touch doclist.lst +if [ -d usr/share/man ]; then + find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst +fi popd +mv %{buildroot}/filelist.lst . +mv %{buildroot}/doclist.lst . -rm -rf doc/_build -sed -i 's|python ../sphinx-build.py|/usr/bin/sphinx-build|' doc/Makefile -mv doc reST -rm reST/make.bat - -pushd %{buildroot}%{python3_sitelib} - -for lang in `find sphinx/locale -maxdepth 1 -mindepth 1 -type d -not -path '*/\.*' -printf "%f "`; -do - test $lang == __pycache__ && continue - install -d %{buildroot}%{_datadir}/sphinx/locale/$lang - install -d %{buildroot}%{_datadir}/locale/$lang/LC_MESSAGES - mv sphinx/locale/$lang/LC_MESSAGES/sphinx.js \ - %{buildroot}%{_datadir}/sphinx/locale/$lang/ - mv sphinx/locale/$lang/LC_MESSAGES/sphinx.mo \ - %{buildroot}%{_datadir}/locale/$lang/LC_MESSAGES/ - rm -rf sphinx/locale/$lang -done -popd +%files -n python3-sphinx -f filelist.lst +%dir %{python3_sitelib}/* -mkdir %{buildroot}%{python3_sitelib}/sphinxcontrib - -%find_lang sphinx - -(cd %{buildroot} && find . -name 'sphinx.js') | sed -e 's|^.||' | sed -e \ - 's:\(.*/locale/\)\([^/_]\+\)\(.*\.js$\):%lang(\2) \1\2\3:' \ - >> sphinx.lang - - -%if %{with tests} -%check -export PYTHONPATH=%{buildroot}%{python3_sitelib} -export PATH=%{buildroot}%{_bindir}:$PATH -%endif - -%files locale -f sphinx.lang -%license LICENSE -%dir %{_datadir}/sphinx/ -%dir %{_datadir}/sphinx/locale -%dir %{_datadir}/sphinx/locale/* - -%files -n python3-sphinx -f sphinx.lang -%license LICENSE -%doc AUTHORS CHANGES EXAMPLES README.rst -%{_bindir}/sphinx-* -%{python3_sitelib}/sphinx/ -%dir %{python3_sitelib}/sphinxcontrib/ -%{python3_sitelib}/Sphinx-%{version}-py%{python3_version}.egg-info/ -%{_libexecdir}/python3-sphinx/ - -%files help -%doc html reST -%{_mandir}/man1/* +%files help -f doclist.lst +%{_docdir}/* %changelog +* Mon Nov 14 2022 wangjunqi - 5.3.0-1 +- Update package to version 5.3.0 + * Thu Jun 16 2022 zhangy1317 - 1:4.4.0-1 - Upgrade version for openstack yoga @@ -253,3 +194,4 @@ export PATH=%{buildroot}%{_bindir}:$PATH * Thu Nov 14 2019 Lijin Yang - 1:1.7.6-4 - init package +