We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
probably something like: __version__ = importlib.metadata.version('pipreqs')
__version__ = importlib.metadata.version('pipreqs')
refs: https://docs.python.org/3/library/importlib.html python-poetry/poetry#273
The text was updated successfully, but these errors were encountered:
actually, this might be better:
import importlib.metadata import tomllib try: with open("pyproject.toml", "rb") as f: pyproject = tomllib.load(f) __version__ = pyproject["tool"]["poetry"]["version"] except Exception as e: __version__ = importlib.metadata.version('pipreqs')
(tomlib is new from version 3.11)
Sorry, something went wrong.
this may be useful in #411
No branches or pull requests
probably something like:
__version__ = importlib.metadata.version('pipreqs')
refs:
https://docs.python.org/3/library/importlib.html
python-poetry/poetry#273
The text was updated successfully, but these errors were encountered: