mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-18 22:06:04 +01:00
python/phply: Updated for version 1.0.0.
Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
This commit is contained in:
parent
efe247a89a
commit
ec73d882d6
5 changed files with 19 additions and 40 deletions
|
@ -1,15 +1,4 @@
|
||||||
phply is a parser for the PHP programming language written using PLY, a
|
phply is a parser for the PHP programming language written using PLY, a
|
||||||
Lex/YACC-style parser generator toolkit for Python.
|
Lex/YACC-style parser generator toolkit for Python.
|
||||||
|
|
||||||
Included tools installed to /usr/bin:
|
See README.Slackware for some usage notes.
|
||||||
|
|
||||||
phpshell.py - PHP interactive interpreter written in Python
|
|
||||||
|
|
||||||
php2json.py - Converts PHP to a JSON-based abstract syntax tree
|
|
||||||
Usage: php2json.py < input.php > output.json
|
|
||||||
|
|
||||||
php2python.py - Converts PHP to Python using unparse.py
|
|
||||||
Usage: php2python.py < input.php > output.py
|
|
||||||
|
|
||||||
php2jinja.py - Converts PHP to Jinja2 templates (experimental)
|
|
||||||
Usage: php2jinja.py < input.php > output.html
|
|
||||||
|
|
10
python/phply/README.Slackware
Normal file
10
python/phply/README.Slackware
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
How to use phply?
|
||||||
|
-----------------
|
||||||
|
|
||||||
|
For the lexer test execute in a shell:
|
||||||
|
|
||||||
|
$ phplex /path/to/file_name.php
|
||||||
|
|
||||||
|
For the parser test execute in a shell:
|
||||||
|
|
||||||
|
$ phpparse /path/to/file_name.php
|
|
@ -1,18 +0,0 @@
|
||||||
--- phply-0.9.1.orig/setup.py 2015-11-16 13:07:31.666674204 -0700
|
|
||||||
+++ phply-0.9.1/setup.py 2015-11-16 13:15:02.571666129 -0700
|
|
||||||
@@ -19,6 +19,15 @@
|
|
||||||
license='BSD',
|
|
||||||
url='http://www.github.com/ramen/phply',
|
|
||||||
|
|
||||||
+ scripts=[
|
|
||||||
+ 'tools/php2jinja.py',
|
|
||||||
+ 'tools/php2json.py',
|
|
||||||
+ 'tools/php2python.py',
|
|
||||||
+ 'tools/phpshell.py',
|
|
||||||
+ 'tools/tokenize.php',
|
|
||||||
+ 'tools/unparse.py',
|
|
||||||
+ ],
|
|
||||||
+
|
|
||||||
classifiers=[
|
|
||||||
'Development Status :: 2 - Pre-Alpha',
|
|
||||||
'Environment :: Console',
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
# Slackware build script for phply
|
# Slackware build script for phply
|
||||||
|
|
||||||
# Copyright 2015-2016 Brenton Earl <brent@exitstatusone.com>
|
# Copyright 2015-2017 Brenton Earl <brent@exitstatusone.com>
|
||||||
# All rights reserved.
|
# All rights reserved.
|
||||||
#
|
#
|
||||||
# Redistribution and use of this script, with or without modification, is
|
# Redistribution and use of this script, with or without modification, is
|
||||||
|
@ -23,7 +23,7 @@
|
||||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
PRGNAM=phply
|
PRGNAM=phply
|
||||||
VERSION=${VERSION:-0.9.1}
|
VERSION=${VERSION:-1.0.0}
|
||||||
BUILD=${BUILD:-1}
|
BUILD=${BUILD:-1}
|
||||||
TAG=${TAG:-_SBo}
|
TAG=${TAG:-_SBo}
|
||||||
|
|
||||||
|
@ -69,17 +69,15 @@ find -L . \
|
||||||
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
|
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
|
||||||
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
|
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
|
||||||
|
|
||||||
# make setup.py include scripts in $PRGNAM-$VERSION/tools/
|
|
||||||
patch -p1 --verbose < $CWD/phply-setup.py.diff
|
|
||||||
|
|
||||||
python setup.py install --root=$PKG
|
python setup.py install --root=$PKG
|
||||||
|
|
||||||
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
|
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
|
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
|
||||||
|
|
||||||
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
|
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
|
||||||
cp -a AUTHORS LICENSE PKG-INFO README.md $PKG/usr/doc/$PRGNAM-$VERSION
|
cp -a PKG-INFO $PKG/usr/doc/$PRGNAM-$VERSION
|
||||||
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
|
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
|
||||||
|
cat $CWD/README.Slackware > $PKG/usr/doc/$PRGNAM-$VERSION/README.Slackware
|
||||||
|
|
||||||
mkdir -p $PKG/install
|
mkdir -p $PKG/install
|
||||||
cat $CWD/slack-desc > $PKG/install/slack-desc
|
cat $CWD/slack-desc > $PKG/install/slack-desc
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
PRGNAM="phply"
|
PRGNAM="phply"
|
||||||
VERSION="0.9.1"
|
VERSION="1.0.0"
|
||||||
HOMEPAGE="https://github.com/ramen/phply"
|
HOMEPAGE="https://github.com/ramen/phply"
|
||||||
DOWNLOAD="https://pypi.python.org/packages/source/p/phply/phply-0.9.1.tar.gz"
|
DOWNLOAD="https://pypi.python.org/packages/2f/b6/6f3689196078fdf9e48d11289f5d37427956fa755e62ab3284ea07ecb028/phply-1.0.0.tar.gz"
|
||||||
MD5SUM="f336ab9d35bd9c0f0a50ede3252b12ba"
|
MD5SUM="5849b0eb9470aab54b0a5d59dbaf63b9"
|
||||||
DOWNLOAD_x86_64=""
|
DOWNLOAD_x86_64=""
|
||||||
MD5SUM_x86_64=""
|
MD5SUM_x86_64=""
|
||||||
REQUIRES="ply simplejson"
|
REQUIRES="ply"
|
||||||
MAINTAINER="Brenton Earl"
|
MAINTAINER="Brenton Earl"
|
||||||
EMAIL="brent@exitstatusone.com"
|
EMAIL="brent@exitstatusone.com"
|
||||||
|
|
Loading…
Reference in a new issue