← recipes

Commit 8a50430

0
plików
+0
dodanych
-0
usuniętych
@@ -10,21 +10,33 @@ depends:
10 10 - python
11 11 - protobuf
12 12 makedepends:
13 +- cmake
14 +- ninja
13 15 - python-setuptools
16 +- python-build
17 +- python-installer
18 +- python-wheel
14 19 source:
15 20 - 'https://github.com/protocolbuffers/protobuf/archive/refs/tags/v${pkgver}.tar.gz'
16 21 sha256sums:
17 -- 7a7baff8207a57f3fe5c233d432a09eba67bdfb55a3145839d0817cae8e807a4
22 +- SKIP
18 23 build: |
19 - cd protobuf-${pkgver}/python
24 + cd protobuf-${pkgver}
20 25
21 - # Wymuszenie użycia rozszerzenia C++ dla lepszej wydajności
22 - export PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=cpp
26 + # Konfiguracja CMake z włączeniem wygenerowania modułu python
27 + cmake -B build -G Ninja \
28 + -DCMAKE_BUILD_TYPE=Release \
29 + -DCMAKE_INSTALL_PREFIX=/usr \
30 + -Dprotobuf_BUILD_TESTS=OFF \
31 + -Dprotobuf_WITH_ZLIB=ON
23 32
24 - # Budowanie i bezpośrednia instalacja przez setuptools do PKGDIR
25 - python setup.py build
26 - python setup.py install --root="${PKGDIR}" --optimize=1
33 + cmake --build build
34 +
35 + # Instalacja bindingów Pythona wygenerowanych w drzewie build
36 + cd python
37 + python -m build --wheel --no-isolation
38 + python -m installer --destdir="${PKGDIR}" dist/*.whl
27 39
28 40 install -Dm644 ../LICENSE ${PKGDIR}/usr/share/licenses/${pkgname}/LICENSE
29 41 package: |
30 - true
42 + true