python/python2-configobj: Added (Python2 version of configobj).

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
B. Watson 2024-10-08 11:02:29 +07:00 committed by Willy Sudiarto Raharjo
parent e9ce9bf4bb
commit e89e7191bb
No known key found for this signature in database
GPG key ID: 3F617144D7238786
4 changed files with 107 additions and 0 deletions

View file

@ -0,0 +1,8 @@
python2-configobj (configuration file python module)
A python module for ultra simple handling of configuration files.
Also useful for human readable data persistence. Flexible and simple.
Upgrade note: the former libraries/configobj build has been removed,
and replaced with python2-configobj and python3-configobj. If you
still have configobj installed, you should remove it.

View file

@ -0,0 +1,70 @@
#!/bin/bash
# Slackware build script for python2-configobj
# Written by B. Watson (urchlay@slackware.uk)
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
# This and python3-configobj replace the old libraries/configobj,
# split into separate py2 and py3, and put in the python/ category.
# Upstream's CHANGES.rst claims that configobj-5.0.9 drops support for
# python2, but that's not actually true. Most likely, when/if 5.0.10
# comes out, it really will drop python2, so this build will stay at
# 5.0.9 (if we still need it, by then).
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=python2-configobj
SRCNAM=configobj
VERSION=${VERSION:-5.0.9}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
# Pure python code, no need for CFLAGS or LIBDIRSUFFIX.
# We can't use noarch, since python modules go in either lib or lib64.
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}
set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $SRCNAM-$VERSION
tar xvf $CWD/$SRCNAM-$VERSION.tar.gz
cd $SRCNAM-$VERSION
chown -R root:root .
find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} + -o \
\! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} +
python2 setup.py install --root=$PKG
# Note: no API docs in this package. They're in the python3-configobj package.
PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION
mkdir -p $PKGDOC
cp -a CHANGES.rst README.md LICENSE $PKGDOC
cat $CWD/README > $PKGDOC/README
cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$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

View file

@ -0,0 +1,10 @@
PRGNAM="python2-configobj"
VERSION="5.0.9"
HOMEPAGE="https://pypi.org/project/configobj/"
DOWNLOAD="https://files.pythonhosted.org/packages/source/c/configobj/configobj-5.0.9.tar.gz"
MD5SUM="496b60edcd943a900ddc0cb04132e81c"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""
MAINTAINER="B. Watson"
EMAIL="urchlay@slackware.uk"

View file

@ -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------------------------------------------------------|
python2-configobj: python2-configobj (configuration file python module)
python2-configobj:
python2-configobj: A python module for ultra simple handling of configuration files.
python2-configobj: Also useful for human readable data persistence. Flexible and simple.
python2-configobj:
python2-configobj:
python2-configobj:
python2-configobj:
python2-configobj:
python2-configobj:
python2-configobj: