quaint-telephone-89068
02/17/2023, 1:46 AMpants package with python_distribution target that has interpreter_constraints that include >=2.7, the build fails with this error:
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'
Because the generated backend_shim.py file includes exist_ok when calling makedirs, which is not an available keyword argument in python 2.
Slack thread
pantsbuild/pantsuser
02/18/2023, 2:48 PM