Skip to content

Commit 53b986e

Browse files
committed
meson (wip)
1 parent 8810e4c commit 53b986e

File tree

4 files changed

+110
-1
lines changed

4 files changed

+110
-1
lines changed

Makefile

+13
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,16 @@ build:
55

66
html: build
77
make -C docs html
8+
9+
meson:
10+
rm builddir -rf
11+
meson setup builddir
12+
cd builddir && meson compile
13+
14+
meson_build:
15+
python -m build
16+
17+
meson_install:
18+
python -m venv venv
19+
./venv/bin/pip install -U pip
20+
./venv/bin/pip install build

meson.build

+65
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
project('pygit2', 'c', version: '1.13.2')
2+
3+
py = import('python').find_installation(pure: false)
4+
5+
#includes = include_directories('src')
6+
7+
# If some files (such as .py files) need to be copied to site-packages,
8+
# this is where they get specified. Files get copied to
9+
# <python directory>/site-packages/<subdir>
10+
sources = [
11+
'pygit2/__init__.py',
12+
'pygit2/_build.py',
13+
'pygit2/_run.py',
14+
'pygit2/blame.py',
15+
'pygit2/blob.py',
16+
'pygit2/callbacks.py',
17+
'pygit2/config.py',
18+
'pygit2/credentials.py',
19+
'pygit2/errors.py',
20+
'pygit2/ffi.py',
21+
'pygit2/filter.py',
22+
'pygit2/index.py',
23+
'pygit2/packbuilder.py',
24+
'pygit2/refspec.py',
25+
'pygit2/remote.py',
26+
'pygit2/repository.py',
27+
'pygit2/settings.py',
28+
'pygit2/submodule.py',
29+
'pygit2/utils.py',
30+
]
31+
py.install_sources(sources, subdir: 'pygit2', pure: false)
32+
33+
sources = [
34+
'src/blob.c',
35+
'src/branch.c',
36+
'src/commit.c',
37+
'src/diff.c',
38+
'src/error.c',
39+
'src/filter.c',
40+
'src/mailmap.c',
41+
'src/note.c',
42+
'src/object.c',
43+
'src/odb_backend.c',
44+
'src/odb.c',
45+
'src/oid.c',
46+
'src/options.c',
47+
'src/patch.c',
48+
'src/pygit2.c',
49+
'src/refdb_backend.c',
50+
'src/refdb.c',
51+
'src/reference.c',
52+
'src/repository.c',
53+
'src/revspec.c',
54+
'src/signature.c',
55+
'src/stash.c',
56+
'src/tag.c',
57+
'src/treebuilder.c',
58+
'src/tree.c',
59+
'src/utils.c',
60+
'src/walker.c',
61+
'src/wildmatch.c',
62+
'src/worktree.c',
63+
]
64+
65+
py.extension_module('_pygit2', sources, install: true)

pyproject.toml

+32-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,36 @@
11
[build-system]
2-
requires = ["setuptools", "wheel"]
2+
build-backend = 'mesonpy'
3+
requires = ['meson-python']
4+
5+
[project]
6+
name = 'pygit2'
7+
version = '1.13.3'
8+
description = 'Python bindings for libgit2.'
9+
classifiers = [
10+
'Development Status :: 5 - Production/Stable',
11+
'Intended Audience :: Developers',
12+
'Programming Language :: Python',
13+
'Programming Language :: Python :: 3',
14+
'Programming Language :: Python :: 3.9',
15+
'Programming Language :: Python :: 3.10',
16+
'Programming Language :: Python :: 3.11',
17+
'Programming Language :: Python :: 3.12',
18+
'Programming Language :: Python :: Implementation :: PyPy',
19+
'Programming Language :: Python :: Implementation :: CPython',
20+
'Topic :: Software Development :: Version Control',
21+
]
22+
dependencies = ['cffi>=1.16.0']
23+
keywords = ['git']
24+
license = {text = 'GPLv2 with linking exception'}
25+
maintainers = [{name = 'J. David Ibáñez', email = 'jdavid.ibp@gmail.com'}]
26+
readme = 'README.rst'
27+
requires-python = '>=3.9'
28+
29+
[project.urls]
30+
Homepage = 'https://github.com/libgit2/pygit2'
31+
Documentation = 'https://www.pygit2.org/'
32+
Changelog = 'https://github.com/libgit2/pygit2/blob/master/CHANGELOG.rst'
33+
Funding = 'https://github.com/sponsors/jdavid'
334

435
[tool.cibuildwheel]
536
enable = ["pypy"]

src/repository.h

100755100644
File mode changed.

0 commit comments

Comments
 (0)