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

Release artifact tarballs are missing qcengine/_version.py replacement #337

Closed
mbanck opened this issue Jan 1, 2022 · 3 comments · Fixed by #338
Closed

Release artifact tarballs are missing qcengine/_version.py replacement #337

mbanck opened this issue Jan 1, 2022 · 3 comments · Fixed by #338

Comments

@mbanck
Copy link

mbanck commented Jan 1, 2022

Describe the bug
Psi4's FindPythonModule cmake module fails to find qcengine because it can't figure out the version:

Setting up python3-qcengine (0.21.0-1) ...
[...]
-- Suitable qcengine could not be located, Building qcengine instead.

The Cache has:

psi4-1.5# grep -i qcengine builddir/CMakeCache.txt 
//Location of Python module qcengine
PY_qcengine:STRING=/usr/lib/python3/dist-packages/qcengine
//Version of Python module qcengine
qcengine_VERSION:STRING=0+unknown

Same if I run qcengine info:

psi4-1.5# qcengine info | grep QCEngine
QCEngine:    0+unknown

This seems to be because the tarball if downloaded from Github still has (contrary to the QCElemental tarball, but I couldn't figure out why) the placeholders:

$ grep git_ QCEngine-0.21.0/qcengine/_version.py | head -4
    git_refnames = "$Format:%d$"
    git_full = "$Format:%H$"
    git_date = "$Format:%ci$"
    keywords = {"refnames": git_refnames, "full": git_full, "date": git_date}

I also checked (randomly) the 0.13.0 tarball, and it's the same there.

QCElemental's tarball e.g. has:

$ grep git_ QCElemental-0.24.0/qcelemental/_version.py | head -4
    git_refnames = " (HEAD -> master, tag: v0.24.0)"
    git_full = "cabec4a7d1095b656320f2c842f0e132149e4bd1"
    git_date = "2021-11-18 14:41:00 -0500"
    keywords = {"refnames": git_refnames, "full": git_full, "date": git_date}

To Reproduce

wget -O - https://github.com/MolSSI/QCEngine/archive/refs/tags/v0.21.0.tar.gz 2> /dev/null | zcat | tar xO | grep git_ | head -5
__git_revision__ = get_information("git_revision")
    git_refnames = "$Format:%d$"
    git_full = "$Format:%H$"
    git_date = "$Format:%ci$"
    keywords = {"refnames": git_refnames, "full": git_full, "date": git_date}

Expected behavior

Same as QCElemental

@loriab
Copy link
Collaborator

loriab commented Jan 3, 2022

Thanks for the report. I see some differences here https://github.com/MolSSI/QCElemental/blob/ff52f1460cdcd49f2255e507e5f389a4ffb247e5/setup.cfg#L35-L36 that I'll investigate Tuesday.

@loriab
Copy link
Collaborator

loriab commented Jan 4, 2022

ok, it was missing qcengine/_version.py export-subst in .gitattributes that git-archive must act on to create the tarball. would a patch release with this be helpful?

@mbanck
Copy link
Author

mbanck commented Jan 4, 2022

I very crudely patched in the commit ref in the Debian package[0], so personally I'm fine, but I think this might be worth making a release for, thanks for tracking it down and fixing it!

[0] https://salsa.debian.org/debichem-team/qcengine/-/blob/master/debian/patches/fix_version.py

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

Successfully merging a pull request may close this issue.

2 participants