diff options
Diffstat (limited to 'python/python3-py7zr')
-rw-r--r-- | python/python3-py7zr/README | 32 | ||||
-rw-r--r-- | python/python3-py7zr/python3-py7zr.SlackBuild | 103 | ||||
-rw-r--r-- | python/python3-py7zr/python3-py7zr.info | 10 | ||||
-rw-r--r-- | python/python3-py7zr/slack-desc | 19 |
4 files changed, 164 insertions, 0 deletions
diff --git a/python/python3-py7zr/README b/python/python3-py7zr/README new file mode 100644 index 0000000000000..119a71d5a93c8 --- /dev/null +++ b/python/python3-py7zr/README @@ -0,0 +1,32 @@ +py7zr + +is a library and utility to support 7zip archive compression, +decompression, encryption and decryption written by Python programming +language. + +py7zr supports algorithms and filters which lzma module and liblzma +support, and supports BZip2 and Deflate that are implemented in python +core libraries, It also supports ZStandard, Brotli and PPMd with third +party libraries. + +py7zr is also able to encrypt and decrypt data using 3rd party +encryption library. + + +Supported algorithms +compress + LZMA2 + LZMA + Bzip2 + Deflate + Copy + ZStandard + Brotli + PPMd + Enhanced Deflate (Experimental) (not on SBo) + +crypt + 7zAES +Filters + Delta + BCJ(X86,ARMT,ARM,PPC,SPARC,IA64) diff --git a/python/python3-py7zr/python3-py7zr.SlackBuild b/python/python3-py7zr/python3-py7zr.SlackBuild new file mode 100644 index 0000000000000..ff2cf9fca4e21 --- /dev/null +++ b/python/python3-py7zr/python3-py7zr.SlackBuild @@ -0,0 +1,103 @@ +#!/bin/bash + +# Slackware build script for python3-py7zr + +# Copyright 2023, Lockywolf +# All rights reserved. +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +cd $(dirname $0) ; CWD=$(pwd) + +PRGNAM=python3-py7zr +TARNAM=py7zr +VERSION=${VERSION:-0.20.8} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i586 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then + echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" + exit 0 +fi + +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" +elif [ "$ARCH" = "aarch64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" +fi + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $TARNAM-$VERSION +tar xvf $CWD/$TARNAM-$VERSION.tar.gz +cd $TARNAM-$VERSION +chown -R root:root . +find -L . \ + \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ + -o -perm 511 \) -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; + +export PYTHONPATH=/opt/python3.9/site-packages/ + +sed -i 's/brotli>=1.1.0/brotli>=1.0.9/g' pyproject.toml + +python3 -m build --wheel --no-isolation +python3 -m installer --destdir "$PKG" dist/*.whl + +find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ + | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a \ + LICENSE README.rst \ + $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE diff --git a/python/python3-py7zr/python3-py7zr.info b/python/python3-py7zr/python3-py7zr.info new file mode 100644 index 0000000000000..2a323881defdd --- /dev/null +++ b/python/python3-py7zr/python3-py7zr.info @@ -0,0 +1,10 @@ +PRGNAM="python3-py7zr" +VERSION="0.20.8" +HOMEPAGE="https://github.com/miurahr/py7zr" +DOWNLOAD="https://files.pythonhosted.org/packages/4d/0e/00546f8f5dcac1eadc56a5da78c14c95077425792d00c2b004c402e926d8/py7zr-0.20.8.tar.gz" +MD5SUM="17d83f03f47bac4ce9af4bf5b61ff114" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="python-zipp python-importlib_metadata python3-flit_core python3-installer python3-pyproject-hooks python3-build typing-extensions python3-wheel python3-setuptools-opt python3-setuptools-scm-opt python3-psutil python3-brotlicffi pycryptodomex python3-texttable python3-multivolumefile python3-inflate64 python3-pybcj python3-pyppmd python3-pyzstd" +MAINTAINER="Lockywolf" +EMAIL="for_sbo.py7zr_2023-11-28@lockywolf.net" diff --git a/python/python3-py7zr/slack-desc b/python/python3-py7zr/slack-desc new file mode 100644 index 0000000000000..d89e172eb105a --- /dev/null +++ b/python/python3-py7zr/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. +# Line up the first '|' above the ':' following the base package name, and +# the '|' on the right side marks the last column you can put a character in. +# You must make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':' except on otherwise blank lines. + + |-----handy-ruler------------------------------------------------------| +python3-py7zr: python3-py7zr (library and utility to support 7zip archives) +python3-py7zr: +python3-py7zr: py7zr is a library and utility to support 7zip archive compression, +python3-py7zr: decompression, encryption and decryption written by Python +python3-py7zr: programming language. +python3-py7zr: +python3-py7zr: +python3-py7zr: +python3-py7zr: +python3-py7zr: +python3-py7zr: |