diff --git a/Makefile b/Makefile index fa8ca5d..b5a240a 100644 --- a/Makefile +++ b/Makefile @@ -15,6 +15,10 @@ check: upload: py -m twine upload --skip-existing dist/* +.PHONY: uploadtest +uploadtest: + py -m twine upload --repository-url https://test.pypi.org/legacy/ --skip-existing dist/* + .PHONY: install install: pip install . diff --git a/README.md b/README.md index d856bf7..c2e2657 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,11 @@ Transpiles some Python into human-readable Golang. ### Installing +#### via pip +``` +pip install pytago +``` + #### via setup.py (dev) ``` @@ -22,13 +27,6 @@ cd pytago pip install -e . ``` -The other installation methods may temporarily result in a circular import issue. It will be addressed on soon. - -#### via pip -``` -pip install pytago -``` - #### via setup.py ``` @@ -3265,4 +3263,4 @@ Some things I'd like to add soon... - "value in range(start, stop, step)" => a conditional statement - Exhaustive implementation of list/dict/int/float/bytes methods -- +- \ No newline at end of file diff --git a/pytago/__init__.py b/pytago/__init__.py index bd3fbfc..191f97b 100644 --- a/pytago/__init__.py +++ b/pytago/__init__.py @@ -1,2 +1 @@ from pytago.core import * -from pytago import go_ast diff --git a/pytago/core.py b/pytago/core.py index 1334658..d727173 100644 --- a/pytago/core.py +++ b/pytago/core.py @@ -1,15 +1,15 @@ import ast -from pytago import go_ast - def python_to_go(python: str, debug=True) -> str: + from pytago import go_ast py_tree = ast.parse(python) go_tree = go_ast.File.from_Module(py_tree) return go_ast.unparse(go_tree, debug=debug) def dump_python_to_go_ast_as_json(python: str): + from pytago import go_ast """ Not currently used for anything. Hoping that this could be the first step toward serializing ASTs to send to diff --git a/scripts/README_HEADER.md b/scripts/README_HEADER.md index 0fd7a34..62cca21 100644 --- a/scripts/README_HEADER.md +++ b/scripts/README_HEADER.md @@ -19,6 +19,14 @@ Transpiles some Python into human-readable Golang. pip install pytago ``` +#### via setup.py (dev) + +``` +git clone https://github.com/nottheswimmer/pytago/ +cd pytago +pip install -e . +``` + #### via setup.py ``` diff --git a/setup.py b/setup.py index db34a33..89f055a 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setup( name='pytago', - version='0.0.3', + version='0.0.4', packages=['pytago'], url='https://github.com/nottheswimmer/pytago', license='',