Permalink
Browse files

Changed directory structure to fullfill requirements of setup.py/dist…

…utils, and pushed it to PyPI (https://pypi.python.org/pypi/pynetree).
  • Loading branch information...
phorward committed Aug 3, 2017
1 parent 0823741 commit a4c94f201503d63796d56a965adde1f40d949211
Showing with 84 additions and 12 deletions.
  1. +4 −0 .gitignore
  2. +6 −0 CHANGELOG
  3. +0 −7 LICENSE
  4. +2 −2 README.md
  5. +0 −1 __init__.py
  6. +26 −0 deploy-pypi.sh
  7. +1 −0 pynetree/__init__.py
  8. +5 −2 { → pynetree}/pynetree.py
  9. +40 −0 setup.py
View
@@ -1,2 +1,6 @@
.idea
*.pyc
/dist/
/build/
/*.egg-info
View
@@ -1,3 +1,9 @@
v0.6
----
- Modified directory structure to fit to setup.py/distutils
- Added setup.py and some scripts for deployment on PyPI
v0.5
----
View
@@ -1,10 +1,3 @@
>>>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
pynetree - A light-weight parsing toolkit written in Python
Copyright (C) 2015-2017 by Phorward Software Technologies, Jan Max Meyer
www.phorward.info ++ jmm<at>phorward<dot>de
All rights reserved. See LICENSE for more information.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<<<
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "software"), to deal
in the software without restriction, including without limitation the rights
View
@@ -48,7 +48,7 @@ add
pynetree also provides a handy command-line tool to rapidly prototype grammars. The next command just generates the same parser as the example program from above.
```
$ ./pynetree.py "@int /[0-9]+/; f: int | '(' e ')'; t: @mul( t '*' f ) | f; e: @add( e '+' t ) | t;"
$ pynetree "@int /[0-9]+/; f: int | '(' e ')'; t: @mul( t '*' f ) | f; e: @add( e '+' t ) | t;"
```
# Requirements
@@ -185,7 +185,7 @@ Please do also take a look at the many examples provided with pynetree to get fa
pynetree is developed and maintained by Jan Max Meyer, Phorward Software Technologies.
pynetree is the result of a several years experience in parser development tools, and is currently worked out as some kind of sister-project of the [Phorward Toolkit/libphorward](https://github.com/phorward/phorward), a parsing a lexical analysis toolkit implementing LR/LALR parsers and focusing on the C programming language. Therefore, the BNF-styled grammar definition language of both pynetree and libphorward are similar and provide the same interface for both parser development tools.
It is the result of a several years experience in parser development tools, and is currently worked out as some kind of sister-project of the [Phorward Toolkit/libphorward](https://github.com/phorward/phorward), a parsing a lexical analysis toolkit implementing LR/LALR parsers and focusing on the C programming language. Therefore, the BNF-styled grammar definition language of both pynetree and libphorward are similar and provide the same interface for both parser development tools.
# License
View

This file was deleted.

Oops, something went wrong.
View
@@ -0,0 +1,26 @@
#!/bin/sh
pandoc -t rst README.md | sed '3,6d' >README.rst
if [ $? -ne 0 ]
then
exit 1
fi
echo "--- README.rst ---"
cat README.rst
echo "------------------"
echo -n "Type 'YES' to continue..."
read Y
if [ "$Y" != "YES" ]
then
echo "Aborted."
exit 1
fi
python2 setup.py sdist upload -r pypi
rm -f README.rst
echo "All done :)"
View
@@ -0,0 +1 @@
from pynetree import main, Parser, ParseError, Node
View
@@ -4,7 +4,7 @@
pynetree: A light-weight parsing toolkit written in pure Python.
"""
__version__ = "0.5"
__version__ = "0.6"
__license__ = "MIT"
__status__ = "Beta"
__author__ = "Jan Max Meyer"
@@ -774,7 +774,7 @@ def perform(prefix, loop = None, *args, **kwargs):
elif self.emits[node.key]:
print(self.emits[node.key])
if __name__ == "__main__":
def main():
import argparse, sys
ap = argparse.ArgumentParser(
@@ -861,3 +861,6 @@ def perform(prefix, loop = None, *args, **kwargs):
if ast:
ast.dump()
if __name__ == "__main__":
main()
View
@@ -0,0 +1,40 @@
#!/usr/bin/env python
#-*- coding: utf-8 -*-
import re, os
from setuptools import setup
descr = "A light-weight parsing toolkit written in pure Python."
longDescr = descr
if os.path.exists("README.rst"):
longDescr = open("README.rst").read()
def version(*file_paths):
f = open(*file_paths).read()
m = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]", f, re.M)
if m:
return m.group(1)
raise RuntimeError("Unable to find version string.")
setup(
name = "pynetree",
version = version("pynetree/pynetree.py"),
author="Jan Max Meyer",
author_email="info@pynetree.org",
url = "http://pynetree.org",
description=descr,
long_description=longDescr,
license="MIT",
keywords="parsing parser parse packrat left-recursive ast syntax compiler",
packages=["pynetree"],
entry_points={
"console_scripts": [
"pynetree=pynetree:main"]}
)

0 comments on commit a4c94f2

Please sign in to comment.