eager-dress-66405
01/27/2022, 9:46 PMcelery[sqs]
eager-dress-66405
01/27/2022, 9:48 PMEngine traceback:
in select
in pants.core.goals.test.run_tests
in pants.backend.python.goals.pytest_runner.run_python_test (src/util/tests/test_s3.py)
in pants.backend.python.goals.pytest_runner.setup_pytest_for_target
in pants.backend.python.util_rules.pex.create_pex
in pants.backend.python.util_rules.pex.build_pex (requirements.pex)
in pants.engine.process.fallible_to_exec_result_or_raise
Traceback (most recent call last):
File "/home/mpcusack/.cache/pants/setup/bootstrap-Linux-x86_64/2.9.0+git57344e8f_py39/lib/python3.9/site-packages/pants/engine/process.py", line 282, in fallible_to_exec_result_or_raise
raise ProcessExecutionFailure(
pants.engine.process.ProcessExecutionFailure: Process 'Building requirements.pex with 15 requirements: boto3, botocore, celery[sqs], decorator, django, honeycomb-beeline, memoize@, moto[ec2,s3,sqs,ssm]==2.3.1, pytest, pytz, redis, requests, text-unidecode' failed with exit code 1.
stdout:
stderr:
WARNING: Discarding <https://files.pythonhosted.org/packages/ef/05/4b773f74f830a90a326b06f9b24e65506302ab049e825a3c0b60b1a6e26a/pycurl-7.43.0.5.tar.gz#sha256=ec7dd291545842295b7b56c12c90ffad2976cc7070c98d7b1517b7b6cd5994b3> (from <https://pypi.org/simple/pycurl/>). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
ERROR: Could not find a version that satisfies the requirement pycurl==7.43.0.5; extra == "sqs" (from celery[sqs])
ERROR: No matching distribution found for pycurl==7.43.0.5; extra == "sqs"
pid 2170396 -> /home/mpcusack/.cache/pants/named_caches/pex_root/venvs/e9a17d974385339dffaabf39686f310560143805/3d1364f53acc96cacfc8b68eb497c10e7797cb4f/pex --disable-pip-version-check --no-python-version-warning --exists-action a --isolated -q --cache-dir /home/mpcusack/.cache/pants/named_caches/pex_root --log /tmp/process-executionkxBOiT/.tmp/tmp96az5yn4/pip.log download --dest /tmp/process-executionkxBOiT/.tmp/tmp7cg_pj88/home.mpcusack..pyenv.versions.3.8.12.bin.python3.8 --constraint constraints.lock boto3 botocore celery[sqs] decorator django honeycomb-beeline moto[ec2,s3,sqs,ssm]==2.3.1 pytest pytz redis requests text-unidecode --index-url <https://pypi.org/simple/> --find-links <https://binaries.pantsbuild.org/wheels/pantsbuild.pants/57344e8f8315b47b47d27f9ef36e61d42caabb3f/2.9.0%2Bgit57344e8f/index.html> --retries 5 --timeout 15 exited with 1 and STDERR:
None
eager-dress-66405
01/27/2022, 9:48 PMhigh-yak-85899
01/27/2022, 9:49 PMhundreds-father-404
01/27/2022, 9:49 PM[python]
(formerly [python-setup]
) section of your pants.toml
? I'm curious how you're using things like constraints fileshigh-yak-85899
01/27/2022, 9:49 PMeager-dress-66405
01/27/2022, 9:50 PMmpcusack@mpcp15:~/dev/color$ grep celery build/python-packages/external-requirements.txt
celery[sqs]
mpcusack@mpcp15:~/dev/color$ grep pycurl build/python-packages/external-requirements.txt mpcusack@mpcp15:~/dev/color$ grep celery constraints.lock
celery==4.4.7
mpcusack@mpcp15:~/dev/color$ grep pycurl constraints.lock
pycurl==7.43.0.5
eager-dress-66405
01/27/2022, 9:52 PMsqs
extra is on the celery
package, but its somehow propagating down to the pycurl
dependencyeager-dress-66405
01/27/2022, 9:52 PM[python]
interpreter_constraints = [
"CPython==3.8.12",
]
requirement_constraints = "constraints.lock"
resolve_all_constraints = false
hundreds-father-404
01/27/2022, 9:59 PMcelery[sqs]
, that adds a dep on `kombu[sqs]`: https://github.com/celery/celery/blob/master/requirements/extras/sqs.txt (also see the setup.py
file in that repo to see how I figured that out)
Then kombu[sqs]
explains the pycurl dep: https://github.com/celery/kombu/blob/master/requirements/extras/sqs.txt
But yeah, your'e right that I don't get why pycurl
has an sqs
extra...hundreds-father-404
01/27/2022, 10:00 PM[pex].verbosity
, such as setting it to 3: https://www.pantsbuild.org/docs/reference-pex#section-verbosity
Another debugging tip is to try installing this with PEX directly, remove Pants from the equation. You can use -ldebug
to get the original command Pants is running, then run it directly w/ PEXeager-dress-66405
01/27/2022, 10:01 PMeager-dress-66405
01/27/2022, 10:06 PM$ PANTS_PEX_VERBOSITY=9 ./pants -ldebug test src/util/tests/test_s3.py
eager-dress-66405
01/27/2022, 10:07 PMTraceback (most recent call last):
File "/tmp/process-executionda9GA5/.tmp/pip-download-qox5siqt/pycurl_0d3c56d3a0fe4d10b96b0750a85be177/setup.py", line 233, in configure_unix
p = subprocess.Popen((self.curl_config(), '--version'),
File "/home/mpcusack/.pyenv/versions/3.8.12/lib/python3.8/subprocess.py", line 858, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "/home/mpcusack/.pyenv/versions/3.8.12/lib/python3.8/subprocess.py", line 1704, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'curl-config'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/process-executionda9GA5/.tmp/pip-download-qox5siqt/pycurl_0d3c56d3a0fe4d10b96b0750a85be177/setup.py", line 961, in <module>
ext = get_extension(sys.argv, split_extension_source=split_extension_source)
File "/tmp/process-executionda9GA5/.tmp/pip-download-qox5siqt/pycurl_0d3c56d3a0fe4d10b96b0750a85be177/setup.py", line 623, in get_extension
ext_config = ExtensionConfiguration(argv)
File "/tmp/process-executionda9GA5/.tmp/pip-download-qox5siqt/pycurl_0d3c56d3a0fe4d10b96b0750a85be177/setup.py", line 101, in __init__
self.configure()
File "/tmp/process-executionda9GA5/.tmp/pip-download-qox5siqt/pycurl_0d3c56d3a0fe4d10b96b0750a85be177/setup.py", line 238, in configure_unix
raise ConfigurationError(msg)
__main__.ConfigurationError: Could not run curl-config: [Errno 2] No such file or directory: 'curl-config'
eager-dress-66405
01/27/2022, 10:07 PM[sqs]
is not being applied to pycurlhundreds-father-404
01/27/2022, 10:08 PMeager-dress-66405
01/27/2022, 10:08 PMsudo apt install libcurl4-openssl-dev
eager-dress-66405
01/27/2022, 10:09 PMeager-dress-66405
01/27/2022, 10:09 PM