Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get_version() broken? #73

Closed
Jean1995 opened this issue Oct 24, 2023 · 3 comments
Closed

get_version() broken? #73

Jean1995 opened this issue Oct 24, 2023 · 3 comments

Comments

@Jean1995
Copy link
Collaborator

Jean1995 commented Oct 24, 2023

I've tried installing version 0.6.0 of panama, both on a Linux cluster and my local MacOS, and I get the error messages:

Traceback (most recent call last):
  File "/usr/local/bin/panama", line 5, in <module>
    from panama.cli import cli
  File "/usr/local/lib/python3.10/dist-packages/panama/__init__.py", line 19, in <module>
    __version__ = get_version()
  File "/usr/local/lib/python3.10/dist-packages/panama/__init__.py", line 14, in get_version
    with open(path) as f:
FileNotFoundError: [Errno 2] No such file or directory: '/usr/local/lib/python3.10/dist-packages/pyproject.toml'

for Linux and

Traceback (most recent call last):
  File "/opt/homebrew/bin/panama", line 5, in <module>
    from panama.cli import cli
  File "/opt/homebrew/lib/python3.11/site-packages/panama/__init__.py", line 19, in <module>
    __version__ = get_version()
                  ^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/panama/__init__.py", line 14, in get_version
    with open(path) as f:
         ^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/opt/homebrew/lib/python3.11/site-packages/pyproject.toml'

for MacOS.

@Jean1995
Copy link
Collaborator Author

My current "workaround" is to just comment out the line https://github.com/The-Ludwig/PANAMA/blob/main/panama/__init__.py#L19

@Jean1995
Copy link
Collaborator Author

Jean1995 commented Oct 24, 2023

In addition, version 0.6.0 requires the "toml" package, which doesn't seem to be installed automatically when installing panama.

I believe it should not be in tool.poetry.group.dev.dependencies but also in tool.poetry.dependencies since toml is imported in __init__.py?

@The-Ludwig
Copy link
Owner

#75 Fixes this. It was stupid in the first place and there is no nice way in poetry to support dynamic versioning. One more reason to ditch poetry and use pdm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants