diff options
author | CoprDistGit <infra@openeuler.org> | 2023-05-05 11:30:13 +0000 |
---|---|---|
committer | CoprDistGit <infra@openeuler.org> | 2023-05-05 11:30:13 +0000 |
commit | 34857f237c39097fa117286fdb8305326df9df75 (patch) | |
tree | 211c8dfbf2a6836f61f5ed2e7f8987a445c80718 | |
parent | 70738aed7ae57609a66172522bb61299dade8ea9 (diff) |
automatic import of python-antipathyopeneuler20.03
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | python-antipathy.spec | 144 | ||||
-rw-r--r-- | sources | 1 |
3 files changed, 146 insertions, 0 deletions
@@ -0,0 +1 @@ +/antipathy-0.85.3.tar.gz diff --git a/python-antipathy.spec b/python-antipathy.spec new file mode 100644 index 0000000..82982cb --- /dev/null +++ b/python-antipathy.spec @@ -0,0 +1,144 @@ +%global _empty_manifest_terminate_build 0 +Name: python-antipathy +Version: 0.85.3 +Release: 1 +Summary: oo view of file paths and names, subclassed from bytes/str/unicode +License: BSD License +URL: https://github.com/ethanfurman/antipathy +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/eb/ac/eee1077d5b607e3c3e22e65f98d5d2bdffc712047e3839220c2ad18dfe64/antipathy-0.85.3.tar.gz +BuildArch: noarch + + +%description +Tired of calling a function for every path manipulation you need to do? +Is:: + >>> path, filename = os.path.split(some_name) + >>> basename, ext = os.path.splitext(filename) + >>> basename = basename + '_01' + >>> new_name = os.path.join(path, basename+ext) +wearing on your nerves? +In short, are you filled with antipathy [1] for os.path? +Then get antipathy and work with Path:: + >>> from antipathy import Path + >>> some_name = Path('/home/ethan/source/my_file.txt') + >>> backups = Path('/home/ethan/backup/') + >>> print some_name.path + '/home/ethan/source/' + >>> print some_name.ext + '.txt' + >>> print some_name.exists() + True # (well, if it happens to exist at this moment ;) + >>> backup = backups / some_name.filename + '_01' + some_name.ext + >>> print backup + '/home/ethan/backup/my_file_01.txt' + >>> some_name.copy(backup) +Because Path is a subclass of bytes/str/unicode, it can still be passed to other functions that expect a bytes/str/unicode object and work seamlessly [2]. +[1] https://www.google.com/#q=antipathy +[2] in most cases -- there are a few places that do a `type` check instead of an `isinstance` check. + +%package -n python3-antipathy +Summary: oo view of file paths and names, subclassed from bytes/str/unicode +Provides: python-antipathy +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-antipathy +Tired of calling a function for every path manipulation you need to do? +Is:: + >>> path, filename = os.path.split(some_name) + >>> basename, ext = os.path.splitext(filename) + >>> basename = basename + '_01' + >>> new_name = os.path.join(path, basename+ext) +wearing on your nerves? +In short, are you filled with antipathy [1] for os.path? +Then get antipathy and work with Path:: + >>> from antipathy import Path + >>> some_name = Path('/home/ethan/source/my_file.txt') + >>> backups = Path('/home/ethan/backup/') + >>> print some_name.path + '/home/ethan/source/' + >>> print some_name.ext + '.txt' + >>> print some_name.exists() + True # (well, if it happens to exist at this moment ;) + >>> backup = backups / some_name.filename + '_01' + some_name.ext + >>> print backup + '/home/ethan/backup/my_file_01.txt' + >>> some_name.copy(backup) +Because Path is a subclass of bytes/str/unicode, it can still be passed to other functions that expect a bytes/str/unicode object and work seamlessly [2]. +[1] https://www.google.com/#q=antipathy +[2] in most cases -- there are a few places that do a `type` check instead of an `isinstance` check. + +%package help +Summary: Development documents and examples for antipathy +Provides: python3-antipathy-doc +%description help +Tired of calling a function for every path manipulation you need to do? +Is:: + >>> path, filename = os.path.split(some_name) + >>> basename, ext = os.path.splitext(filename) + >>> basename = basename + '_01' + >>> new_name = os.path.join(path, basename+ext) +wearing on your nerves? +In short, are you filled with antipathy [1] for os.path? +Then get antipathy and work with Path:: + >>> from antipathy import Path + >>> some_name = Path('/home/ethan/source/my_file.txt') + >>> backups = Path('/home/ethan/backup/') + >>> print some_name.path + '/home/ethan/source/' + >>> print some_name.ext + '.txt' + >>> print some_name.exists() + True # (well, if it happens to exist at this moment ;) + >>> backup = backups / some_name.filename + '_01' + some_name.ext + >>> print backup + '/home/ethan/backup/my_file_01.txt' + >>> some_name.copy(backup) +Because Path is a subclass of bytes/str/unicode, it can still be passed to other functions that expect a bytes/str/unicode object and work seamlessly [2]. +[1] https://www.google.com/#q=antipathy +[2] in most cases -- there are a few places that do a `type` check instead of an `isinstance` check. + +%prep +%autosetup -n antipathy-0.85.3 + +%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-antipathy -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Fri May 05 2023 Python_Bot <Python_Bot@openeuler.org> - 0.85.3-1 +- Package Spec generated @@ -0,0 +1 @@ +013533aaf5f6811d5cf29f566f03da7f antipathy-0.85.3.tar.gz |