diff options
author | CoprDistGit <infra@openeuler.org> | 2023-05-05 05:08:40 +0000 |
---|---|---|
committer | CoprDistGit <infra@openeuler.org> | 2023-05-05 05:08:40 +0000 |
commit | 6f811bfa55ad1bae4d836508c1690654206961d9 (patch) | |
tree | fb84817fa4bf91f88fef3e8e1326b513cd3f6a5f | |
parent | 96a2ac12775138b2ca564febc5c731623dc1550c (diff) |
automatic import of python-rtfunicodeopeneuler20.03
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | python-rtfunicode.spec | 99 | ||||
-rw-r--r-- | sources | 1 |
3 files changed, 101 insertions, 0 deletions
@@ -0,0 +1 @@ +/rtfunicode-2.0.tar.gz diff --git a/python-rtfunicode.spec b/python-rtfunicode.spec new file mode 100644 index 0000000..fd44fb1 --- /dev/null +++ b/python-rtfunicode.spec @@ -0,0 +1,99 @@ +%global _empty_manifest_terminate_build 0 +Name: python-rtfunicode +Version: 2.0 +Release: 1 +Summary: Encoder for unicode to RTF 1.5 command sequences +License: BSD +URL: http://pypi.python.org/pypi/rtfunicode +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/26/54/5d82ee41cffaef86553c349606dbc0f4ca0a10ca1c19cf89f5f8c41deaef/rtfunicode-2.0.tar.gz +BuildArch: noarch + + +%description +This module implements an encoder for unicode to RTF 1.5 command sequences; it +can be used to generate valid RTF output with international characters. +Importing this module adds a new `rtfunicode` codec, allowing you to encode +unicode strings to valid RTF bytecode sequences: +>>> import rtfunicode +>>> u'RTF and unicode mix just fine! \u263A'.encode('rtfunicode') +'RTF and unicode mix just fine! \\u9786?' +The RTF command code for a unicode character is `\uN?`, where N is a signed +16-bit integer and the ? is a placeholder character for older RTF readers. This +module sets the latter to the '?' literal for simlicity's sake. + +%package -n python3-rtfunicode +Summary: Encoder for unicode to RTF 1.5 command sequences +Provides: python-rtfunicode +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-rtfunicode +This module implements an encoder for unicode to RTF 1.5 command sequences; it +can be used to generate valid RTF output with international characters. +Importing this module adds a new `rtfunicode` codec, allowing you to encode +unicode strings to valid RTF bytecode sequences: +>>> import rtfunicode +>>> u'RTF and unicode mix just fine! \u263A'.encode('rtfunicode') +'RTF and unicode mix just fine! \\u9786?' +The RTF command code for a unicode character is `\uN?`, where N is a signed +16-bit integer and the ? is a placeholder character for older RTF readers. This +module sets the latter to the '?' literal for simlicity's sake. + +%package help +Summary: Development documents and examples for rtfunicode +Provides: python3-rtfunicode-doc +%description help +This module implements an encoder for unicode to RTF 1.5 command sequences; it +can be used to generate valid RTF output with international characters. +Importing this module adds a new `rtfunicode` codec, allowing you to encode +unicode strings to valid RTF bytecode sequences: +>>> import rtfunicode +>>> u'RTF and unicode mix just fine! \u263A'.encode('rtfunicode') +'RTF and unicode mix just fine! \\u9786?' +The RTF command code for a unicode character is `\uN?`, where N is a signed +16-bit integer and the ? is a placeholder character for older RTF readers. This +module sets the latter to the '?' literal for simlicity's sake. + +%prep +%autosetup -n rtfunicode-2.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-rtfunicode -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Fri May 05 2023 Python_Bot <Python_Bot@openeuler.org> - 2.0-1 +- Package Spec generated @@ -0,0 +1 @@ +e6c938f05514cfc9d2da5ca08f679ec1 rtfunicode-2.0.tar.gz |