diff options
Diffstat (limited to 'python-sphinx-autosummary-accessors.spec')
| -rw-r--r-- | python-sphinx-autosummary-accessors.spec | 100 |
1 files changed, 100 insertions, 0 deletions
diff --git a/python-sphinx-autosummary-accessors.spec b/python-sphinx-autosummary-accessors.spec new file mode 100644 index 0000000..702f4ef --- /dev/null +++ b/python-sphinx-autosummary-accessors.spec @@ -0,0 +1,100 @@ +%global _empty_manifest_terminate_build 0 +Name: python-sphinx-autosummary-accessors +Version: 2023.4.0 +Release: 1 +Summary: sphinx autosummary extension to properly format pandas or xarray accessors +License: MIT +URL: https://pypi.org/project/sphinx-autosummary-accessors/ +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/75/b9/f37b5d3850d535707545d02165a2f34afdb8d51bb54f56d49a0a89a9f499/sphinx-autosummary-accessors-2023.4.0.tar.gz +BuildArch: noarch + +Requires: python3-sphinx + +%description +A ``sphinx`` extension to properly document `pandas`_ or `xarray`_ accessors. +``sphinx.ext.autosummary`` is able to create summary and object pages for objects and +their methods, but it doesn't work well with accessor styled properties and methods +(``obj.accessor.attribute``). ``pandas`` has accessor documentation built using +``sphinx.ext.autosummary`` templates, which ``xarray`` recently adopted by copying the +templates and all related code. +To avoid even more duplicated code, and to make it easier for projects to document their +custom accessors, this project aims to provide this functionality by way of a `sphinx`_ +extension. +Most of the code was adapted from ``pandas``. + +%package -n python3-sphinx-autosummary-accessors +Summary: sphinx autosummary extension to properly format pandas or xarray accessors +Provides: python-sphinx-autosummary-accessors +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-sphinx-autosummary-accessors +A ``sphinx`` extension to properly document `pandas`_ or `xarray`_ accessors. +``sphinx.ext.autosummary`` is able to create summary and object pages for objects and +their methods, but it doesn't work well with accessor styled properties and methods +(``obj.accessor.attribute``). ``pandas`` has accessor documentation built using +``sphinx.ext.autosummary`` templates, which ``xarray`` recently adopted by copying the +templates and all related code. +To avoid even more duplicated code, and to make it easier for projects to document their +custom accessors, this project aims to provide this functionality by way of a `sphinx`_ +extension. +Most of the code was adapted from ``pandas``. + +%package help +Summary: Development documents and examples for sphinx-autosummary-accessors +Provides: python3-sphinx-autosummary-accessors-doc +%description help +A ``sphinx`` extension to properly document `pandas`_ or `xarray`_ accessors. +``sphinx.ext.autosummary`` is able to create summary and object pages for objects and +their methods, but it doesn't work well with accessor styled properties and methods +(``obj.accessor.attribute``). ``pandas`` has accessor documentation built using +``sphinx.ext.autosummary`` templates, which ``xarray`` recently adopted by copying the +templates and all related code. +To avoid even more duplicated code, and to make it easier for projects to document their +custom accessors, this project aims to provide this functionality by way of a `sphinx`_ +extension. +Most of the code was adapted from ``pandas``. + +%prep +%autosetup -n sphinx-autosummary-accessors-2023.4.0 + +%build +%py3_build + +%install +%py3_install +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 . + +%files -n python3-sphinx-autosummary-accessors -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Mon May 29 2023 Python_Bot <Python_Bot@openeuler.org> - 2023.4.0-1 +- Package Spec generated |
