summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
Diffstat (limited to 'python')
-rw-r--r--python/phply/README8
-rw-r--r--python/phply/README.Slackware10
-rw-r--r--python/phply/phply.SlackBuild16
-rw-r--r--python/phply/phply.info10
4 files changed, 36 insertions, 8 deletions
diff --git a/python/phply/README b/python/phply/README
index aad37106ba..b46d11c04b 100644
--- a/python/phply/README
+++ b/python/phply/README
@@ -2,3 +2,11 @@ phply is a parser for the PHP programming language written using PLY, a
Lex/YACC-style parser generator toolkit for Python.
See README.Slackware for some usage notes.
+
+A Note on Dependencies:
+
+Nose is only required to run the python test suite. It is not a
+run-time dependency and can be safely removed after phply is built.
+
+The python library simplejson is an optional dependency. phply ships with a
+script php2json.py in /usr/doc/phply-$VERSION/tools that requires it.
diff --git a/python/phply/README.Slackware b/python/phply/README.Slackware
index 16d2e14bea..d2b5afec72 100644
--- a/python/phply/README.Slackware
+++ b/python/phply/README.Slackware
@@ -8,3 +8,13 @@ $ phplex /path/to/file_name.php
For the parser test execute in a shell:
$ phpparse /path/to/file_name.php
+
+For the JSON dump:
+
+$ cd /usr/doc/phply-$VERSION/tools
+$ python ./php2json.py < input.php > output.json
+
+For the Jinja2 converter:
+
+$ cd /usr/doc/phply-$VERSION/tools
+$ python ./php2jinja.py <input.php > output.html
diff --git a/python/phply/phply.SlackBuild b/python/phply/phply.SlackBuild
index 69533a2646..e932e1c906 100644
--- a/python/phply/phply.SlackBuild
+++ b/python/phply/phply.SlackBuild
@@ -2,7 +2,7 @@
# Slackware build script for phply
-# Copyright 2015-2017 Brenton Earl <brent@exitstatusone.com>
+# Copyright 2015-2018 Brenton Earl <brent@exitstatusone.com>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -23,7 +23,7 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=phply
-VERSION=${VERSION:-1.0.0}
+VERSION=${VERSION:-1.2.4}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -69,13 +69,23 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+python setup.py test
python setup.py install --root=$PKG
+# Python 3 support.
+# Be aware that the python3 tests downloads a
+# newer version of nose in /tmp to succeed.
+# This newer version of nose does not get installed on your system.
+if $(python3 -c 'import sys' 2>/dev/null); then
+ python3 setup.py test
+ python3 setup.py install --root=$PKG
+fi
+
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 PKG-INFO $PKG/usr/doc/$PRGNAM-$VERSION
+cp -ar README* LICENSE AUTHORS tools/ $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
cat $CWD/README.Slackware > $PKG/usr/doc/$PRGNAM-$VERSION/README.Slackware
diff --git a/python/phply/phply.info b/python/phply/phply.info
index 3c2a227eb0..4b133928d9 100644
--- a/python/phply/phply.info
+++ b/python/phply/phply.info
@@ -1,10 +1,10 @@
PRGNAM="phply"
-VERSION="1.0.0"
-HOMEPAGE="https://github.com/ramen/phply"
-DOWNLOAD="https://pypi.python.org/packages/2f/b6/6f3689196078fdf9e48d11289f5d37427956fa755e62ab3284ea07ecb028/phply-1.0.0.tar.gz"
-MD5SUM="5849b0eb9470aab54b0a5d59dbaf63b9"
+VERSION="1.2.4"
+HOMEPAGE="https://github.com/viraptor/phply"
+DOWNLOAD="https://github.com/viraptor/phply/archive/1.2.4/phply-1.2.4.tar.gz"
+MD5SUM="94fb0a9c5a0a5054f40ba9fd6c1d776c"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
-REQUIRES="ply"
+REQUIRES="nose ply"
MAINTAINER="Brenton Earl"
EMAIL="brent@exitstatusone.com"