magnificent-toothbrush-17254
02/17/2023, 1:19 AMinterpreter_constraints=[">=2.7"],
in my python_distribution
target. running pants package results in this error:
ProcessExecutionFailure: Process 'Run setuptools.build_meta:__legacy__ for 'scm:scm' failed with exit code 1.
stdout:
stderr:
Traceback (most recent call last):
File "/private/var/folders/tx/j170snrj51x7vsqlr6gjgknm0000gn/T/pants-sandbox-n0BU4K/chroot/../.cache/pex_root/venvs/1286fe9e47a1c2e7c2f0b8f40834df0d199c016c/bbf665a577dacddf63ce4c741b47906e31dbdb6c/pex", line 230, in <module>
exec ast in globals_map, locals_map
File "backend_shim.py", line 21, in <module>
os.makedirs(dist_dir, exist_ok=True)
TypeError: makedirs() got an unexpected keyword argument 'exist_ok'
Probably because 2.7 doesn't have the exist_ok
arg. Couldn't find anything online about how to get this to work, anyone have any ideas what i'm doing wrong? This is a 2 and 3 compatible package, builds fine if i change it to >=3.7
thousands-plumber-33255
02/17/2023, 10:53 AM[python-infer]
string_imports_min_dots = 0
big-agency-50572
02/17/2023, 11:39 AM./pants package ::
I'm receiving the following Python exception:
13:37:08.36 [INFO] Completed: Building dockerfile_parser.pex from dockerfile-parser_default.lock
13:37:08.36 [ERROR] 1 Exception encountered:
ProcessExecutionFailure: Process 'Building dockerfile_parser.pex from dockerfile-parser_default.lock' failed with exit code 1.
stdout:
stderr:
Traceback (most recent call last):
File "/usr/local/lib/python3.8/runpy.py", line 193, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/local/lib/python3.8/runpy.py", line 86, in _run_code
exec(code, run_globals)
ProcessExecutionFailure: Process 'Building dockerfile_parser.pex from dockerfile-parser_default.lock' failed with exit code 1.
...
ModuleNotFoundError: No module named '_sqlite3'
Pants bootstrapped with Python 3.9, but the the above traceback shows that Pants is using Python 3.8 when I run it. This normally wouldn't be a problem, but my system default (3.8) doesn't include sqlite3.
Any idea how to get around this and force Pants to use 3.9, which does include sqlite3?lemon-oxygen-72498
02/17/2023, 1:09 PMhappy-family-315
02/17/2023, 1:21 PM#3 [internal] load metadata for <http://docker.io/library/python:3.8-buster|docker.io/library/python:3.8-buster>
#3 sha256:88586e40fdfcc6826fc75a7a9653c2727184be908b30c80bf7580390d6713f00
#3 ERROR: rpc error: code = Unknown desc = error getting credentials - err: exec: "docker-credential-dev-containers-e0fbf732d956a2c0412935aab1cc18ff0f3b4638": executable file not found in $PATH, out: ``
It fails here: FROM python:3-8-buster
I don't understand why this happens because using docker build
works fine. (I am running this inside a devcontainer)wonderful-boots-93625
02/17/2023, 6:23 PM3rdparty/requirements.txt
contain req1
that say depends on PyJWT>1
and req2
depends on PyJWT<1
will pants error out during the lock generation?brave-hair-402
02/17/2023, 6:44 PMhigh-yak-85899
02/17/2023, 10:33 PMdependencies=["//my/dir/**/*_my_file.py"]
, but I keep getting hit with various forms of DifferingFamiliesError
. I'd like to avoid having to put one python_sources
really high up that globs like sources=["//my/dir/**/*_my_file.py"]
if possible.high-yak-85899
02/18/2023, 12:03 AMfuture-crowd-69462
02/18/2023, 3:58 PMhappy-kitchen-89482
02/18/2023, 4:05 PM--print-stacktrace
)silly-queen-7197
02/18/2023, 10:03 PMgrpcio
on M1 with pants. I had to add
[subprocess-environment]
env_vars = [
'GRPC_PYTHON_BUILD_SYSTEM_OPENSSL=TRUE',
'GRPC_PYTHON_BUILD_SYSTEM_ZLIB=1',
'GRPC_BUILD_WITH_BORING_SSL_ASM=',
]
to my pants.toml
silly-queen-7197
02/18/2023, 10:07 PMhappy-kitchen-89482
02/18/2023, 10:26 PMnarrow-translator-45898
02/19/2023, 4:17 AMrhythmic-morning-87313
02/19/2023, 4:38 AMtypes-six
whenever switching branches or in CI like GitHub Actions? This seems to be resolved if I run the same operation twice, but becoming annoying as CI also suffers from the same issue. (I'm using Pants 2.16.0dev5) Maybe some pex
issue?future-crowd-69462
02/19/2023, 10:50 AMenv_vars = [
"SSH_AUTH_SOCK",
"GRPC_PYTHON_BUILD_SYSTEM_OPENSSL=1",
"GRPC_PYTHON_BUILD_SYSTEM_ZLIB=1",
"GRPC_BUILD_WITH_BORING_SSL_ASM=1",
]
happy-kitchen-89482
02/19/2023, 2:44 PMpip
?happy-kitchen-89482
02/19/2023, 2:47 PMhappy-kitchen-89482
02/19/2023, 2:49 PMfuture-crowd-69462
02/19/2023, 3:05 PMfuture-crowd-69462
02/19/2023, 3:07 PMhappy-kitchen-89482
02/19/2023, 3:27 PMhappy-kitchen-89482
02/19/2023, 3:27 PMhappy-kitchen-89482
02/19/2023, 3:53 PM--keep-sandboxes=on_failure
then Pants will log the location of the sandbox that failed, and you can cd into it and play aroundhappy-kitchen-89482
02/19/2023, 3:53 PM__run.sh
in the sandbox that will rerun the processhappy-kitchen-89482
02/19/2023, 3:53 PM./__run.sh
until things workhappy-kitchen-89482
02/19/2023, 3:54 PM./__run.sh
manually will have access to your entire environmenthappy-kitchen-89482
02/19/2023, 3:54 PMhappy-kitchen-89482
02/19/2023, 3:54 PM