From f85d011b4ccabd25cbc984767ce26e6be6dec11c Mon Sep 17 00:00:00 2001 From: Sangjoon Bob Lee Date: Wed, 23 Oct 2024 06:23:44 -0400 Subject: [PATCH] Use existing version.py file --- src/diffpy/pdfgui/version.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/diffpy/pdfgui/version.py b/src/diffpy/pdfgui/version.py index 14677aa7..b1181880 100644 --- a/src/diffpy/pdfgui/version.py +++ b/src/diffpy/pdfgui/version.py @@ -18,9 +18,10 @@ # We do not use the other three variables, but can be added back if needed. # __all__ = ["__date__", "__git_commit__", "__timestamp__", "__version__"] -# obtain version information -from importlib.metadata import version +import os +import time +from importlib.metadata import distribution, version +# obtain version information +__date__ = time.ctime(os.path.getctime(distribution("diffpy.pdfgui")._path)) __version__ = version("diffpy.pdfgui") - -# End of file