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
__version__ returns 0.0. Version number is on a separate file #34
Comments
Ok, this is a mistake from my part. The In the meantime you can use the following more faithful and verbose solution: try:
from importlib import metadata
except ImportError:
import importlib_metadata as metadata # python<=3.7
metadata.version("dcor") |
This is great. Thank you so much for the quick reply. |
No, please leave it open. I will try to fix |
Sure, got it. |
This is supposed to be solved in 0.5.5. If you can, please check that you have no problems with that version. |
As I mentioned, the problem is supposed to be solved, so I close this issue. Please reopen if the problem persists. |
Hello. Thank you for this very useful package. I need to query the version installed and check that it is >=0.5.3.
In dcor/init.py
try:
with open(_os.path.join(_os.path.dirname(file),
'..', 'VERSION'), 'r') as version_file:
version = version_file.read().strip()
except IOError as e:
if e.errno != _errno.ENOENT:
raise
You are reading the version from the VERSION file and at the end anyway forcing the version number to be 0.0. This is always returning 0.0 when i do
import dcor
print(dcor.version)
The text was updated successfully, but these errors were encountered: