libggml-python 0.1.0__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.
@@ -0,0 +1,75 @@
1
+ name: Build and Publish Python Wheels
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ push:
6
+ tags:
7
+ - 'v*'
8
+
9
+ jobs:
10
+ build_wheels:
11
+ name: Build wheels on ${{ matrix.build.os }}
12
+ runs-on: ${{ matrix.build.os }}
13
+ strategy:
14
+ fail-fast: false
15
+ max-parallel: 1
16
+ matrix:
17
+ build:
18
+ - os: ubuntu-24.04
19
+ cmake: ""
20
+ - os: macos-15
21
+ cmake: ""
22
+
23
+ steps:
24
+ - name: checkout
25
+ uses: actions/checkout@v4
26
+ with:
27
+ submodules: "recursive"
28
+
29
+ - name: build wheels
30
+ env:
31
+ CMAKE_ARGS: ${{ matrix.build.cmake }}
32
+ CIBW_BUILD: cp313-*
33
+ CIBW_ENVIRONMENT_PASS_LINUX: CMAKE_ARGS
34
+ CIBW_REPAIR_WHEEL_COMMAND_MACOS: ""
35
+ CIBW_REPAIR_WHEEL_COMMAND_LINUX: "auditwheel repair --exclude libggml-* -w {dest_dir} {wheel}"
36
+ uses: pypa/cibuildwheel@v3.0.1
37
+
38
+ - name: publish wheels
39
+ uses: actions/upload-artifact@v4
40
+ with:
41
+ name: cibw-wheels-${{ matrix.build.os }}-${{ strategy.job-index }}
42
+ path: ./wheelhouse/*.whl
43
+
44
+ build_sdist:
45
+ name: Build source distribution
46
+ runs-on: ubuntu-24.04
47
+ steps:
48
+ - uses: actions/checkout@v4
49
+
50
+ - name: Build sdist
51
+ run: pipx run build --sdist
52
+
53
+ - uses: actions/upload-artifact@v4
54
+ with:
55
+ name: cibw-sdist
56
+ path: dist/*.tar.gz
57
+
58
+ upload_pypi:
59
+ needs: [build_wheels, build_sdist]
60
+ runs-on: ubuntu-24.04
61
+ environment: pypi
62
+ permissions:
63
+ id-token: write
64
+ if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
65
+ steps:
66
+ - uses: actions/download-artifact@v4
67
+ with:
68
+ # unpacks all CIBW artifacts into dist/
69
+ pattern: cibw-*
70
+ path: dist
71
+ merge-multiple: true
72
+
73
+ - uses: pypa/gh-action-pypi-publish@release/v1
74
+ # with:
75
+ # repository-url: https://test.pypi.org/legacy/
@@ -0,0 +1,242 @@
1
+ # Created by https://www.toptal.com/developers/gitignore/api/macos,python,c++
2
+ # Edit at https://www.toptal.com/developers/gitignore?templates=macos,python,c++
3
+
4
+ ### C++ ###
5
+ # Prerequisites
6
+ *.d
7
+
8
+ # Compiled Object files
9
+ *.slo
10
+ *.lo
11
+ *.o
12
+ *.obj
13
+
14
+ # Precompiled Headers
15
+ *.gch
16
+ *.pch
17
+
18
+ # Compiled Dynamic libraries
19
+ *.so
20
+ *.dylib
21
+ *.dll
22
+
23
+ # Fortran module files
24
+ *.mod
25
+ *.smod
26
+
27
+ # Compiled Static libraries
28
+ *.lai
29
+ *.la
30
+ *.a
31
+ *.lib
32
+
33
+ # Executables
34
+ *.exe
35
+ *.out
36
+ *.app
37
+
38
+ ### macOS ###
39
+ # General
40
+ .DS_Store
41
+ .AppleDouble
42
+ .LSOverride
43
+
44
+ # Icon must end with two \r
45
+ Icon
46
+
47
+
48
+ # Thumbnails
49
+ ._*
50
+
51
+ # Files that might appear in the root of a volume
52
+ .DocumentRevisions-V100
53
+ .fseventsd
54
+ .Spotlight-V100
55
+ .TemporaryItems
56
+ .Trashes
57
+ .VolumeIcon.icns
58
+ .com.apple.timemachine.donotpresent
59
+
60
+ # Directories potentially created on remote AFP share
61
+ .AppleDB
62
+ .AppleDesktop
63
+ Network Trash Folder
64
+ Temporary Items
65
+ .apdisk
66
+
67
+ ### macOS Patch ###
68
+ # iCloud generated files
69
+ *.icloud
70
+
71
+ ### Python ###
72
+ # Byte-compiled / optimized / DLL files
73
+ __pycache__/
74
+ *.py[cod]
75
+ *$py.class
76
+
77
+ # C extensions
78
+
79
+ # Distribution / packaging
80
+ .Python
81
+ build/
82
+ develop-eggs/
83
+ dist/
84
+ downloads/
85
+ eggs/
86
+ .eggs/
87
+ lib/
88
+ lib64/
89
+ parts/
90
+ sdist/
91
+ var/
92
+ wheels/
93
+ share/python-wheels/
94
+ *.egg-info/
95
+ .installed.cfg
96
+ *.egg
97
+ MANIFEST
98
+
99
+ # PyInstaller
100
+ # Usually these files are written by a python script from a template
101
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
102
+ *.manifest
103
+ *.spec
104
+
105
+ # Installer logs
106
+ pip-log.txt
107
+ pip-delete-this-directory.txt
108
+
109
+ # Unit test / coverage reports
110
+ htmlcov/
111
+ .tox/
112
+ .nox/
113
+ .coverage
114
+ .coverage.*
115
+ .cache
116
+ nosetests.xml
117
+ coverage.xml
118
+ *.cover
119
+ *.py,cover
120
+ .hypothesis/
121
+ .pytest_cache/
122
+ cover/
123
+
124
+ # Translations
125
+ *.mo
126
+ *.pot
127
+
128
+ # Django stuff:
129
+ *.log
130
+ local_settings.py
131
+ db.sqlite3
132
+ db.sqlite3-journal
133
+
134
+ # Flask stuff:
135
+ instance/
136
+ .webassets-cache
137
+
138
+ # Scrapy stuff:
139
+ .scrapy
140
+
141
+ # Sphinx documentation
142
+ docs/_build/
143
+
144
+ # PyBuilder
145
+ .pybuilder/
146
+ target/
147
+
148
+ # Jupyter Notebook
149
+ .ipynb_checkpoints
150
+
151
+ # IPython
152
+ profile_default/
153
+ ipython_config.py
154
+
155
+ # pyenv
156
+ # For a library or package, you might want to ignore these files since the code is
157
+ # intended to run in multiple environments; otherwise, check them in:
158
+ # .python-version
159
+
160
+ # pipenv
161
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
162
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
163
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
164
+ # install all needed dependencies.
165
+ #Pipfile.lock
166
+
167
+ # poetry
168
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
169
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
170
+ # commonly ignored for libraries.
171
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
172
+ #poetry.lock
173
+
174
+ # pdm
175
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
176
+ #pdm.lock
177
+ # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
178
+ # in version control.
179
+ # https://pdm.fming.dev/#use-with-ide
180
+ .pdm.toml
181
+
182
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
183
+ __pypackages__/
184
+
185
+ # Celery stuff
186
+ celerybeat-schedule
187
+ celerybeat.pid
188
+
189
+ # SageMath parsed files
190
+ *.sage.py
191
+
192
+ # Environments
193
+ .env
194
+ .venv
195
+ env/
196
+ venv/
197
+ ENV/
198
+ env.bak/
199
+ venv.bak/
200
+
201
+ # Spyder project settings
202
+ .spyderproject
203
+ .spyproject
204
+
205
+ # Rope project settings
206
+ .ropeproject
207
+
208
+ # mkdocs documentation
209
+ /site
210
+
211
+ # mypy
212
+ .mypy_cache/
213
+ .dmypy.json
214
+ dmypy.json
215
+
216
+ # Pyre type checker
217
+ .pyre/
218
+
219
+ # pytype static type analyzer
220
+ .pytype/
221
+
222
+ # Cython debug symbols
223
+ cython_debug/
224
+
225
+ # PyCharm
226
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
227
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
228
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
229
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
230
+ #.idea/
231
+
232
+ ### Python Patch ###
233
+ # Poetry local configuration file - https://python-poetry.org/docs/configuration/#local-configuration
234
+ poetry.toml
235
+
236
+ # ruff
237
+ .ruff_cache/
238
+
239
+ # LSP config files
240
+ pyrightconfig.json
241
+
242
+ # End of https://www.toptal.com/developers/gitignore/api/macos,python,c++
@@ -0,0 +1,4 @@
1
+ [submodule "ggml"]
2
+ path = ggml
3
+ url = https://github.com/ggml-org/ggml
4
+ branch = master
@@ -0,0 +1,4 @@
1
+ cmake_minimum_required(VERSION 3.15)
2
+ project(libggml LANGUAGES C CXX)
3
+
4
+ add_subdirectory(ggml)
@@ -0,0 +1,15 @@
1
+ Metadata-Version: 2.4
2
+ Name: libggml-python
3
+ Version: 0.1.0
4
+ Summary: Prebuilt ggml libraries
5
+ Author: benniekiss
6
+ License-Expression: MIT
7
+ Project-URL: Source, https://github.com/benniekiss/ggml-python
8
+ Project-URL: Tracker, https://github.com/benniekiss/ggml-python/issues
9
+ Project-URL: ggml, https://github.com/ggml-org/ggml
10
+ Requires-Python: >=3.10
11
+ Description-Content-Type: text/markdown
12
+
13
+ # libggml-python
14
+
15
+ Python package containing prebuilt [ggml](https://github.com/ggml-org/ggml) libraries, including GPU-accelerated builds.
@@ -0,0 +1,3 @@
1
+ # libggml-python
2
+
3
+ Python package containing prebuilt [ggml](https://github.com/ggml-org/ggml) libraries, including GPU-accelerated builds.
@@ -0,0 +1,34 @@
1
+ [project]
2
+ name = "libggml-python"
3
+ version = "0.1.0"
4
+ description = "Prebuilt ggml libraries"
5
+ authors = [
6
+ { name = "benniekiss" }
7
+ ]
8
+ readme = "README.md"
9
+ license = "MIT"
10
+ requires-python = ">=3.10"
11
+
12
+ [project.urls]
13
+ Source = "https://github.com/benniekiss/ggml-python"
14
+ Tracker = "https://github.com/benniekiss/ggml-python/issues"
15
+ ggml = "https://github.com/ggml-org/ggml"
16
+
17
+ [build-system]
18
+ requires = [
19
+ "scikit-build-core>=0.11.5",
20
+ ]
21
+ build-backend = "scikit_build_core.build"
22
+
23
+ [tool.scikit-build]
24
+ minimum-version = "build-system.requires"
25
+ cmake.build-type = "Release"
26
+ wheel.packages = ["src/libggml"]
27
+ wheel.install-dir = "libggml"
28
+ sdist.include = ["ggml/"]
29
+
30
+ [tool.scikit-build.cmake.define]
31
+ CMAKE_RUNTIME_OUTPUT_DIRECTORY = "build"
32
+
33
+ [project.entry-points."cmake.prefix"]
34
+ ggml = "libggml"
File without changes