dev-cafe / parselglossy

Generic input parsing library, speaking in tongues.
https://parselglossy.readthedocs.io
MIT License
7 stars 2 forks source link

Not sure how to run the script/generator #92

Closed bast closed 4 years ago

bast commented 4 years ago

This is what I tried:

$ poetry install -v
$ poetry run parselglossy --help

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 961, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 973, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'parseglossy'

Then (not knowing poetry well enough) I created a new folder, new venv and pip installed from the source folder, then:

$ parselglossy --help

Traceback (most recent call last):
  File "/home/user/tmp/foo/venv/bin/parselglossy", line 5, in <module>
    from parseglossy.cli import cli
ModuleNotFoundError: No module named 'parseglossy'
robertodr commented 4 years ago

I guess the pyproject.toml is wrong? I might not have tested thoroughly enough... I think we can have both poetry and flit, with the caveat that the latter will need a requirements.txt file too.

bast commented 4 years ago

Of course the above problem can wait, did not want to distract.

I kind of like the separation into pyproject.toml and requirements.txt and this may not even be best practice but just plays well with my alias that can set up a venv based on requirements.txt. And really the only thing that needs to go into requirements.txt is flit.

robertodr commented 4 years ago

I'm moving to Flit (agreed, it's much nicer... I was blinded by Nix) But still the entry point doesn't work. It installs the package, but the console script won't work :thinking:

bast commented 4 years ago

I can look at that. You can open a draft-PR and I can add to that and perhaps I see the problem.

robertodr commented 4 years ago

See #93