pygit2 1.19.3__tar.gz → 1.20.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pygit2-1.19.3 → pygit2-1.20.1}/AGENTS.md +42 -26
- {pygit2-1.19.3 → pygit2-1.20.1}/AUTHORS.md +7 -2
- {pygit2-1.19.3 → pygit2-1.20.1}/CHANGELOG.md +93 -0
- pygit2-1.20.1/Makefile +7 -0
- {pygit2-1.19.3 → pygit2-1.20.1}/PKG-INFO +1 -1
- {pygit2-1.19.3 → pygit2-1.20.1}/SPONSORS.md +2 -0
- pygit2-1.20.1/build.ps1 +51 -0
- {pygit2-1.19.3 → pygit2-1.20.1}/build.sh +45 -42
- {pygit2-1.19.3 → pygit2-1.20.1}/pygit2/__init__.py +37 -83
- {pygit2-1.19.3 → pygit2-1.20.1}/pygit2/_build.py +2 -2
- {pygit2-1.19.3 → pygit2-1.20.1}/pygit2/_libgit2/ffi.pyi +65 -2
- {pygit2-1.19.3 → pygit2-1.20.1}/pygit2/_pygit2.pyi +16 -4
- {pygit2-1.19.3 → pygit2-1.20.1}/pygit2/_run.py +2 -1
- {pygit2-1.19.3 → pygit2-1.20.1}/pygit2/blame.py +3 -3
- {pygit2-1.19.3 → pygit2-1.20.1}/pygit2/blob.py +14 -4
- {pygit2-1.19.3 → pygit2-1.20.1}/pygit2/branches.py +1 -1
- {pygit2-1.19.3 → pygit2-1.20.1}/pygit2/callbacks.py +99 -42
- {pygit2-1.19.3 → pygit2-1.20.1}/pygit2/config.py +68 -24
- {pygit2-1.19.3 → pygit2-1.20.1}/pygit2/credentials.py +1 -1
- pygit2-1.20.1/pygit2/decl/rebase.h +80 -0
- {pygit2-1.19.3 → pygit2-1.20.1}/pygit2/enums.py +31 -2
- {pygit2-1.19.3 → pygit2-1.20.1}/pygit2/errors.py +51 -9
- {pygit2-1.19.3 → pygit2-1.20.1}/pygit2/ffi.py +1 -1
- {pygit2-1.19.3 → pygit2-1.20.1}/pygit2/filter.py +4 -4
- {pygit2-1.19.3 → pygit2-1.20.1}/pygit2/index.py +14 -14
- {pygit2-1.19.3 → pygit2-1.20.1}/pygit2/options.py +19 -24
- {pygit2-1.19.3 → pygit2-1.20.1}/pygit2/packbuilder.py +3 -3
- pygit2-1.20.1/pygit2/rebase.py +249 -0
- {pygit2-1.19.3 → pygit2-1.20.1}/pygit2/references.py +1 -1
- {pygit2-1.19.3 → pygit2-1.20.1}/pygit2/refspec.py +5 -5
- {pygit2-1.19.3 → pygit2-1.20.1}/pygit2/remotes.py +38 -55
- {pygit2-1.19.3 → pygit2-1.20.1}/pygit2/repository.py +286 -59
- {pygit2-1.19.3 → pygit2-1.20.1}/pygit2/settings.py +1 -1
- {pygit2-1.19.3 → pygit2-1.20.1}/pygit2/submodules.py +18 -17
- {pygit2-1.19.3 → pygit2-1.20.1}/pygit2/transaction.py +9 -9
- {pygit2-1.19.3 → pygit2-1.20.1}/pygit2/utils.py +45 -7
- {pygit2-1.19.3 → pygit2-1.20.1}/pyproject.toml +5 -5
- {pygit2-1.19.3 → pygit2-1.20.1}/setup.py +1 -2
- {pygit2-1.19.3 → pygit2-1.20.1}/src/blob.c +10 -5
- {pygit2-1.19.3 → pygit2-1.20.1}/src/branch.c +1 -1
- {pygit2-1.19.3 → pygit2-1.20.1}/src/branch.h +1 -1
- {pygit2-1.19.3 → pygit2-1.20.1}/src/commit.c +3 -3
- {pygit2-1.19.3 → pygit2-1.20.1}/src/diff.c +74 -8
- {pygit2-1.19.3 → pygit2-1.20.1}/src/diff.h +2 -2
- {pygit2-1.19.3 → pygit2-1.20.1}/src/error.c +36 -6
- {pygit2-1.19.3 → pygit2-1.20.1}/src/error.h +1 -1
- {pygit2-1.19.3 → pygit2-1.20.1}/src/filter.c +1 -1
- {pygit2-1.19.3 → pygit2-1.20.1}/src/filter.h +1 -1
- {pygit2-1.19.3 → pygit2-1.20.1}/src/mailmap.c +1 -1
- {pygit2-1.19.3 → pygit2-1.20.1}/src/mailmap.h +1 -1
- {pygit2-1.19.3 → pygit2-1.20.1}/src/note.c +1 -1
- {pygit2-1.19.3 → pygit2-1.20.1}/src/note.h +1 -1
- {pygit2-1.19.3 → pygit2-1.20.1}/src/object.c +1 -1
- {pygit2-1.19.3 → pygit2-1.20.1}/src/object.h +1 -1
- {pygit2-1.19.3 → pygit2-1.20.1}/src/odb.c +13 -10
- {pygit2-1.19.3 → pygit2-1.20.1}/src/odb.h +1 -1
- {pygit2-1.19.3 → pygit2-1.20.1}/src/odb_backend.c +47 -18
- {pygit2-1.19.3 → pygit2-1.20.1}/src/odb_backend.h +1 -1
- {pygit2-1.19.3 → pygit2-1.20.1}/src/oid.c +1 -1
- {pygit2-1.19.3 → pygit2-1.20.1}/src/oid.h +1 -1
- {pygit2-1.19.3 → pygit2-1.20.1}/src/patch.c +8 -3
- {pygit2-1.19.3 → pygit2-1.20.1}/src/patch.h +1 -1
- {pygit2-1.19.3 → pygit2-1.20.1}/src/pygit2.c +14 -3
- {pygit2-1.19.3 → pygit2-1.20.1}/src/refdb.c +1 -1
- {pygit2-1.19.3 → pygit2-1.20.1}/src/refdb.h +1 -1
- {pygit2-1.19.3 → pygit2-1.20.1}/src/refdb_backend.c +177 -62
- {pygit2-1.19.3 → pygit2-1.20.1}/src/refdb_backend.h +1 -1
- {pygit2-1.19.3 → pygit2-1.20.1}/src/reference.c +7 -4
- {pygit2-1.19.3 → pygit2-1.20.1}/src/reference.h +1 -1
- {pygit2-1.19.3 → pygit2-1.20.1}/src/repository.c +13 -4
- {pygit2-1.19.3 → pygit2-1.20.1}/src/repository.h +1 -1
- {pygit2-1.19.3 → pygit2-1.20.1}/src/revspec.c +1 -1
- {pygit2-1.19.3 → pygit2-1.20.1}/src/revspec.h +1 -1
- {pygit2-1.19.3 → pygit2-1.20.1}/src/signature.c +1 -1
- {pygit2-1.19.3 → pygit2-1.20.1}/src/signature.h +1 -1
- {pygit2-1.19.3 → pygit2-1.20.1}/src/stash.c +1 -1
- {pygit2-1.19.3 → pygit2-1.20.1}/src/tag.c +1 -1
- {pygit2-1.19.3 → pygit2-1.20.1}/src/tree.c +2 -2
- {pygit2-1.19.3 → pygit2-1.20.1}/src/tree.h +1 -1
- {pygit2-1.19.3 → pygit2-1.20.1}/src/treebuilder.c +1 -1
- {pygit2-1.19.3 → pygit2-1.20.1}/src/treebuilder.h +1 -1
- {pygit2-1.19.3 → pygit2-1.20.1}/src/types.h +3 -1
- {pygit2-1.19.3 → pygit2-1.20.1}/src/utils.c +1 -1
- {pygit2-1.19.3 → pygit2-1.20.1}/src/utils.h +14 -1
- {pygit2-1.19.3 → pygit2-1.20.1}/src/walker.c +1 -1
- {pygit2-1.19.3 → pygit2-1.20.1}/src/walker.h +1 -1
- {pygit2-1.19.3 → pygit2-1.20.1}/src/worktree.c +1 -1
- {pygit2-1.19.3 → pygit2-1.20.1}/src/worktree.h +1 -1
- {pygit2-1.19.3 → pygit2-1.20.1}/test/__init__.py +1 -1
- {pygit2-1.19.3 → pygit2-1.20.1}/test/conftest.py +6 -0
- pygit2-1.20.1/test/data/bigrepo.zip +0 -0
- {pygit2-1.19.3 → pygit2-1.20.1}/test/test_apply_diff.py +1 -1
- {pygit2-1.19.3 → pygit2-1.20.1}/test/test_archive.py +16 -14
- {pygit2-1.19.3 → pygit2-1.20.1}/test/test_attributes.py +1 -1
- {pygit2-1.19.3 → pygit2-1.20.1}/test/test_blame.py +1 -1
- {pygit2-1.19.3 → pygit2-1.20.1}/test/test_blob.py +55 -2
- {pygit2-1.19.3 → pygit2-1.20.1}/test/test_branch.py +1 -1
- {pygit2-1.19.3 → pygit2-1.20.1}/test/test_branch_empty.py +1 -1
- {pygit2-1.19.3 → pygit2-1.20.1}/test/test_cherrypick.py +1 -1
- {pygit2-1.19.3 → pygit2-1.20.1}/test/test_commit.py +1 -1
- {pygit2-1.19.3 → pygit2-1.20.1}/test/test_commit_gpg.py +1 -1
- {pygit2-1.19.3 → pygit2-1.20.1}/test/test_commit_trailer.py +1 -1
- {pygit2-1.19.3 → pygit2-1.20.1}/test/test_config.py +90 -33
- {pygit2-1.19.3 → pygit2-1.20.1}/test/test_credentials.py +1 -1
- {pygit2-1.19.3 → pygit2-1.20.1}/test/test_describe.py +1 -1
- {pygit2-1.19.3 → pygit2-1.20.1}/test/test_diff.py +2 -4
- {pygit2-1.19.3 → pygit2-1.20.1}/test/test_diff_binary.py +7 -1
- pygit2-1.20.1/test/test_errors.py +126 -0
- {pygit2-1.19.3 → pygit2-1.20.1}/test/test_index.py +1 -1
- {pygit2-1.19.3 → pygit2-1.20.1}/test/test_mailmap.py +1 -1
- {pygit2-1.19.3 → pygit2-1.20.1}/test/test_merge.py +3 -22
- {pygit2-1.19.3 → pygit2-1.20.1}/test/test_nonunicode.py +29 -5
- {pygit2-1.19.3 → pygit2-1.20.1}/test/test_note.py +1 -1
- {pygit2-1.19.3 → pygit2-1.20.1}/test/test_object.py +1 -1
- {pygit2-1.19.3 → pygit2-1.20.1}/test/test_odb.py +1 -1
- {pygit2-1.19.3 → pygit2-1.20.1}/test/test_odb_backend.py +109 -1
- {pygit2-1.19.3 → pygit2-1.20.1}/test/test_oid.py +1 -1
- {pygit2-1.19.3 → pygit2-1.20.1}/test/test_options.py +1 -1
- {pygit2-1.19.3 → pygit2-1.20.1}/test/test_packbuilder.py +1 -1
- {pygit2-1.19.3 → pygit2-1.20.1}/test/test_patch.py +1 -1
- {pygit2-1.19.3 → pygit2-1.20.1}/test/test_patch_encoding.py +1 -1
- pygit2-1.20.1/test/test_rebase.py +795 -0
- pygit2-1.20.1/test/test_refdb_backend.py +343 -0
- {pygit2-1.19.3 → pygit2-1.20.1}/test/test_refs.py +23 -1
- {pygit2-1.19.3 → pygit2-1.20.1}/test/test_remote.py +142 -31
- {pygit2-1.19.3 → pygit2-1.20.1}/test/test_remote_prune.py +1 -1
- {pygit2-1.19.3 → pygit2-1.20.1}/test/test_remote_utf8.py +1 -1
- {pygit2-1.19.3 → pygit2-1.20.1}/test/test_repository.py +57 -56
- {pygit2-1.19.3 → pygit2-1.20.1}/test/test_repository_bare.py +2 -2
- {pygit2-1.19.3 → pygit2-1.20.1}/test/test_repository_custom.py +1 -1
- {pygit2-1.19.3 → pygit2-1.20.1}/test/test_repository_empty.py +1 -1
- {pygit2-1.19.3 → pygit2-1.20.1}/test/test_revparse.py +1 -1
- {pygit2-1.19.3 → pygit2-1.20.1}/test/test_revwalk.py +1 -1
- {pygit2-1.19.3 → pygit2-1.20.1}/test/test_settings.py +1 -1
- {pygit2-1.19.3 → pygit2-1.20.1}/test/test_signature.py +1 -1
- {pygit2-1.19.3 → pygit2-1.20.1}/test/test_status.py +45 -1
- {pygit2-1.19.3 → pygit2-1.20.1}/test/test_submodule.py +20 -1
- {pygit2-1.19.3 → pygit2-1.20.1}/test/test_tag.py +1 -1
- {pygit2-1.19.3 → pygit2-1.20.1}/test/test_transaction.py +1 -1
- {pygit2-1.19.3 → pygit2-1.20.1}/test/test_tree.py +1 -1
- {pygit2-1.19.3 → pygit2-1.20.1}/test/test_treebuilder.py +1 -1
- {pygit2-1.19.3 → pygit2-1.20.1}/test/utils.py +1 -1
- pygit2-1.19.3/Makefile +0 -7
- pygit2-1.19.3/build.ps1 +0 -23
- pygit2-1.19.3/pygit2/legacyenums.py +0 -113
- pygit2-1.19.3/test/test_refdb_backend.py +0 -137
- {pygit2-1.19.3 → pygit2-1.20.1}/CONTRIBUTING.md +0 -0
- {pygit2-1.19.3 → pygit2-1.20.1}/COPYING +0 -0
- {pygit2-1.19.3 → pygit2-1.20.1}/README.md +0 -0
- {pygit2-1.19.3 → pygit2-1.20.1}/build_tag.py +0 -0
- {pygit2-1.19.3 → pygit2-1.20.1}/mypy-stubtest.ini +0 -0
- {pygit2-1.19.3 → pygit2-1.20.1}/mypy.ini +0 -0
- {pygit2-1.19.3 → pygit2-1.20.1}/pygit2/decl/attr.h +0 -0
- {pygit2-1.19.3 → pygit2-1.20.1}/pygit2/decl/blame.h +0 -0
- {pygit2-1.19.3 → pygit2-1.20.1}/pygit2/decl/buffer.h +0 -0
- {pygit2-1.19.3 → pygit2-1.20.1}/pygit2/decl/callbacks.h +0 -0
- {pygit2-1.19.3 → pygit2-1.20.1}/pygit2/decl/checkout.h +0 -0
- {pygit2-1.19.3 → pygit2-1.20.1}/pygit2/decl/clone.h +0 -0
- {pygit2-1.19.3 → pygit2-1.20.1}/pygit2/decl/commit.h +0 -0
- {pygit2-1.19.3 → pygit2-1.20.1}/pygit2/decl/common.h +0 -0
- {pygit2-1.19.3 → pygit2-1.20.1}/pygit2/decl/config.h +0 -0
- {pygit2-1.19.3 → pygit2-1.20.1}/pygit2/decl/describe.h +0 -0
- {pygit2-1.19.3 → pygit2-1.20.1}/pygit2/decl/diff.h +0 -0
- {pygit2-1.19.3 → pygit2-1.20.1}/pygit2/decl/errors.h +0 -0
- {pygit2-1.19.3 → pygit2-1.20.1}/pygit2/decl/filter.h +0 -0
- {pygit2-1.19.3 → pygit2-1.20.1}/pygit2/decl/graph.h +0 -0
- {pygit2-1.19.3 → pygit2-1.20.1}/pygit2/decl/index.h +0 -0
- {pygit2-1.19.3 → pygit2-1.20.1}/pygit2/decl/indexer.h +0 -0
- {pygit2-1.19.3 → pygit2-1.20.1}/pygit2/decl/merge.h +0 -0
- {pygit2-1.19.3 → pygit2-1.20.1}/pygit2/decl/net.h +0 -0
- {pygit2-1.19.3 → pygit2-1.20.1}/pygit2/decl/oid.h +0 -0
- {pygit2-1.19.3 → pygit2-1.20.1}/pygit2/decl/options.h +0 -0
- {pygit2-1.19.3 → pygit2-1.20.1}/pygit2/decl/pack.h +0 -0
- {pygit2-1.19.3 → pygit2-1.20.1}/pygit2/decl/proxy.h +0 -0
- {pygit2-1.19.3 → pygit2-1.20.1}/pygit2/decl/refspec.h +0 -0
- {pygit2-1.19.3 → pygit2-1.20.1}/pygit2/decl/remote.h +0 -0
- {pygit2-1.19.3 → pygit2-1.20.1}/pygit2/decl/repository.h +0 -0
- {pygit2-1.19.3 → pygit2-1.20.1}/pygit2/decl/revert.h +0 -0
- {pygit2-1.19.3 → pygit2-1.20.1}/pygit2/decl/stash.h +0 -0
- {pygit2-1.19.3 → pygit2-1.20.1}/pygit2/decl/strarray.h +0 -0
- {pygit2-1.19.3 → pygit2-1.20.1}/pygit2/decl/submodule.h +0 -0
- {pygit2-1.19.3 → pygit2-1.20.1}/pygit2/decl/transaction.h +0 -0
- {pygit2-1.19.3 → pygit2-1.20.1}/pygit2/decl/transport.h +0 -0
- {pygit2-1.19.3 → pygit2-1.20.1}/pygit2/decl/types.h +0 -0
- {pygit2-1.19.3 → pygit2-1.20.1}/pygit2/py.typed +0 -0
- {pygit2-1.19.3 → pygit2-1.20.1}/pytest.ini +0 -0
- {pygit2-1.19.3 → pygit2-1.20.1}/requirements-test.txt +0 -0
- {pygit2-1.19.3 → pygit2-1.20.1}/requirements-typing.txt +0 -0
- {pygit2-1.19.3 → pygit2-1.20.1}/requirements-wheel.txt +0 -0
- {pygit2-1.19.3 → pygit2-1.20.1}/requirements.txt +0 -0
- {pygit2-1.19.3 → pygit2-1.20.1}/setup.cfg +0 -0
- {pygit2-1.19.3 → pygit2-1.20.1}/src/wildmatch.c +0 -0
- {pygit2-1.19.3 → pygit2-1.20.1}/src/wildmatch.h +0 -0
- {pygit2-1.19.3 → pygit2-1.20.1}/test/data/barerepo.zip +0 -0
- {pygit2-1.19.3 → pygit2-1.20.1}/test/data/binaryfilerepo.zip +0 -0
- {pygit2-1.19.3 → pygit2-1.20.1}/test/data/blameflagsrepo.zip +0 -0
- {pygit2-1.19.3 → pygit2-1.20.1}/test/data/dirtyrepo.zip +0 -0
- {pygit2-1.19.3 → pygit2-1.20.1}/test/data/emptyrepo.zip +0 -0
- {pygit2-1.19.3 → pygit2-1.20.1}/test/data/encoding.zip +0 -0
- {pygit2-1.19.3 → pygit2-1.20.1}/test/data/gpgsigned.zip +0 -0
- {pygit2-1.19.3 → pygit2-1.20.1}/test/data/submodulerepo.zip +0 -0
- {pygit2-1.19.3 → pygit2-1.20.1}/test/data/testrepo.zip +0 -0
- {pygit2-1.19.3 → pygit2-1.20.1}/test/data/testrepoformerging.zip +0 -0
- {pygit2-1.19.3 → pygit2-1.20.1}/test/data/testrepopacked.zip +0 -0
- {pygit2-1.19.3 → pygit2-1.20.1}/test/data/trailerrepo.zip +0 -0
- {pygit2-1.19.3 → pygit2-1.20.1}/test/data/utf8branchrepo.zip +0 -0
- {pygit2-1.19.3 → pygit2-1.20.1}/test/keys/pygit2_empty +0 -0
- {pygit2-1.19.3 → pygit2-1.20.1}/test/keys/pygit2_empty.pub +0 -0
- {pygit2-1.19.3 → pygit2-1.20.1}/test/test_filter.py +0 -0
|
@@ -11,7 +11,7 @@ and a high-level, Pythonic API for repository manipulation.
|
|
|
11
11
|
- **License**: GPLv2 with linking exception (see `COPYING`)
|
|
12
12
|
- **Maintainer**: J. David Ibáñez
|
|
13
13
|
- **Python Support**: 3.11 – 3.14 and PyPy3 7.3+
|
|
14
|
-
- **libgit2 Version**: 1.9.
|
|
14
|
+
- **libgit2 Version**: 1.9.7
|
|
15
15
|
- **Homepage**: <https://www.pygit2.org/>
|
|
16
16
|
- **Repository**: <https://github.com/libgit2/pygit2>
|
|
17
17
|
|
|
@@ -56,8 +56,8 @@ modules:
|
|
|
56
56
|
`repository.py`, `callbacks.py`, `config.py`, `index.py`, `remotes.py`,
|
|
57
57
|
`settings.py`, `submodules.py`, `transaction.py`, `filter.py`, `blob.py`,
|
|
58
58
|
`blame.py`, `branches.py`, `credentials.py`, `errors.py`, `options.py`,
|
|
59
|
-
`packbuilder.py`, `
|
|
60
|
-
`
|
|
59
|
+
`packbuilder.py`, `rebase.py`, `references.py`, `refspec.py`, `utils.py`,
|
|
60
|
+
`enums.py`.
|
|
61
61
|
|
|
62
62
|
- **`test/`** — pytest suite with fixture-based repository handling.
|
|
63
63
|
- **`docs/`** — Sphinx documentation (RTD theme).
|
|
@@ -65,7 +65,8 @@ modules:
|
|
|
65
65
|
## Key Configuration Files
|
|
66
66
|
|
|
67
67
|
- **`setup.py`** — setuptools entry point. Builds both the C extension
|
|
68
|
-
(`src/*.c`) and the CFFI extension (`pygit2/_run.py:ffi`).
|
|
68
|
+
(`src/*.c`) and the CFFI extension (`pygit2/_run.py:ffi`). On Windows it
|
|
69
|
+
also copies `git2.dll` into the package (see `BuildWithDLLs`).
|
|
69
70
|
- **`pyproject.toml`** — Build-system requirements, `cibuildwheel`
|
|
70
71
|
configuration, `ruff` settings, and `codespell` settings.
|
|
71
72
|
- **`setup.cfg`** — Legacy pycodestyle configuration.
|
|
@@ -73,7 +74,7 @@ modules:
|
|
|
73
74
|
`testpaths = test/`).
|
|
74
75
|
- **`mypy.ini`** — mypy configuration with strict settings.
|
|
75
76
|
- **`mypy-stubtest.ini`** — mypy configuration for `stubtest` against
|
|
76
|
-
`_pygit2.pyi
|
|
77
|
+
`_pygit2.pyi` (at the repo root).
|
|
77
78
|
- **`requirements.txt`** — Runtime/build requirements (`cffi>=2.0`,
|
|
78
79
|
`setuptools` for Python >= 3.12).
|
|
79
80
|
- **`requirements-test.txt`** — Test requirements (`pytest`, `pytest-cov`).
|
|
@@ -106,16 +107,14 @@ handles libgit2 compilation via CMake.
|
|
|
106
107
|
make
|
|
107
108
|
|
|
108
109
|
# Or manually:
|
|
109
|
-
LIBSSH2_VERSION=1.11.1 LIBGIT2_VERSION=1.9.
|
|
110
|
+
LIBSSH2_VERSION=1.11.1 LIBGIT2_VERSION=1.9.7 sh build.sh
|
|
110
111
|
|
|
111
|
-
# Build
|
|
112
|
-
sh build.sh test
|
|
113
|
-
|
|
114
|
-
# Build a wheel, install it, and run the tests
|
|
112
|
+
# Build a wheel and bundle the shared libraries into it
|
|
115
113
|
sh build.sh wheel
|
|
114
|
+
sh build.sh bundle
|
|
116
115
|
|
|
117
|
-
#
|
|
118
|
-
sh build.sh test
|
|
116
|
+
# Build inplace and run the tests with coverage (build.sh adds --cov=pygit2)
|
|
117
|
+
sh build.sh test
|
|
119
118
|
|
|
120
119
|
# Run mypy type checking
|
|
121
120
|
sh build.sh mypy
|
|
@@ -140,8 +139,8 @@ Variables consumed by `build.sh`:
|
|
|
140
139
|
|
|
141
140
|
- `LIBGIT2_VERSION` — If set, download and build this libgit2 version.
|
|
142
141
|
- `LIBSSH2_VERSION` — If set, download and build libssh2 with SSH support.
|
|
143
|
-
- `OPENSSL_VERSION` — If set, download and build OpenSSL (
|
|
144
|
-
macOS
|
|
142
|
+
- `OPENSSL_VERSION` — If set, download and build OpenSSL (used on Linux and
|
|
143
|
+
macOS CI builds).
|
|
145
144
|
- `ZLIB_VERSION` — If set, download and build zlib.
|
|
146
145
|
- `BUILD_TYPE` — CMake build type (default: `Debug`).
|
|
147
146
|
- `PYTHON` — Python interpreter to use (default: `python3`).
|
|
@@ -167,7 +166,12 @@ make -C docs html # requires sphinx-rtd-theme
|
|
|
167
166
|
- Target Python: 3.11+
|
|
168
167
|
- Quote style: single quotes
|
|
169
168
|
- Selected rules: `E4`, `E7`, `E9`, `F`, `I`, `UP035`, `UP007`
|
|
170
|
-
-
|
|
169
|
+
- Run `ruff format` and `ruff check` on changed files before committing.
|
|
170
|
+
CI runs `ruff format --diff` and `ruff check`; formatting failures will
|
|
171
|
+
fail the build.
|
|
172
|
+
- **Type checker**: mypy (strict settings enabled; see `mypy.ini`). Test
|
|
173
|
+
modules additionally require typed defs and calls (`disallow_untyped_defs`,
|
|
174
|
+
`disallow_untyped_calls` under `[mypy-test.*]`).
|
|
171
175
|
- All Python source files must include the standard GPLv2 copyright header.
|
|
172
176
|
- `pygit2/__init__.py` is large because it re-exports a large surface of
|
|
173
177
|
constants and classes; follow existing patterns when adding new public
|
|
@@ -233,23 +237,28 @@ def f(a, b):
|
|
|
233
237
|
GitHub Actions workflows live in `.github/workflows/`:
|
|
234
238
|
|
|
235
239
|
- **`tests.yml`** — Runs on s390x via QEMU (`uraimo/run-on-arch-action`).
|
|
236
|
-
Allowed to fail; see issue #812.
|
|
240
|
+
Allowed to fail (`continue-on-error`); see issue #812.
|
|
237
241
|
- **`lint.yml`** — Runs `ruff format --diff`, `ruff check`, and
|
|
238
242
|
`sh build.sh mypy`.
|
|
239
|
-
- **`wheels.yml`** — Uses `cibuildwheel` to build wheels for Linux
|
|
240
|
-
arm64, ppc64le, musl), macOS (intel, arm64,
|
|
241
|
-
|
|
242
|
-
|
|
243
|
+
- **`wheels.yml`** — Uses `cibuildwheel` (`~=3.3`) to build wheels for Linux
|
|
244
|
+
(amd64, arm64, ppc64le and riscv64 via QEMU, musl), macOS (intel, arm64,
|
|
245
|
+
PyPy), and Windows (x64, x86, arm64). Linux, macOS and Windows jobs cache
|
|
246
|
+
the compiled dependencies between runs. It also builds an sdist, runs a
|
|
247
|
+
`twine check` (skipped on version tags), publishes to PyPI, and creates a
|
|
248
|
+
GitHub Release on version tags (`v*`), with release notes parsed from
|
|
249
|
+
`CHANGELOG.md` by `.github/workflows/parse_release_notes.py`.
|
|
243
250
|
- **`codespell.yml`** — Spell checking with the codespell action.
|
|
244
251
|
|
|
245
252
|
The `cibuildwheel` configuration in `pyproject.toml` pins:
|
|
246
253
|
|
|
247
|
-
- `LIBGIT2_VERSION="1.9.
|
|
254
|
+
- `LIBGIT2_VERSION="1.9.7"`
|
|
248
255
|
- `LIBSSH2_VERSION="1.11.1"`
|
|
249
|
-
- `OPENSSL_VERSION="3.5.
|
|
256
|
+
- `OPENSSL_VERSION="3.5.7"`
|
|
250
257
|
|
|
251
|
-
and skips `*musllinux_ppc64le` plus testing on `*-*linux_ppc64le
|
|
252
|
-
`pp*-macosx_arm64`.
|
|
258
|
+
and skips `*musllinux_ppc64le` plus testing on `*-*linux_ppc64le`,
|
|
259
|
+
`*-*linux_riscv64` and `pp*-macosx_arm64`. On Windows it uses the
|
|
260
|
+
`Visual Studio 18 2026` CMake generator for x64/x86 and
|
|
261
|
+
`Visual Studio 17 2022` for ARM64.
|
|
253
262
|
|
|
254
263
|
## Security Considerations
|
|
255
264
|
|
|
@@ -262,6 +271,12 @@ and skips `*musllinux_ppc64le` plus testing on `*-*linux_ppc64le` and
|
|
|
262
271
|
- Valgrind support: see `docs/development.rst` and
|
|
263
272
|
`misc/valgrind-python.supp` for memory-leak debugging instructions.
|
|
264
273
|
|
|
274
|
+
## Git Commits
|
|
275
|
+
|
|
276
|
+
- Do not run `git commit` or create commits unless the user explicitly asks for it.
|
|
277
|
+
- Commits created by an AI agent must end with the `Assisted-by:` trailer.
|
|
278
|
+
Human-authored commits do not need it.
|
|
279
|
+
|
|
265
280
|
## Useful Notes for Agents
|
|
266
281
|
|
|
267
282
|
- **Do not assume libgit2 is installed globally.** Check for `LIBGIT2` or use
|
|
@@ -275,5 +290,6 @@ and skips `*musllinux_ppc64le` plus testing on `*-*linux_ppc64le` and
|
|
|
275
290
|
extension. Keep it in sync when adding or changing low-level APIs.
|
|
276
291
|
- **Header stub order matters**: `pygit2/_run.py` concatenates `decl/*.h` in a
|
|
277
292
|
fixed list; add new stubs in the correct position if dependencies require it.
|
|
278
|
-
- Run the full test suite
|
|
279
|
-
|
|
293
|
+
- Run the full test suite, type checks, and linting/formatting before
|
|
294
|
+
considering a change complete:
|
|
295
|
+
`sh build.sh test`, `sh build.sh mypy`, `ruff check .`, and `ruff format .`.
|
|
@@ -21,6 +21,7 @@ Authors:
|
|
|
21
21
|
Nick Hynes
|
|
22
22
|
Richard Möhn
|
|
23
23
|
Xu Tao
|
|
24
|
+
Łukasz Langa
|
|
24
25
|
Konstantin Baikov
|
|
25
26
|
Matthew Duggan
|
|
26
27
|
Matthew Gamble
|
|
@@ -30,7 +31,6 @@ Authors:
|
|
|
30
31
|
Sriram Raghu
|
|
31
32
|
Victor Garcia
|
|
32
33
|
Yonggang Luo
|
|
33
|
-
Łukasz Langa
|
|
34
34
|
Patrick Steinhardt
|
|
35
35
|
Petr Hosek
|
|
36
36
|
Tamir Bahar
|
|
@@ -44,6 +44,7 @@ Authors:
|
|
|
44
44
|
Nabijacz Leweli
|
|
45
45
|
Simon Cozens
|
|
46
46
|
Vlad Temian
|
|
47
|
+
WANG Xuerui
|
|
47
48
|
Brodie Rao
|
|
48
49
|
Chad Dombrova
|
|
49
50
|
Lukas Fleischer
|
|
@@ -65,7 +66,6 @@ Authors:
|
|
|
65
66
|
Santiago Perez De Rosso
|
|
66
67
|
Sebastian Thiel
|
|
67
68
|
Thom Wiggers
|
|
68
|
-
WANG Xuerui
|
|
69
69
|
William Manley
|
|
70
70
|
Alexander Linne
|
|
71
71
|
Alok Singhal
|
|
@@ -126,7 +126,9 @@ Authors:
|
|
|
126
126
|
Marcel Waldvogel
|
|
127
127
|
Masud Rahman
|
|
128
128
|
Michael Sondergaard
|
|
129
|
+
Michal Koutný
|
|
129
130
|
Natanael Arndt
|
|
131
|
+
Nick Williams
|
|
130
132
|
Ondřej Nový
|
|
131
133
|
Sarath Lakshman
|
|
132
134
|
Steve Kieffer
|
|
@@ -200,6 +202,7 @@ Authors:
|
|
|
200
202
|
Lance Eftink
|
|
201
203
|
Legorooj
|
|
202
204
|
Lukas Berk
|
|
205
|
+
Marius Gedminas
|
|
203
206
|
Martin von Zweigbergk
|
|
204
207
|
Mathieu Bridon
|
|
205
208
|
Mathieu Pillard
|
|
@@ -226,6 +229,7 @@ Authors:
|
|
|
226
229
|
Remy Suen
|
|
227
230
|
Ridge Kennedy
|
|
228
231
|
Rodrigo Bistolfi
|
|
232
|
+
Roshan Ramani
|
|
229
233
|
Ross Nicoll
|
|
230
234
|
Rui Abreu Ferreira
|
|
231
235
|
Rui Chen
|
|
@@ -242,6 +246,7 @@ Authors:
|
|
|
242
246
|
Victor Florea
|
|
243
247
|
Vladimir Rutsky
|
|
244
248
|
Vruyr Gyolchanyan
|
|
249
|
+
William Bowers
|
|
245
250
|
William Schueller
|
|
246
251
|
Wim Jeantine-Glenn
|
|
247
252
|
Yu Jianjian
|
|
@@ -1,3 +1,96 @@
|
|
|
1
|
+
# 1.20.1 (2026-09-12)
|
|
2
|
+
|
|
3
|
+
- Update wheels to libgit2 1.9.7
|
|
4
|
+
|
|
5
|
+
- New exception hierarchy: `AlreadyExistsError`, `InvalidSpecError`,
|
|
6
|
+
`InvalidError`, `NotFoundError`, `AmbiguousError`, `AuthError`, and
|
|
7
|
+
`CertificateError` all inherit from `GitError` and the appropriate Python
|
|
8
|
+
built-in exception (`ValueError`/`KeyError`) for backward compatibility
|
|
9
|
+
[#830](https://github.com/libgit2/pygit2/issues/830)
|
|
10
|
+
|
|
11
|
+
- Fix `DiffDelta.is_binary` and `DiffDelta.flags` returning stale values for
|
|
12
|
+
deltas obtained from `Diff.deltas`; flags are now loaded lazily
|
|
13
|
+
[#962](https://github.com/libgit2/pygit2/issues/962)
|
|
14
|
+
[#1100](https://github.com/libgit2/pygit2/pull/1100)
|
|
15
|
+
|
|
16
|
+
- Fix `repo.submodules.get()` and `name in repo.submodules` raising
|
|
17
|
+
`AlreadyExistsError` when a repository exists at the submodule path but was
|
|
18
|
+
never registered as a submodule; they now return `None` and `False`
|
|
19
|
+
respectively as documented
|
|
20
|
+
[#1487](https://github.com/libgit2/pygit2/pull/1487)
|
|
21
|
+
|
|
22
|
+
- Fix `BlobIO` cleanup deadlock on partial reads
|
|
23
|
+
[#1488](https://github.com/libgit2/pygit2/issues/1488)
|
|
24
|
+
[#1491](https://github.com/libgit2/pygit2/pull/1491)
|
|
25
|
+
|
|
26
|
+
- Fix leaks and crashes in error paths
|
|
27
|
+
[#1478](https://github.com/libgit2/pygit2/issues/1478)
|
|
28
|
+
[#1479](https://github.com/libgit2/pygit2/issues/1479)
|
|
29
|
+
[#1480](https://github.com/libgit2/pygit2/issues/1480)
|
|
30
|
+
[#1481](https://github.com/libgit2/pygit2/issues/1481)
|
|
31
|
+
|
|
32
|
+
- Fix custom ODB and refdb backend callbacks overwriting a pending Python
|
|
33
|
+
exception (e.g. `RuntimeError`) with a stale libgit2 error message.
|
|
34
|
+
|
|
35
|
+
- Documentation fixes
|
|
36
|
+
[#1490](https://github.com/libgit2/pygit2/pull/1490)
|
|
37
|
+
|
|
38
|
+
- CI (macOS): build architecture-specific OpenSSL/libssh2/libgit2
|
|
39
|
+
dependencies instead of universal binaries, producing smaller wheels.
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
# 1.20.0 (2026-08-08)
|
|
43
|
+
|
|
44
|
+
- New `RemoteCallbacks.custom_headers()`
|
|
45
|
+
[#1465](https://github.com/libgit2/pygit2/pull/1465)
|
|
46
|
+
|
|
47
|
+
- New rebase API: `Repository.rebase_init(...)`, `Repository.rebase_open(...)`,
|
|
48
|
+
`Rebase`, and `RebaseOperation`
|
|
49
|
+
[#1483](https://github.com/libgit2/pygit2/pull/1483)
|
|
50
|
+
|
|
51
|
+
- Fix `Config.snapshot()` for non-repository configs, allow `PathLike` in
|
|
52
|
+
`Config.__init__()`, and improve config documentation
|
|
53
|
+
[#1468](https://github.com/libgit2/pygit2/pull/1468)
|
|
54
|
+
|
|
55
|
+
- Fix `UnicodeDecodeError` with non-UTF-8 file paths in `Repository.status()`,
|
|
56
|
+
`DiffFile.path`, index paths, checkout callbacks, and related APIs
|
|
57
|
+
[#1451](https://github.com/libgit2/pygit2/issues/1451)
|
|
58
|
+
[#1469](https://github.com/libgit2/pygit2/pull/1469)
|
|
59
|
+
|
|
60
|
+
- Fix `enums.CheckoutStrategy.CONFLICT_STYLE_ZDIFF3`, which was mistakenly
|
|
61
|
+
bound to the `DIFF3` constant
|
|
62
|
+
[#1483](https://github.com/libgit2/pygit2/pull/1483)
|
|
63
|
+
|
|
64
|
+
- Fix crashes and reference-lifetime bugs in custom refdb backends
|
|
65
|
+
[#1471](https://github.com/libgit2/pygit2/issues/1471)
|
|
66
|
+
[#1474](https://github.com/libgit2/pygit2/issues/1474)
|
|
67
|
+
[#1475](https://github.com/libgit2/pygit2/issues/1475)
|
|
68
|
+
[#1476](https://github.com/libgit2/pygit2/issues/1476)
|
|
69
|
+
|
|
70
|
+
- Update wheels to libgit2 1.9.6 and OpenSSL 3.5.7
|
|
71
|
+
|
|
72
|
+
- Add riscv64 wheels
|
|
73
|
+
[#1463](https://github.com/libgit2/pygit2/pull/1463)
|
|
74
|
+
|
|
75
|
+
Breaking changes:
|
|
76
|
+
|
|
77
|
+
- Remove deprecated `pygit2.legacyenums` module and `GIT_*` constants,
|
|
78
|
+
use `pygit2.enums` instead
|
|
79
|
+
|
|
80
|
+
- Remove deprecated support for passing `str` to `Repository.merge(...)`,
|
|
81
|
+
pass a `Commit`, `Oid`, or `Reference` object instead
|
|
82
|
+
|
|
83
|
+
- `Repository.merge_file_from_index(...)` now returns `MergeFileResult` by
|
|
84
|
+
default; pass `use_deprecated=True` for the previous string return, now
|
|
85
|
+
deprecated.
|
|
86
|
+
|
|
87
|
+
- Remove deprecated `Remote.ls_remotes(...)`, use `Remote.list_heads(...)`
|
|
88
|
+
instead
|
|
89
|
+
|
|
90
|
+
- Remove `pygit2.to_bytes(...)` and `pygit2.to_str(...)`; they were undocumented
|
|
91
|
+
accidental public APIs
|
|
92
|
+
|
|
93
|
+
|
|
1
94
|
# 1.19.3 (2026-06-13)
|
|
2
95
|
|
|
3
96
|
- Memory fixes
|
pygit2-1.20.1/Makefile
ADDED
pygit2-1.20.1/build.ps1
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
$ErrorActionPreference = 'Stop'
|
|
2
|
+
|
|
3
|
+
$LIBGIT2_VERSION = $env:LIBGIT2_VERSION
|
|
4
|
+
$LIBGIT2_SRC = $env:LIBGIT2_SRC
|
|
5
|
+
if (-not $LIBGIT2_SRC) {
|
|
6
|
+
$LIBGIT2_SRC = "build/libgit2_src"
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
# Prefer CMAKE_INSTALL_PREFIX, then LIBGIT2, then the default Program Files location.
|
|
10
|
+
$INSTALL_PREFIX = $env:CMAKE_INSTALL_PREFIX
|
|
11
|
+
if (-not $INSTALL_PREFIX) {
|
|
12
|
+
$INSTALL_PREFIX = $env:LIBGIT2
|
|
13
|
+
}
|
|
14
|
+
if (-not $INSTALL_PREFIX) {
|
|
15
|
+
$INSTALL_PREFIX = "$env:ProgramFiles\libgit2"
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
# Use cached dependencies if they match the requested version.
|
|
19
|
+
if ((Test-Path -Path "$INSTALL_PREFIX\versions.txt") -and $LIBGIT2_VERSION) {
|
|
20
|
+
$cached = Get-Content "$INSTALL_PREFIX\versions.txt"
|
|
21
|
+
$matches = $cached | Select-String "^LIBGIT2_VERSION=$LIBGIT2_VERSION$"
|
|
22
|
+
if ($matches) {
|
|
23
|
+
Write-Host "Using cached dependencies"
|
|
24
|
+
exit 0
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
if (!(Test-Path -Path "build")) {
|
|
29
|
+
# in case the pygit2 package build/ workspace has not been created by cibuildwheel yet
|
|
30
|
+
mkdir build
|
|
31
|
+
}
|
|
32
|
+
if (Test-Path -Path "$LIBGIT2_SRC") {
|
|
33
|
+
Set-Location "$LIBGIT2_SRC"
|
|
34
|
+
# for local runs, reuse build/libgit_src if it exists
|
|
35
|
+
if (Test-Path -Path build) {
|
|
36
|
+
# purge previous build env (likely for a different arch type)
|
|
37
|
+
Remove-Item -Recurse -Force build
|
|
38
|
+
}
|
|
39
|
+
# ensure we are checked out to the right version
|
|
40
|
+
git fetch --depth=1 --tags
|
|
41
|
+
git checkout "v$LIBGIT2_VERSION"
|
|
42
|
+
} else {
|
|
43
|
+
# from a fresh run (like in CI)
|
|
44
|
+
git clone --depth=1 -b "v$LIBGIT2_VERSION" https://github.com/libgit2/libgit2.git $LIBGIT2_SRC
|
|
45
|
+
Set-Location "$LIBGIT2_SRC"
|
|
46
|
+
}
|
|
47
|
+
cmake -B build -S . -DBUILD_TESTS=OFF -DCMAKE_INSTALL_PREFIX="$INSTALL_PREFIX"
|
|
48
|
+
cmake --build build/ --config=Release --target install
|
|
49
|
+
|
|
50
|
+
# Record version so the cache can be reused.
|
|
51
|
+
"LIBGIT2_VERSION=$LIBGIT2_VERSION" | Set-Content "$INSTALL_PREFIX\versions.txt" -NoNewline
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
# LIBSSH2_VERSION=<Version> - Build the given version of libssh2
|
|
15
15
|
# LIBGIT2_VERSION=<Version> - Build the given version of libgit2
|
|
16
16
|
# OPENSSL_VERSION=<Version> - Build the given version of OpenSSL
|
|
17
|
-
# (
|
|
17
|
+
# (used on Linux and macOS CI builds)
|
|
18
18
|
#
|
|
19
19
|
# Examples.
|
|
20
20
|
#
|
|
@@ -22,14 +22,14 @@
|
|
|
22
22
|
#
|
|
23
23
|
# sh build.sh
|
|
24
24
|
#
|
|
25
|
-
# Build libgit2 1.9.
|
|
25
|
+
# Build libgit2 1.9.7 (will use libssh2 if available), then build pygit2
|
|
26
26
|
# inplace:
|
|
27
27
|
#
|
|
28
|
-
# LIBGIT2_VERSION=1.9.
|
|
28
|
+
# LIBGIT2_VERSION=1.9.7 sh build.sh
|
|
29
29
|
#
|
|
30
|
-
# Build libssh2 1.11.1 and libgit2 1.9.
|
|
30
|
+
# Build libssh2 1.11.1 and libgit2 1.9.7, then build pygit2 inplace:
|
|
31
31
|
#
|
|
32
|
-
# LIBSSH2_VERSION=1.11.1 LIBGIT2_VERSION=1.9.
|
|
32
|
+
# LIBSSH2_VERSION=1.11.1 LIBGIT2_VERSION=1.9.7 sh build.sh
|
|
33
33
|
#
|
|
34
34
|
# Build inplace and run the tests:
|
|
35
35
|
#
|
|
@@ -82,8 +82,20 @@ if [ "$CIBUILDWHEEL" = "1" ]; then
|
|
|
82
82
|
apk add --no-cache perl
|
|
83
83
|
fi
|
|
84
84
|
fi
|
|
85
|
-
|
|
86
|
-
|
|
85
|
+
|
|
86
|
+
# Use cached dependencies if they match the requested versions.
|
|
87
|
+
if [ -f ci/versions.txt ] && \
|
|
88
|
+
grep -q "^LIBGIT2_VERSION=$LIBGIT2_VERSION$" ci/versions.txt && \
|
|
89
|
+
grep -q "^LIBSSH2_VERSION=$LIBSSH2_VERSION$" ci/versions.txt && \
|
|
90
|
+
grep -q "^OPENSSL_VERSION=$OPENSSL_VERSION$" ci/versions.txt; then
|
|
91
|
+
echo "Using cached dependencies"
|
|
92
|
+
exit 0
|
|
93
|
+
fi
|
|
94
|
+
|
|
95
|
+
# The ci directory may be a bind-mount (e.g. inside cibuildwheel), so
|
|
96
|
+
# remove its contents but keep the directory itself.
|
|
97
|
+
rm -rf ci/* ci/.[!.]* ci/..?* 2>/dev/null || true
|
|
98
|
+
mkdir -p ci
|
|
87
99
|
cd ci
|
|
88
100
|
else
|
|
89
101
|
# Create a virtual environment
|
|
@@ -110,31 +122,24 @@ if [ -n "$OPENSSL_VERSION" ]; then
|
|
|
110
122
|
wget https://www.openssl.org/source/$FILENAME.tar.gz -N --no-check-certificate
|
|
111
123
|
|
|
112
124
|
if [ "$KERNEL" = "Darwin" ]; then
|
|
125
|
+
# Build OpenSSL for the host architecture only.
|
|
113
126
|
tar xf $FILENAME.tar.gz
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
./Configure darwin64-x86_64-cc shared
|
|
121
|
-
make
|
|
122
|
-
cd ../openssl-arm
|
|
123
|
-
./Configure enable-rc5 zlib darwin64-arm64-cc no-asm
|
|
127
|
+
cd $FILENAME
|
|
128
|
+
if [ "$ARCH" = "arm64" ]; then
|
|
129
|
+
./Configure enable-rc5 zlib darwin64-arm64-cc no-asm shared --prefix=$PREFIX --libdir=$PREFIX/lib
|
|
130
|
+
else
|
|
131
|
+
./Configure darwin64-x86_64-cc shared --prefix=$PREFIX --libdir=$PREFIX/lib
|
|
132
|
+
fi
|
|
124
133
|
make
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
LIBSSL=$(
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
cd
|
|
134
|
-
install_name_tool -id "@rpath/$LIBSSL" $LIBSSL
|
|
135
|
-
install_name_tool -id "@rpath/$LIBCRYPTO" $LIBCRYPTO
|
|
136
|
-
OPENSSL_PREFIX=$(pwd)
|
|
137
|
-
cd ..
|
|
134
|
+
make install
|
|
135
|
+
OPENSSL_PREFIX=$PREFIX
|
|
136
|
+
# Set install names so delocate can bundle the libraries.
|
|
137
|
+
cd $PREFIX/lib
|
|
138
|
+
LIBSSL=$(find . -maxdepth 1 -name 'libssl.*.dylib' -type f | head -n1 | sed 's|^\./||')
|
|
139
|
+
LIBCRYPTO=$(find . -maxdepth 1 -name 'libcrypto.*.dylib' -type f | head -n1 | sed 's|^\./||')
|
|
140
|
+
install_name_tool -id "@rpath/$LIBSSL" "$LIBSSL"
|
|
141
|
+
install_name_tool -id "@rpath/$LIBCRYPTO" "$LIBCRYPTO"
|
|
142
|
+
cd ../..
|
|
138
143
|
else
|
|
139
144
|
# Linux
|
|
140
145
|
tar xf $FILENAME.tar.gz
|
|
@@ -154,14 +159,11 @@ if [ -n "$LIBSSH2_VERSION" ]; then
|
|
|
154
159
|
tar xf $FILENAME.tar.gz
|
|
155
160
|
cd $FILENAME
|
|
156
161
|
if [ "$KERNEL" = "Darwin" ] && [ "$CIBUILDWHEEL" = "1" ]; then
|
|
157
|
-
cmake . \
|
|
162
|
+
CMAKE_PREFIX_PATH=$PREFIX cmake . \
|
|
158
163
|
-DCMAKE_INSTALL_PREFIX=$PREFIX \
|
|
159
164
|
-DBUILD_SHARED_LIBS=ON \
|
|
160
165
|
-DBUILD_EXAMPLES=OFF \
|
|
161
|
-
-DCMAKE_OSX_ARCHITECTURES="
|
|
162
|
-
-DOPENSSL_CRYPTO_LIBRARY="../openssl-universal/$LIBCRYPTO" \
|
|
163
|
-
-DOPENSSL_SSL_LIBRARY="../openssl-universal/$LIBSSL" \
|
|
164
|
-
-DOPENSSL_INCLUDE_DIR="../openssl-x86/include" \
|
|
166
|
+
-DCMAKE_OSX_ARCHITECTURES="$ARCH" \
|
|
165
167
|
-DBUILD_TESTING=OFF
|
|
166
168
|
else
|
|
167
169
|
cmake . \
|
|
@@ -186,14 +188,11 @@ if [ -n "$LIBGIT2_VERSION" ]; then
|
|
|
186
188
|
mkdir -p build
|
|
187
189
|
cd build
|
|
188
190
|
if [ "$KERNEL" = "Darwin" ] && [ "$CIBUILDWHEEL" = "1" ]; then
|
|
189
|
-
CMAKE_PREFIX_PATH=$
|
|
191
|
+
CMAKE_PREFIX_PATH=$PREFIX cmake .. \
|
|
190
192
|
-DBUILD_SHARED_LIBS=ON \
|
|
191
193
|
-DBUILD_TESTS=OFF \
|
|
192
194
|
-DCMAKE_BUILD_TYPE=$BUILD_TYPE \
|
|
193
|
-
-DCMAKE_OSX_ARCHITECTURES="
|
|
194
|
-
-DOPENSSL_CRYPTO_LIBRARY="../openssl-universal/$LIBCRYPTO" \
|
|
195
|
-
-DOPENSSL_SSL_LIBRARY="../openssl-universal/$LIBSSL" \
|
|
196
|
-
-DOPENSSL_INCLUDE_DIR="../openssl-x86/include" \
|
|
195
|
+
-DCMAKE_OSX_ARCHITECTURES="$ARCH" \
|
|
197
196
|
-DCMAKE_INSTALL_PREFIX=$PREFIX \
|
|
198
197
|
-DUSE_SSH=$USE_SSH
|
|
199
198
|
else
|
|
@@ -212,9 +211,13 @@ if [ -n "$LIBGIT2_VERSION" ]; then
|
|
|
212
211
|
fi
|
|
213
212
|
|
|
214
213
|
if [ "$CIBUILDWHEEL" = "1" ]; then
|
|
214
|
+
# Record versions so the cache can be reused.
|
|
215
|
+
cat > $PREFIX/versions.txt <<EOF
|
|
216
|
+
LIBGIT2_VERSION=$LIBGIT2_VERSION
|
|
217
|
+
LIBSSH2_VERSION=$LIBSSH2_VERSION
|
|
218
|
+
OPENSSL_VERSION=$OPENSSL_VERSION
|
|
219
|
+
EOF
|
|
215
220
|
if [ "$KERNEL" = "Darwin" ]; then
|
|
216
|
-
cp $OPENSSL_PREFIX/*.dylib $PREFIX/lib/
|
|
217
|
-
cp $OPENSSL_PREFIX/*.dylib $PREFIX/lib/
|
|
218
221
|
echo "PREFIX " $PREFIX
|
|
219
222
|
echo "OPENSSL_PREFIX" $OPENSSL_PREFIX
|
|
220
223
|
ls -l $PREFIX
|