Accepting request 1171201 from home:smolsheep:upgrades

Tidied the spec and did some other minor cleanups. Find string borrowed from pip to prevent more rpmlint warnings.
I want to maintain here and in Factory for magic-wormhole.

OBS-URL: https://build.opensuse.org/request/show/1171201
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-zipstream-ng?expand=0&rev=1
This commit is contained in:
2024-05-02 09:27:36 +00:00
committed by Git OBS Bridge
commit 0806db72e7
5 changed files with 126 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
.osc

View File

@@ -0,0 +1,13 @@
-------------------------------------------------------------------
Mon Apr 29 06:43:48 UTC 2024 - Joshua Smith <smolsheep@opensuse.org>
- Improved specfile to python standards:
* Correct license to SPDX
* Fix invalid python globs
* Remove shebangs that throw rpmlint errors
- Enabled tests
-------------------------------------------------------------------
Wed Nov 8 12:08:57 UTC 2023 - Tuukka Pasanen <tuukka.pasanen@ilmi.fi>
- Initial version 1.7.1

86
python-zipstream-ng.spec Normal file
View File

@@ -0,0 +1,86 @@
#
# spec file for package python-zipstream-ng
#
# Copyright (c) 2021 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: python-zipstream-ng
Version: 1.7.1
Release: 0
Summary: Modern and easy to use streamable zip file generator
License: LGPL-3.0
URL: https://github.com/pR0Ps/zipstream-ng
Source: https://files.pythonhosted.org/packages/source/z/zipstream-ng/zipstream-ng-%{version}.tar.gz
BuildRequires: python-rpm-macros
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module pytest}
BuildRequires: fdupes
Requires(post): update-alternatives
Requires(preun): update-alternatives
BuildArch: noarch
Conflicts: python-zipstream
%python_subpackages
%description
A modern and easy to use streamable zip file generator.
It can package and stream many files and folders into a zip on the fly
without needing temporary files or excessive memory.
It can also calculate the final size of the zip file before streaming it.
Features:
* Generates zip data on the fly as it's requested.
* Can calculate the total size of the resulting zip file before generation even begins.
* Low memory usage: Since the zip is generated as it's requested,
very little has to be kept in memory (peak usage of less than 20MB is typical, even for TBs of files).
* Flexible API: Typical use cases are simple, complicated ones are possible.
* Supports zipping data from files, bytes, strings, and any other iterable objects.
* Keeps track of the date of the most recently modified file added to the zip file.
* Threadsafe: Won't mangle data if multiple threads concurrently add data to the same stream.
* Includes a clone of Python's http.server module with zip support added. Try python -m zipstream.server.
* Automatically uses Zip64 extensions, but only if they are required.
* No external dependencies.
%prep
%autosetup -n zipstream-ng-%{version}
# Remove shebangs for sitelib
find . -type f -name "*.py" -exec sed -i '/^#!.*env python.*/d' {} ';'
%build
%python_build
%install
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%python_clone -a %{buildroot}%{_bindir}/zipserver
%check
%pytest
%post
%python_install_alternative zipserver
%postun
%python_uninstall_alternative zipserver
%files %{python_files}
%doc README.md
%license LICENSE
%python_alternative %{_bindir}/zipserver
%{python_sitelib}/zipstream
%{python_sitelib}/zipstream_ng-%{version}*
%changelog

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:f92023b9ca578cd7fdd94ec733c65664ecf7ee32493e38cdf8e365a1316e9ffc
size 35488