libgit2 / pygit2

Python bindings for libgit2
https://www.pygit2.org/
Other
1.58k stars 382 forks source link

ERROR: Could not build wheels for pygit2, which is required to install pyproject.toml-based projects #1108

Closed victormaricato closed 2 years ago

victormaricato commented 2 years ago

When installing [dvc](), which has pygit2 as a dependency, I started to get an error after pygit2 update to 1.7.1.

The error is:

Building wheel for pygit2 (pyproject.toml) ... - \ error
  ERROR: Command errored out with exit status 1:
   command: /home/circleci/.pyenv/versions/3.7.12/bin/python3.7 /home/circleci/.pyenv/versions/3.7.12/lib/python3.7/site-packages/pip/_vendor/pep517/in_process/_in_process.py build_wheel /tmp/tmpgfycrkjc
       cwd: /tmp/pip-install-7zg21kft/pygit2_3edae352d82a4f45838fea2878271cea
  Complete output (65 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-x86_64-3.7
  creating build/lib.linux-x86_64-3.7/pygit2
  copying pygit2/__init__.py -> build/lib.linux-x86_64-3.7/pygit2
  copying pygit2/_build.py -> build/lib.linux-x86_64-3.7/pygit2
  copying pygit2/_run.py -> build/lib.linux-x86_64-3.7/pygit2
  copying pygit2/blame.py -> build/lib.linux-x86_64-3.7/pygit2
  copying pygit2/callbacks.py -> build/lib.linux-x86_64-3.7/pygit2
  copying pygit2/config.py -> build/lib.linux-x86_64-3.7/pygit2
  copying pygit2/credentials.py -> build/lib.linux-x86_64-3.7/pygit2
  copying pygit2/errors.py -> build/lib.linux-x86_64-3.7/pygit2
  copying pygit2/ffi.py -> build/lib.linux-x86_64-3.7/pygit2
  copying pygit2/index.py -> build/lib.linux-x86_64-3.7/pygit2
  copying pygit2/packbuilder.py -> build/lib.linux-x86_64-3.7/pygit2
  copying pygit2/refspec.py -> build/lib.linux-x86_64-3.7/pygit2
  copying pygit2/remote.py -> build/lib.linux-x86_64-3.7/pygit2
  copying pygit2/repository.py -> build/lib.linux-x86_64-3.7/pygit2
  copying pygit2/settings.py -> build/lib.linux-x86_64-3.7/pygit2
  copying pygit2/submodule.py -> build/lib.linux-x86_64-3.7/pygit2
  copying pygit2/utils.py -> build/lib.linux-x86_64-3.7/pygit2
  creating build/lib.linux-x86_64-3.7/pygit2/decl
  copying pygit2/decl/attr.h -> build/lib.linux-x86_64-3.7/pygit2/decl
  copying pygit2/decl/blame.h -> build/lib.linux-x86_64-3.7/pygit2/decl
  copying pygit2/decl/buffer.h -> build/lib.linux-x86_64-3.7/pygit2/decl
  copying pygit2/decl/callbacks.h -> build/lib.linux-x86_64-3.7/pygit2/decl
  copying pygit2/decl/checkout.h -> build/lib.linux-x86_64-3.7/pygit2/decl
  copying pygit2/decl/clone.h -> build/lib.linux-x86_64-3.7/pygit2/decl
  copying pygit2/decl/commit.h -> build/lib.linux-x86_64-3.7/pygit2/decl
  copying pygit2/decl/common.h -> build/lib.linux-x86_64-3.7/pygit2/decl
  copying pygit2/decl/config.h -> build/lib.linux-x86_64-3.7/pygit2/decl
  copying pygit2/decl/describe.h -> build/lib.linux-x86_64-3.7/pygit2/decl
  copying pygit2/decl/diff.h -> build/lib.linux-x86_64-3.7/pygit2/decl
  copying pygit2/decl/errors.h -> build/lib.linux-x86_64-3.7/pygit2/decl
  copying pygit2/decl/graph.h -> build/lib.linux-x86_64-3.7/pygit2/decl
  copying pygit2/decl/index.h -> build/lib.linux-x86_64-3.7/pygit2/decl
  copying pygit2/decl/indexer.h -> build/lib.linux-x86_64-3.7/pygit2/decl
  copying pygit2/decl/merge.h -> build/lib.linux-x86_64-3.7/pygit2/decl
  copying pygit2/decl/net.h -> build/lib.linux-x86_64-3.7/pygit2/decl
  copying pygit2/decl/oid.h -> build/lib.linux-x86_64-3.7/pygit2/decl
  copying pygit2/decl/pack.h -> build/lib.linux-x86_64-3.7/pygit2/decl
  copying pygit2/decl/proxy.h -> build/lib.linux-x86_64-3.7/pygit2/decl
  copying pygit2/decl/refspec.h -> build/lib.linux-x86_64-3.7/pygit2/decl
  copying pygit2/decl/remote.h -> build/lib.linux-x86_64-3.7/pygit2/decl
  copying pygit2/decl/repository.h -> build/lib.linux-x86_64-3.7/pygit2/decl
  copying pygit2/decl/revert.h -> build/lib.linux-x86_64-3.7/pygit2/decl
  copying pygit2/decl/stash.h -> build/lib.linux-x86_64-3.7/pygit2/decl
  copying pygit2/decl/strarray.h -> build/lib.linux-x86_64-3.7/pygit2/decl
  copying pygit2/decl/submodule.h -> build/lib.linux-x86_64-3.7/pygit2/decl
  copying pygit2/decl/transport.h -> build/lib.linux-x86_64-3.7/pygit2/decl
  copying pygit2/decl/types.h -> build/lib.linux-x86_64-3.7/pygit2/decl
  running build_ext
  generating cffi module 'build/temp.linux-x86_64-3.7/pygit2._libgit2.c'
  creating build/temp.linux-x86_64-3.7
  building 'pygit2._pygit2' extension
  creating build/temp.linux-x86_64-3.7/src
  gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/usr/local/include -I/home/circleci/.pyenv/versions/3.7.12/include/python3.7m -c src/blob.c -o build/temp.linux-x86_64-3.7/src/blob.o
  In file included from src/blob.c:30:
  src/blob.h:33:10: fatal error: git2.h: No such file or directory
     33 | #include <git2.h>
        |          ^~~~~~~~
  compilation terminated.
  error: command 'gcc' failed with exit status 1
  ----------------------------------------
  ERROR: Failed building wheel for pygit2
  Building wheel for pygtrie (setup.py) ... - done
  Created wheel for pygtrie: filename=pygtrie-2.4.2-py3-none-any.whl size=19062 sha256=e0a4df2d6d9a95091622fe466e738835cae774be36ea193306508d65dbc2d549
  Stored in directory: /home/circleci/.cache/pip/wheels/d3/f8/ba/1d828b1603ea422686eb694253a43cb3a5901ea4696c1e0603
  Building wheel for voluptuous (setup.py) ... - done
  Created wheel for voluptuous: filename=voluptuous-0.12.2-py3-none-any.whl size=29551 sha256=bc6bf61ebaa7cde4ac3bf20de03b760a8120af19ff0ad234a334784eab3ee96a
  Stored in directory: /home/circleci/.cache/pip/wheels/ce/40/e9/5aba7699054584e118b04cc18d4d8f1f15f27af4a0d65ef4b4
  Building wheel for atpublic (setup.py) ... - done
  Created wheel for atpublic: filename=atpublic-2.3-py3-none-any.whl size=5027 sha256=9d934c3f3f801fa9c41d6af8d7148292d44bceec0d3abeb4df26ccd81cc76396
  Stored in directory: /home/circleci/.cache/pip/wheels/46/d9/0f/54be2ecb4bcb1612f987f0b6482d88fa7f3e43d3946f36a32a
  Building wheel for ftfy (setup.py) ... - done
  Created wheel for ftfy: filename=ftfy-6.0.3-py3-none-any.whl size=41914 sha256=5437bdff80a33b22e00c153345c42e3d52445bb0cb1c885301c9f9dd84641b76
  Stored in directory: /home/circleci/.cache/pip/wheels/19/f5/38/273eb3b5e76dfd850619312f693716ac4518b498f5ffb6f56d
  Building wheel for future (setup.py) ... - \ | done
  Created wheel for future: filename=future-0.18.2-py3-none-any.whl size=491058 sha256=3166f49f2381c259567bdb0891b1bdb2418db42378f8a4e553441d7909f04529
  Stored in directory: /home/circleci/.cache/pip/wheels/56/b0/fe/4410d17b32f1f0c3cf54cdfb2bc04d7b4b8f4ae377e2229ba0
  Building wheel for mailchecker (setup.py) ... - done
  Created wheel for mailchecker: filename=mailchecker-4.0.16-py3-none-any.whl size=204782 sha256=38f5152d81fca27fdbd517bf1d4a6b13a79cb9a3ffefbbe7f75245636341b534
  Stored in directory: /home/circleci/.cache/pip/wheels/df/82/14/368deff28ea7daaaa163b8070d3d0701c7d4fe7138f4f6c4e9
Successfully built configobj flufl.lock nanotime pygtrie voluptuous atpublic ftfy future mailchecker
Failed to build pygit2
ERROR: Could not build wheels for pygit2, which is required to install pyproject.toml-based projects
efiop commented 2 years ago

@victormaricato The wheels are getting built right now https://pypi.org/project/pygit2/#files , it will be fixed for you automatically in a few hours most likely. There is a slight delay between pypi source release and wheels, as they take some time to build.