So, we have a sort of functional codebase, but we ...
# general
a
So, we have a sort of functional codebase, but we want to move to lockfiles (or, rather, we have to), but even after fixing all the conflicting deps, we end up with failures because random deps fail whatever command pex runs, but it installs just fine. Is there any workaround for this?
This is the error I got:
Copy code
Could not gather lock metadata for 3 projects with source artifacts:
1. /tmp/pants-sandbox-o8A9Bs/.tmp/tmphptw1nom/home.cris.birzan..pyenv.versions.3.10.9.envs.crpython310.bin.python3.10/fse-1.0.0.tar.gz: Executing /home/cris.birzan/.cache/pants/named_caches/pex_root/venvs/aea67ebeb0155c7b43fefa35d59b855c2e06cc79/abd4a6124f409cfec33d10030d1b7b266ff3990a/bin/python -sE /home/cris.birzan/.cache/pants/named_caches/pex_root/venvs/aea67ebeb0155c7b43fefa35d59b855c2e06cc79/abd4a6124f409cfec33d10030d1b7b266ff3990a/pex -c import json
import sys

import setuptools.build_meta


if not hasattr(setuptools.build_meta.__legacy__, 'prepare_metadata_for_build_wheel'):
    sys.exit(75)

result = setuptools.build_meta.__legacy__.prepare_metadata_for_build_wheel(*('/tmp/pants-sandbox-o8A9Bs/.tmp/tmpg2laein_/build',), **{})
with open('/tmp/pants-sandbox-o8A9Bs/.tmp/tmpd0kfdyf0', "w") as fp:
    json.dump(result, fp)
 failed with 1
2. /tmp/pants-sandbox-o8A9Bs/.tmp/tmphptw1nom/home.cris.birzan..pyenv.versions.3.10.9.envs.crpython310.bin.python3.10/mplcursors-0.5.1.tar.gz: Executing /home/cris.birzan/.cache/pants/named_caches/pex_root/venvs/aea67ebeb0155c7b43fefa35d59b855c2e06cc79/abd4a6124f409cfec33d10030d1b7b266ff3990a/bin/python -sE /home/cris.birzan/.cache/pants/named_caches/pex_root/venvs/aea67ebeb0155c7b43fefa35d59b855c2e06cc79/abd4a6124f409cfec33d10030d1b7b266ff3990a/pex -c import json
import sys

import setuptools.build_meta


if not hasattr(setuptools.build_meta.__legacy__, 'get_requires_for_build_wheel'):
    sys.exit(75)

result = setuptools.build_meta.__legacy__.get_requires_for_build_wheel(*(), **{})
with open('/tmp/pants-sandbox-o8A9Bs/.tmp/tmpseuxayg8', "w") as fp:
    json.dump(result, fp)
 failed with 1
3. /tmp/pants-sandbox-o8A9Bs/.tmp/tmphptw1nom/home.cris.birzan..pyenv.versions.3.10.9.envs.crpython310.bin.python3.10/fastparquet-0.4.1.tar.gz: Executing /home/cris.birzan/.cache/pants/named_caches/pex_root/venvs/aea67ebeb0155c7b43fefa35d59b855c2e06cc79/abd4a6124f409cfec33d10030d1b7b266ff3990a/bin/python -sE /home/cris.birzan/.cache/pants/named_caches/pex_root/venvs/aea67ebeb0155c7b43fefa35d59b855c2e06cc79/abd4a6124f409cfec33d10030d1b7b266ff3990a/pex -c import json
import sys

import setuptools.build_meta


if not hasattr(setuptools.build_meta.__legacy__, 'prepare_metadata_for_build_wheel'):
    sys.exit(75)

result = setuptools.build_meta.__legacy__.prepare_metadata_for_build_wheel(*('/tmp/pants-sandbox-o8A9Bs/.tmp/tmp0v5e6u2p/build',), **{})
with open('/tmp/pants-sandbox-o8A9Bs/.tmp/tmphu5317ke', "w") as fp:
    json.dump(result, fp)
 failed with 1
And, unfortunately, firing all the data scientists in our company is not an answer. 😞
h
Hmm, that is referencing optional hooks that may indeed not be present.
They require the
wheel
dist to be installed
alongside setuptools
Do you have a custom tool lockfile for setuptools?
a
We should have
wheel
installed, and, hm, no lockfile for setuptools.
h
Hrmph...
Are you able to create a toy repo that reproduces this?
That plus a bug report would be helpful
a
I'll try later tonight. I have another thing that seems broken, might try to get both issues.
h
Sounds good, thanks
a
Okay, so, as suspected. Data science packages. 😢 All these that fail seem to use this 'hack' https://stackoverflow.com/a/21621689 This seems to break, because, well, it's an abomination. I'm not sure what pants can do about this 😞
Okay, I lie, one fails in another way. I don't even want to know what's happening there, but they're using
inspect.getsource(func)
, which seems to not exist in this case, because the code is ran with
exec
Oh, actually, let me try the odd one out, the one with metadata issues.
https://github.com/gcbirzan-plutoflume/pants-test - so,
ants generate-lockfiles
here says:
Copy code
No distribution metadata found for soundex==1.1.3.
Given distribution metadata for:
silpa-common==0
soundex==0
I tried to look at the metadata for soundex, it looks okay, but I'm definitely no expert