Skip to content

Commit 1a2c4ca

Browse files
author
Michael Phelps
committed
Fix circular import issue
1 parent 5b7559e commit 1a2c4ca

File tree

6 files changed

+21
-12
lines changed

6 files changed

+21
-12
lines changed

Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ check:
1515
upload:
1616
py -m twine upload --skip-existing dist/*
1717

18+
.PHONY: uploadtest
19+
uploadtest:
20+
py -m twine upload --repository-url https://test.pypi.org/legacy/ --skip-existing dist/*
21+
1822
.PHONY: install
1923
install:
2024
pip install .

README.md

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ Transpiles some Python into human-readable Golang.
1414

1515
### Installing
1616

17+
#### via pip
18+
```
19+
pip install pytago
20+
```
21+
1722
#### via setup.py (dev)
1823

1924
```
@@ -22,13 +27,6 @@ cd pytago
2227
pip install -e .
2328
```
2429

25-
The other installation methods may temporarily result in a circular import issue. It will be addressed on soon.
26-
27-
#### via pip
28-
```
29-
pip install pytago
30-
```
31-
3230
#### via setup.py
3331

3432
```
@@ -3265,4 +3263,4 @@ Some things I'd like to add soon...
32653263

32663264
- "value in range(start, stop, step)" => a conditional statement
32673265
- Exhaustive implementation of list/dict/int/float/bytes methods
3268-
-
3266+
-

pytago/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
11
from pytago.core import *
2-
from pytago import go_ast

pytago/core.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
import ast
22

3-
from pytago import go_ast
4-
53

64
def python_to_go(python: str, debug=True) -> str:
5+
from pytago import go_ast
76
py_tree = ast.parse(python)
87
go_tree = go_ast.File.from_Module(py_tree)
98
return go_ast.unparse(go_tree, debug=debug)
109

1110

1211
def dump_python_to_go_ast_as_json(python: str):
12+
from pytago import go_ast
1313
"""
1414
Not currently used for anything. Hoping that this could
1515
be the first step toward serializing ASTs to send to

scripts/README_HEADER.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,14 @@ Transpiles some Python into human-readable Golang.
1919
pip install pytago
2020
```
2121

22+
#### via setup.py (dev)
23+
24+
```
25+
git clone https://github.com/nottheswimmer/pytago/
26+
cd pytago
27+
pip install -e .
28+
```
29+
2230
#### via setup.py
2331

2432
```

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
setup(
77
name='pytago',
8-
version='0.0.3',
8+
version='0.0.4',
99
packages=['pytago'],
1010
url='https://github.com/nottheswimmer/pytago',
1111
license='',

0 commit comments

Comments
 (0)