summaryrefslogtreecommitdiff
path: root/python-rstfmt.spec
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2023-05-15 06:25:51 +0000
committerCoprDistGit <infra@openeuler.org>2023-05-15 06:25:51 +0000
commit5e826600d1e256f5870e358f1e3e52840c5a2464 (patch)
tree7dddea0fc8503d732b120006ec4ea2b893f5c73d /python-rstfmt.spec
parenta38587e9c43974a2ab75fc9cad0dad0a0fde808c (diff)
automatic import of python-rstfmt
Diffstat (limited to 'python-rstfmt.spec')
-rw-r--r--python-rstfmt.spec103
1 files changed, 103 insertions, 0 deletions
diff --git a/python-rstfmt.spec b/python-rstfmt.spec
new file mode 100644
index 0000000..702041f
--- /dev/null
+++ b/python-rstfmt.spec
@@ -0,0 +1,103 @@
+%global _empty_manifest_terminate_build 0
+Name: python-rstfmt
+Version: 0.0.13
+Release: 1
+Summary: A formatter for reStructuredText
+License: MIT
+URL: https://github.com/dzhu/rstfmt
+Source0: https://mirrors.nju.edu.cn/pypi/web/packages/2b/64/fe7de1135580c2f88b71d8e0fd4e90c2346640ae86f45eaad9f1041f322d/rstfmt-0.0.13.tar.gz
+BuildArch: noarch
+
+Requires: python3-black
+Requires: python3-docutils
+Requires: python3-sphinx
+Requires: python3-aiohttp
+
+%description
+The default behavior of reading from stdin and writing to stdout should
+integrate well with other systems, such as on-save hooks in editors. For
+example, here's a configuration for reformatter.el_, including both
+standalone and daemon modes:
+ ;; Run the standalone tool.
+ (reformatter-define rstfmt
+ (add-hook 'rst-mode-hook #'rstfmt-on-save-mode)
+ ;; Query the daemon.
+ (reformatter-define client-rstfmt
+ (add-hook 'rst-mode-hook #'client-rstfmt-on-save-mode)
+
+%package -n python3-rstfmt
+Summary: A formatter for reStructuredText
+Provides: python-rstfmt
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-pip
+%description -n python3-rstfmt
+The default behavior of reading from stdin and writing to stdout should
+integrate well with other systems, such as on-save hooks in editors. For
+example, here's a configuration for reformatter.el_, including both
+standalone and daemon modes:
+ ;; Run the standalone tool.
+ (reformatter-define rstfmt
+ (add-hook 'rst-mode-hook #'rstfmt-on-save-mode)
+ ;; Query the daemon.
+ (reformatter-define client-rstfmt
+ (add-hook 'rst-mode-hook #'client-rstfmt-on-save-mode)
+
+%package help
+Summary: Development documents and examples for rstfmt
+Provides: python3-rstfmt-doc
+%description help
+The default behavior of reading from stdin and writing to stdout should
+integrate well with other systems, such as on-save hooks in editors. For
+example, here's a configuration for reformatter.el_, including both
+standalone and daemon modes:
+ ;; Run the standalone tool.
+ (reformatter-define rstfmt
+ (add-hook 'rst-mode-hook #'rstfmt-on-save-mode)
+ ;; Query the daemon.
+ (reformatter-define client-rstfmt
+ (add-hook 'rst-mode-hook #'client-rstfmt-on-save-mode)
+
+%prep
+%autosetup -n rstfmt-0.0.13
+
+%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-rstfmt -f filelist.lst
+%dir %{python3_sitelib}/*
+
+%files help -f doclist.lst
+%{_docdir}/*
+
+%changelog
+* Mon May 15 2023 Python_Bot <Python_Bot@openeuler.org> - 0.0.13-1
+- Package Spec generated