busy-ram-14533
08/14/2025, 7:12 PMscipy-stubs (1.16.1.0)
└── optype[numpy]<0.14,>=0.13.1
└── numpy-typing-compat>=1.25.20250730
When I run mypy via pants check <target> , I always hit this issue
[INFO] Completed: Scheduling: Building requirements_venv.pex
[ERROR] 1 Exception encountered:
Engine traceback:
in `check` goal
ProcessExecutionFailure: Process 'Building requirements_venv.pex' failed with exit code 1.
stdout:
stderr:
[Errno 13] Permission denied: '/Users/gregory.fast/.cache/pants/named_caches/pex_root/installed_wheels/0/9ab0cd4bb1b4c31debf0bd745554c735a07a7bb3cc3801dc934b2b5856549612/numpy_typing_compat-2.3.20250730-py3-none-any.whl.lck.work/numpy_typing_compat-2.3.20250730.dist-info/licenses/LICENSE'
The downloaded wheel itself seems to have normal permissions (is readable)
-rw-r--r-- 1 gregory.fast staff 6057 Aug 14 14:20 /Users/gregory.fast/.cache/pants/named_caches/pex_root/downloads/1/9ab0cd4bb1b4c31debf0bd745554c735a07a7bb3cc3801dc934b2b5856549612/numpy_typing_compat-2.3.20250730-py3-none-any.whl
so I inspected the wheels files and they seem normal too
% ls -lR /tmp/numpy_typing_compat_extracted
/tmp/numpy_typing_compat_extracted:
total 0
drwxr-xr-x 4 gregory.fast wheel 128 Aug 14 14:11 numpy_typing_compat
drwxr-xr-x 6 gregory.fast wheel 192 Aug 14 14:11 numpy_typing_compat-2.3.20250730.dist-info
/tmp/numpy_typing_compat_extracted/numpy_typing_compat:
total 4
-rw-r--r-- 1 gregory.fast wheel 2382 Aug 14 14:11 __init__.py
-rw-r--r-- 1 gregory.fast wheel 0 Aug 14 14:11 py.typed
/tmp/numpy_typing_compat_extracted/numpy_typing_compat-2.3.20250730.dist-info:
total 16
drwxr-xr-x 3 gregory.fast wheel 96 Aug 14 14:11 licenses
-rw-r--r-- 1 gregory.fast wheel 7076 Aug 14 14:11 METADATA
-rw-r--r-- 1 gregory.fast wheel 654 Aug 14 14:11 RECORD
-rw-r--r-- 1 gregory.fast wheel 78 Aug 14 14:11 WHEEL
/tmp/numpy_typing_compat_extracted/numpy_typing_compat-2.3.20250730.dist-info/licenses:
total 4
-rw-r--r-- 1 gregory.fast wheel 1495 Aug 14 14:11 LICENSE
I want to at least open an issue with the package owner or on pantsbuild (if it's pants related), but I'm stuck unable to identify the root cause. any tips? 🙏
Also, is there any way to exclude an optional package from a lockfile?busy-ram-14533
08/14/2025, 7:15 PMbusy-ram-14533
08/14/2025, 7:20 PMpex -o numpy_typing_compat.pex numpy_typing_compat==2.1.20250730
[Errno 13] Permission denied: '/Users/gregory.fast/Library/Caches/pex/installed_wheels/0/1893fcb94dd67ce6f5110caebcfce36e937371ee5c6050dab9713bfe73d47b87/numpy_typing_compat-2.1.20250730-py3-none-any.whl.1e9aa1460a6a46d58f401303f4a1d9ea.work/numpy_typing_compat-2.1.20250730.dist-info/licenses/LICENSE'busy-ram-14533
08/14/2025, 7:27 PMpex problem or numpy-typing-compat problem https://github.com/jorenham/numpy-typing-compat/issues/40busy-ram-14533
08/14/2025, 7:36 PMfaststream
ll /Users/gregory.fast/Library/Caches/pex/installed_wheels/0/7d7639eafb5bc399650ae6d4baf441dfa0a40eb06965fd85e7f6d4dfe2e34ff7/numpy_typing_compat-2.2.20250730-py3-none-any.whl.1005f0179e8044a7ae384fd83ffa03b5.work/numpy_typing_compat-2.2.20250730.dist-info/licenses/LICENSE
--w--wx--- 1 gregory.fast staff 1495 Aug 14 15:33 /Users/gregory.fast/Library/Caches/pex/installed_wheels/0/7d7639eafb5bc399650ae6d4baf441dfa0a40eb06965fd85e7f6d4dfe2e34ff7/numpy_typing_compat-2.2.20250730-py3-none-any.whl.1005f0179e8044a7ae384fd83ffa03b5.work/numpy_typing_compat-2.2.20250730.dist-info/licenses/LICENSE
we see --w--wx--- on the LICENSE filebrief-scientist-13682
08/14/2025, 8:02 PM--exclude deps with pex (or --override deps), but, as far as I'm aware, Pants does not support these options.
3. It is the same issue Luke hit since - obscuredly to be sure - numpy-typing-compat uses uv_build via its build.py. But you don't need to look at the repo, just look at the wheel (download it from PyPI: https://pypi.org/project/numpy-typing-compat/2.3.20250730/#files):
:; zipinfo ~/Downloads/numpy_typing_compat-2.3.20250730-py3-none-any.whl
Archive: /home/jsirois/Downloads/numpy_typing_compat-2.3.20250730-py3-none-any.whl
Zip file size: 6057 bytes, number of entries: 9
drwxr-xr-x 2.0 unx 0 b- stor 80-Jan-01 00:00 numpy_typing_compat/
--w--wx--- 2.0 unx 2382 b- defN 80-Jan-01 00:00 numpy_typing_compat/__init__.py
--w--wx--- 2.0 unx 0 b- defN 80-Jan-01 00:00 numpy_typing_compat/py.typed
drwxr-xr-x 2.0 unx 0 b- stor 80-Jan-01 00:00 numpy_typing_compat-2.3.20250730.dist-info/licenses/
--w--wx--- 2.0 unx 1495 b- defN 80-Jan-01 00:00 numpy_typing_compat-2.3.20250730.dist-info/licenses/LICENSE
drwxr-xr-x 2.0 unx 0 b- stor 80-Jan-01 00:00 numpy_typing_compat-2.3.20250730.dist-info/
-rw-r--r-- 2.0 unx 78 b- defN 80-Jan-01 00:00 numpy_typing_compat-2.3.20250730.dist-info/WHEEL
-rw-r--r-- 2.0 unx 7076 b- defN 80-Jan-01 00:00 numpy_typing_compat-2.3.20250730.dist-info/METADATA
--w--wx--- 2.0 unx 654 b- defN 80-Jan-01 00:00 numpy_typing_compat-2.3.20250730.dist-info/RECORD
9 files, 11685 bytes uncompressed, 4589 bytes compressed: 60.7%
And it's even the 0.8.3 buggy version I mentioned in @elegant-florist-94385's thread.
:; unzip -qc ~/Downloads/numpy_typing_compat-2.3.20250730-py3-none-any.whl numpy_typing_compat-2.3.20250730.dist-info/WHEEL
Wheel-Version: 1.0
Generator: uv 0.8.3
Root-Is-Purelib: true
Tag: py3-none-anybrief-scientist-13682
08/14/2025, 8:05 PMuv_build to the world and there are apparently a decent number of projects in the wild using uv_build as their build-backend.busy-ram-14533
08/14/2025, 8:42 PMuv_build)
Thanks John, this is really helpful, and TIL how to quickly inspect .whl files
For #2, I think you can sneak in excludes on extra_build_args of the pex_binary target, but that only applies to your own pex_binary targets in BUILD files, not something like the requirements_venv.pex that pants builds for pants check.