Skip to content

Commit

Permalink
Fix circular import issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Phelps committed Jun 24, 2021
1 parent 5b7559e commit 1a2c4ca
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 12 deletions.
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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 .
Expand Down
14 changes: 6 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ Transpiles some Python into human-readable Golang.

### Installing

#### via pip
```
pip install pytago
```

#### via setup.py (dev)

```
Expand All @@ -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

```
Expand Down Expand Up @@ -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
-
-
1 change: 0 additions & 1 deletion pytago/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
from pytago.core import *
from pytago import go_ast
4 changes: 2 additions & 2 deletions pytago/core.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
8 changes: 8 additions & 0 deletions scripts/README_HEADER.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

```
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setup(
name='pytago',
version='0.0.3',
version='0.0.4',
packages=['pytago'],
url='https://github.com/nottheswimmer/pytago',
license='',
Expand Down

0 comments on commit 1a2c4ca

Please sign in to comment.