diff options
| author | CoprDistGit <infra@openeuler.org> | 2023-04-10 09:27:47 +0000 |
|---|---|---|
| committer | CoprDistGit <infra@openeuler.org> | 2023-04-10 09:27:47 +0000 |
| commit | 1a2571ade28fd09bfee933fec7ce61aea9c797b8 (patch) | |
| tree | 114e104ccffb2876b173c1c5023c0731753a824b /python-pathlib.spec | |
| parent | 1722755e12ce347f577abc92ab2af66977d0b79f (diff) | |
automatic import of python-pathlib
Diffstat (limited to 'python-pathlib.spec')
| -rw-r--r-- | python-pathlib.spec | 93 |
1 files changed, 93 insertions, 0 deletions
diff --git a/python-pathlib.spec b/python-pathlib.spec new file mode 100644 index 0000000..7313a0a --- /dev/null +++ b/python-pathlib.spec @@ -0,0 +1,93 @@ +%global _empty_manifest_terminate_build 0 +Name: python-pathlib +Version: 1.0.1 +Release: 1 +Summary: Object-oriented filesystem paths +License: MIT License +URL: https://pathlib.readthedocs.org/ +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/ac/aa/9b065a76b9af472437a0059f77e8f962fe350438b927cb80184c32f075eb/pathlib-1.0.1.tar.gz +BuildArch: noarch + + +%description +pathlib offers a set of classes to handle filesystem paths. It offers the +following advantages over using string objects: +* No more cumbersome use of os and os.path functions. Everything can be + done easily through operators, attribute accesses, and method calls. +* Embodies the semantics of different path types. For example, comparing + Windows paths ignores casing. +* Well-defined semantics, eliminating any warts or ambiguities (forward vs. + backward slashes, etc.). + +%package -n python3-pathlib +Summary: Object-oriented filesystem paths +Provides: python-pathlib +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-pathlib +pathlib offers a set of classes to handle filesystem paths. It offers the +following advantages over using string objects: +* No more cumbersome use of os and os.path functions. Everything can be + done easily through operators, attribute accesses, and method calls. +* Embodies the semantics of different path types. For example, comparing + Windows paths ignores casing. +* Well-defined semantics, eliminating any warts or ambiguities (forward vs. + backward slashes, etc.). + +%package help +Summary: Development documents and examples for pathlib +Provides: python3-pathlib-doc +%description help +pathlib offers a set of classes to handle filesystem paths. It offers the +following advantages over using string objects: +* No more cumbersome use of os and os.path functions. Everything can be + done easily through operators, attribute accesses, and method calls. +* Embodies the semantics of different path types. For example, comparing + Windows paths ignores casing. +* Well-defined semantics, eliminating any warts or ambiguities (forward vs. + backward slashes, etc.). + +%prep +%autosetup -n pathlib-1.0.1 + +%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-pathlib -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Mon Apr 10 2023 Python_Bot <Python_Bot@openeuler.org> - 1.0.1-1 +- Package Spec generated |
