yyyyyyyan / rockstar-py

Python transpiler for the esoteric language Rockstar
MIT License
95 stars 26 forks source link

Package structure #1

Closed jmsv closed 6 years ago

jmsv commented 6 years ago

Great work on the transpiler! :smile:

This issue relates to the part of the README that says:

I'll work on the readibility and organization of the code, would love suggestions on how/where to do that.

Would rockstar-py be better structured as a package? E.g.:

If you think this is a good idea, I'd be happy to make these changes and open a PR


I'm not sure if this is related to this repo not being structured as a package, but after pip installing rockstar-py and running rockstar-py, a ModuleNotFoundError is raised:

$ rockstar-py                   
Traceback (most recent call last):
  File "/home/james/.local/share/virtualenvs/test-wygyIHa6/bin/rockstar-py", line 7, in <module>
    from rockstarpy.command_line import main
  File "/home/james/.local/share/virtualenvs/test-wygyIHa6/lib/python3.6/site-packages/rockstarpy/__init__.py", line 1, in <module>
    from .rockstarpy import rockstar
ModuleNotFoundError: No module named 'rockstarpy.rockstarpy'
yyyyyyyan commented 6 years ago

jmsv, thanks for the issue! The package wasn't properly organized, that should be fixed now. (You will need to clear pip cache and reinstall the package. I could only work it out on another machine :/ but it's working now haha)

yyyyyyyan commented 6 years ago

installing with pip lets you use the program in the command line. I'll add this in the README tomorrow morning

jmsv commented 6 years ago

Works well now, thanks :+1: