Description
I have a GitHub project that installs pygit2 (version 1.13.3) in a workflow action. It was working perfectly fine on macOS 14 (latest) until recently when I started getting the 'git2.h' file not found
error. I've seen that this error is common for cases where the wheel needs to be built and libgit2 is not installed, but I'm not sure that's the case here since it was working fine earlier.
It's entirely possible that this is not a pygit2 issue, but rather an issue with the GitHub hosted macOS runner image. I noticed the image updated to macOS 14.7.1 and to Python 3.13, though I'm testing in multiple python environments (3.9-3.13).
Here are the details about the runner before the error occurred:
Current runner version: '2.319.1'
Operating System
macOS
14.6.1
23G93
Runner Image
Image: macos-14-arm64
Version: 20240918.8
Included Software: https://github.com/actions/runner-images/blob/macos-14-arm64/20240918.8/images/macos/macos-14-arm64-Readme.md
Image Release: https://github.com/actions/runner-images/releases/tag/macos-14-arm64%2F20240918.8'
and after:
Current runner version: '2.320.0'
Operating System
macOS
14.7.1
23H222
Runner Image
Image: macos-14-arm64
Version: 20241108.442
Included Software: https://github.com/actions/runner-images/blob/macos-14-arm64/20241108.442/images/macos/macos-14-arm64-Readme.md
Image Release: https://github.com/actions/runner-images/releases/tag/macos-14-arm64%2F20241108.442
My understanding is that if a wheel is available on PyPi, pip shouldn't need libgit2 to be installed in order to install pygit2. Is that correct? And by now, wheels for 1.13.3 should have been around for almost a year?
I appreciate any ideas on how to understand and resolve this issue.
Here is the failed build output:
ChefBuildError
Backend subprocess exited when trying to invoke build_wheel
running bdist_wheel
running build
running build_py
creating build/lib.macosx-14.0-arm64-cpython-313/pygit2
copying pygit2/enums.py -> build/lib.macosx-14.0-arm64-cpython-313/pygit2
copying pygit2/config.py -> build/lib.macosx-14.0-arm64-cpython-313/pygit2
copying pygit2/index.py -> build/lib.macosx-14.0-arm64-cpython-313/pygit2
copying pygit2/packbuilder.py -> build/lib.macosx-14.0-arm64-cpython-313/pygit2
copying pygit2/credentials.py -> build/lib.macosx-14.0-arm64-cpython-313/pygit2
copying pygit2/remote.py -> build/lib.macosx-14.0-arm64-cpython-313/pygit2
copying pygit2/__init__.py -> build/lib.macosx-14.0-arm64-cpython-313/pygit2
copying pygit2/_build.py -> build/lib.macosx-14.0-arm64-cpython-313/pygit2
copying pygit2/refspec.py -> build/lib.macosx-14.0-arm64-cpython-313/pygit2
copying pygit2/submodule.py -> build/lib.macosx-14.0-arm64-cpython-313/pygit2
copying pygit2/utils.py -> build/lib.macosx-14.0-arm64-cpython-313/pygit2
copying pygit2/blame.py -> build/lib.macosx-14.0-arm64-cpython-313/pygit2
copying pygit2/callbacks.py -> build/lib.macosx-14.0-arm64-cpython-313/pygit2
copying pygit2/settings.py -> build/lib.macosx-14.0-arm64-cpython-313/pygit2
copying pygit2/filter.py -> build/lib.macosx-14.0-arm64-cpython-313/pygit2
copying pygit2/errors.py -> build/lib.macosx-14.0-arm64-cpython-313/pygit2
copying pygit2/_run.py -> build/lib.macosx-14.0-arm64-cpython-313/pygit2
copying pygit2/repository.py -> build/lib.macosx-14.0-arm64-cpython-313/pygit2
copying pygit2/ffi.py -> build/lib.macosx-14.0-arm64-cpython-313/pygit2
copying pygit2/blob.py -> build/lib.macosx-14.0-arm64-cpython-313/pygit2
copying pygit2/_pygit2.pyi -> build/lib.macosx-14.0-arm64-cpython-313/pygit2
creating build/lib.macosx-14.0-arm64-cpython-313/pygit2/decl
copying pygit2/decl/oid.h -> build/lib.macosx-14.0-arm64-cpython-313/pygit2/decl
copying pygit2/decl/index.h -> build/lib.macosx-14.0-arm64-cpython-313/pygit2/decl
copying pygit2/decl/attr.h -> build/lib.macosx-14.0-arm64-cpython-313/pygit2/decl
copying pygit2/decl/blame.h -> build/lib.macosx-14.0-arm64-cpython-313/pygit2/decl
copying pygit2/decl/pack.h -> build/lib.macosx-14.0-arm64-cpython-313/pygit2/decl
copying pygit2/decl/revert.h -> build/lib.macosx-14.0-arm64-cpython-313/pygit2/decl
copying pygit2/decl/net.h -> build/lib.macosx-14.0-arm64-cpython-313/pygit2/decl
copying pygit2/decl/config.h -> build/lib.macosx-14.0-arm64-cpython-313/pygit2/decl
copying pygit2/decl/types.h -> build/lib.macosx-14.0-arm64-cpython-313/pygit2/decl
copying pygit2/decl/repository.h -> build/lib.macosx-14.0-arm64-cpython-313/pygit2/decl
copying pygit2/decl/clone.h -> build/lib.macosx-14.0-arm64-cpython-313/pygit2/decl
copying pygit2/decl/callbacks.h -> build/lib.macosx-14.0-arm64-cpython-313/pygit2/decl
copying pygit2/decl/submodule.h -> build/lib.macosx-14.0-arm64-cpython-313/pygit2/decl
copying pygit2/decl/errors.h -> build/lib.macosx-14.0-arm64-cpython-313/pygit2/decl
copying pygit2/decl/merge.h -> build/lib.macosx-14.0-arm64-cpython-313/pygit2/decl
copying pygit2/decl/graph.h -> build/lib.macosx-14.0-arm64-cpython-313/pygit2/decl
copying pygit2/decl/describe.h -> build/lib.macosx-14.0-arm64-cpython-313/pygit2/decl
copying pygit2/decl/stash.h -> build/lib.macosx-14.0-arm64-cpython-313/pygit2/decl
copying pygit2/decl/remote.h -> build/lib.macosx-14.0-arm64-cpython-313/pygit2/decl
copying pygit2/decl/strarray.h -> build/lib.macosx-14.0-arm64-cpython-313/pygit2/decl
copying pygit2/decl/buffer.h -> build/lib.macosx-14.0-arm64-cpython-313/pygit2/decl
copying pygit2/decl/diff.h -> build/lib.macosx-14.0-arm64-cpython-313/pygit2/decl
copying pygit2/decl/common.h -> build/lib.macosx-14.0-arm64-cpython-313/pygit2/decl
copying pygit2/decl/proxy.h -> build/lib.macosx-14.0-arm64-cpython-313/pygit2/decl
copying pygit2/decl/indexer.h -> build/lib.macosx-14.0-arm64-cpython-313/pygit2/decl
copying pygit2/decl/refspec.h -> build/lib.macosx-14.0-arm64-cpython-313/pygit2/decl
copying pygit2/decl/transport.h -> build/lib.macosx-14.0-arm64-cpython-313/pygit2/decl
copying pygit2/decl/checkout.h -> build/lib.macosx-14.0-arm64-cpython-313/pygit2/decl
copying pygit2/decl/commit.h -> build/lib.macosx-14.0-arm64-cpython-313/pygit2/decl
running build_ext
generating cffi module 'build/temp.macosx-14.0-arm64-cpython-313/pygit2._libgit2.c'
creating build/temp.macosx-14.0-arm64-cpython-313
building 'pygit2._pygit2' extension
creating build/temp.macosx-14.0-arm64-cpython-313/src
clang -fno-strict-overflow -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -O3 -Wall -I/usr/local/include -I/private/var/folders/1y/56hdyx6x0_jb18k7b4ys9b6w0000gn/T/tmp7lid99ra/.venv/include -I/opt/homebrew/opt/[email protected]/Frameworks/Python.framework/Versions/3.13/include/python3.13 -c src/blob.c -o build/temp.macosx-14.0-arm64-cpython-313/src/blob.o
src/blob.c:30:10: fatal error: 'git2.h' file not found
#include <git2.h>
^~~~~~~~
1 error generated.
error: command '/usr/bin/clang' failed with exit code 1
Activity