summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2023-05-10 06:58:04 +0000
committerCoprDistGit <infra@openeuler.org>2023-05-10 06:58:04 +0000
commit92bc0b420f150ec96cfaa32e47f537d2925a625b (patch)
tree51d61b392443c8e43f1c4bf6fe1909fd6e91b3be
parent297e0670f222cdfd952f41bebd46427fac9a4b75 (diff)
automatic import of python-unlzw3
-rw-r--r--.gitignore1
-rw-r--r--python-unlzw3.spec186
-rw-r--r--sources1
3 files changed, 188 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..5913eca 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/unlzw3-0.2.2.tar.gz
diff --git a/python-unlzw3.spec b/python-unlzw3.spec
new file mode 100644
index 0000000..023dcd6
--- /dev/null
+++ b/python-unlzw3.spec
@@ -0,0 +1,186 @@
+%global _empty_manifest_terminate_build 0
+Name: python-unlzw3
+Version: 0.2.2
+Release: 1
+Summary: Pure Python decompression module for .Z files compressed using Unix compress utility
+License: MIT License
+URL: https://pypi.org/project/unlzw3/
+Source0: https://mirrors.nju.edu.cn/pypi/web/packages/f1/d4/cb866f43d87a6b35caef7f8ca51558f531d1efb2742bb2c77be0e8cd9dae/unlzw3-0.2.2.tar.gz
+BuildArch: noarch
+
+Requires: python3-flake8
+Requires: python3-flake8-bugbear
+Requires: python3-flake8-builtins
+Requires: python3-flake8-blind-except
+Requires: python3-mypy
+Requires: python3-pytest
+
+%description
+# unlzw3
+
+[![ci](https://github.com/scivision/unlzw3/actions/workflows/ci.yml/badge.svg)](https://github.com/scivision/unlzw3/actions/workflows/ci.yml)
+[![PyPi Download stats](http://pepy.tech/badge/unlzw3)](http://pepy.tech/project/unlzw3)
+
+Pure Python decompression module for .Z files compressed using Unix compress utility.
+Unlike the faster but Linux-specific
+[unlzw](https://pypi.org/project/unlzw/)
+using Python CFFI, `unlzw3` is slower but works on any platform that runs Python including Windows.
+
+This is a purely Python adaptation of Mark Adler's
+['unlzw' C function](http://mathematica.stackexchange.com/questions/60531/how-can-i-read-compressed-z-file-automatically-by-mathematica/60879#60879)
+on Stackoverflow.
+Python can be much slower than using any compiled utility for the same purpose.
+
+## Usage
+
+`unlzw3.unlzw(data)` takes LZW .Z compressed data as any type which can be converted to a bytearray (generally a string).
+It returns a UTF-8 decoded string containing the decompressed data.
+
+```python
+import unlzw3
+from pathlib import Path
+
+uncompressed_data = unlzw3.unlzw(Path('file.Z').read_bytes())
+
+# or
+
+uncompressed_data = unlzw3.unlzw(Path('file.Z'))
+```
+
+## Contributions
+
+* reference C code: Mark Adler
+* pure Python implemetation: [Brandon Owen](https://github.com/umeat/unlzw)
+* modernization, test / CI and PyPi: Michael Hirsch
+
+
+%package -n python3-unlzw3
+Summary: Pure Python decompression module for .Z files compressed using Unix compress utility
+Provides: python-unlzw3
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-pip
+%description -n python3-unlzw3
+# unlzw3
+
+[![ci](https://github.com/scivision/unlzw3/actions/workflows/ci.yml/badge.svg)](https://github.com/scivision/unlzw3/actions/workflows/ci.yml)
+[![PyPi Download stats](http://pepy.tech/badge/unlzw3)](http://pepy.tech/project/unlzw3)
+
+Pure Python decompression module for .Z files compressed using Unix compress utility.
+Unlike the faster but Linux-specific
+[unlzw](https://pypi.org/project/unlzw/)
+using Python CFFI, `unlzw3` is slower but works on any platform that runs Python including Windows.
+
+This is a purely Python adaptation of Mark Adler's
+['unlzw' C function](http://mathematica.stackexchange.com/questions/60531/how-can-i-read-compressed-z-file-automatically-by-mathematica/60879#60879)
+on Stackoverflow.
+Python can be much slower than using any compiled utility for the same purpose.
+
+## Usage
+
+`unlzw3.unlzw(data)` takes LZW .Z compressed data as any type which can be converted to a bytearray (generally a string).
+It returns a UTF-8 decoded string containing the decompressed data.
+
+```python
+import unlzw3
+from pathlib import Path
+
+uncompressed_data = unlzw3.unlzw(Path('file.Z').read_bytes())
+
+# or
+
+uncompressed_data = unlzw3.unlzw(Path('file.Z'))
+```
+
+## Contributions
+
+* reference C code: Mark Adler
+* pure Python implemetation: [Brandon Owen](https://github.com/umeat/unlzw)
+* modernization, test / CI and PyPi: Michael Hirsch
+
+
+%package help
+Summary: Development documents and examples for unlzw3
+Provides: python3-unlzw3-doc
+%description help
+# unlzw3
+
+[![ci](https://github.com/scivision/unlzw3/actions/workflows/ci.yml/badge.svg)](https://github.com/scivision/unlzw3/actions/workflows/ci.yml)
+[![PyPi Download stats](http://pepy.tech/badge/unlzw3)](http://pepy.tech/project/unlzw3)
+
+Pure Python decompression module for .Z files compressed using Unix compress utility.
+Unlike the faster but Linux-specific
+[unlzw](https://pypi.org/project/unlzw/)
+using Python CFFI, `unlzw3` is slower but works on any platform that runs Python including Windows.
+
+This is a purely Python adaptation of Mark Adler's
+['unlzw' C function](http://mathematica.stackexchange.com/questions/60531/how-can-i-read-compressed-z-file-automatically-by-mathematica/60879#60879)
+on Stackoverflow.
+Python can be much slower than using any compiled utility for the same purpose.
+
+## Usage
+
+`unlzw3.unlzw(data)` takes LZW .Z compressed data as any type which can be converted to a bytearray (generally a string).
+It returns a UTF-8 decoded string containing the decompressed data.
+
+```python
+import unlzw3
+from pathlib import Path
+
+uncompressed_data = unlzw3.unlzw(Path('file.Z').read_bytes())
+
+# or
+
+uncompressed_data = unlzw3.unlzw(Path('file.Z'))
+```
+
+## Contributions
+
+* reference C code: Mark Adler
+* pure Python implemetation: [Brandon Owen](https://github.com/umeat/unlzw)
+* modernization, test / CI and PyPi: Michael Hirsch
+
+
+%prep
+%autosetup -n unlzw3-0.2.2
+
+%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-unlzw3 -f filelist.lst
+%dir %{python3_sitelib}/*
+
+%files help -f doclist.lst
+%{_docdir}/*
+
+%changelog
+* Wed May 10 2023 Python_Bot <Python_Bot@openeuler.org> - 0.2.2-1
+- Package Spec generated
diff --git a/sources b/sources
new file mode 100644
index 0000000..2f0ea03
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+e8612f0e9e505896bc75ab6518dc05da unlzw3-0.2.2.tar.gz