Skip to content

Commit b344ce5

Browse files
committed
Pull in laggykiller's build changes.
1 parent e797c1e commit b344ce5

12 files changed

Lines changed: 369 additions & 286 deletions

File tree

.github/workflows/wheels.yaml

Lines changed: 159 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,159 @@
1+
name: Build wheels
2+
on:
3+
push:
4+
tags:
5+
- "[0-9]+.[0-9]+.[0-9]+"
6+
- "[0-9]+.[0-9]+.[0-9]+-**"
7+
8+
jobs:
9+
sdist:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
14+
- uses: actions/setup-python@v5
15+
with:
16+
python-version: "3.12"
17+
18+
- name: Install build tools
19+
run: |
20+
python -m pip install -U pip
21+
pip install setuptools
22+
23+
- name: Build sdist
24+
run: |
25+
python setup.py sdist
26+
27+
- uses: actions/upload-artifact@v4
28+
with:
29+
name: sdist
30+
path: dist/sqlcipher3*.tar.gz
31+
32+
wheels:
33+
runs-on: ${{ matrix.os }}
34+
strategy:
35+
matrix:
36+
include:
37+
- os: ubuntu-latest
38+
cibw_archs: x86_64
39+
cibw_build: "cp*-manylinux_*"
40+
cibw_skip: ""
41+
compile_target: x86_64
42+
out: x86_64-manylinux
43+
- os: ubuntu-latest
44+
cibw_archs: x86_64
45+
cibw_build: "cp*-musllinux_*"
46+
cibw_skip: ""
47+
compile_target: x86_64
48+
out: x86_64-musllinux
49+
- os: ubuntu-24.04-arm
50+
cibw_archs: aarch64
51+
cibw_build: "cp*-manylinux_*"
52+
cibw_skip: ""
53+
compile_target: armv8
54+
out: armv8-manylinux
55+
- os: ubuntu-24.04-arm
56+
cibw_archs: aarch64
57+
cibw_build: "cp*-musllinux_*"
58+
cibw_skip: ""
59+
compile_target: armv8
60+
out: armv8-musllinux
61+
- os: ubuntu-latest
62+
cibw_archs: i686
63+
cibw_build: "cp*-manylinux_*"
64+
cibw_skip: ""
65+
compile_target: x86
66+
out: x86-manylinux
67+
- os: windows-latest
68+
cibw_archs: AMD64
69+
cibw_build: "cp*"
70+
cibw_skip: ""
71+
compile_target: x86_64
72+
out: x86_64-windows
73+
- os: windows-latest
74+
cibw_archs: x86
75+
cibw_build: "cp*"
76+
cibw_skip: ""
77+
compile_target: x86
78+
out: x86-windows
79+
- os: windows-latest
80+
cibw_archs: ARM64
81+
cibw_build: "cp*"
82+
cibw_skip: ""
83+
compile_target: armv8
84+
out: armv8-windows
85+
- os: macos-15-intel
86+
cibw_archs: x86_64
87+
cibw_build: "cp*"
88+
cibw_skip: ""
89+
compile_target: x86_64
90+
out: x86_64-macos
91+
- os: macos-latest
92+
cibw_archs: arm64
93+
cibw_build: "cp*"
94+
cibw_skip: ""
95+
compile_target: armv8
96+
out: armv8-macos
97+
- os: macos-latest
98+
cibw_archs: universal2
99+
cibw_build: "cp*"
100+
cibw_skip: ""
101+
compile_target: universal2
102+
out: universal2-macos
103+
104+
steps:
105+
- uses: actions/checkout@v4
106+
107+
- uses: actions/setup-python@v5
108+
with:
109+
python-version: "3.12"
110+
111+
- name: Set up QEMU
112+
if: runner.os == 'Linux'
113+
uses: docker/setup-qemu-action@v3
114+
with:
115+
platforms: all
116+
# This should be temporary
117+
# xref https://github.com/docker/setup-qemu-action/issues/188
118+
# xref https://github.com/tonistiigi/binfmt/issues/215
119+
image: tonistiigi/binfmt:qemu-v8.1.5
120+
121+
- name: Build wheels for ${{ matrix.os }} ${{ matrix.cibw_archs }} ${{ matrix.cibw_build }}
122+
uses: pypa/cibuildwheel@v3.3.0
123+
env:
124+
CIBW_BUILD_FRONTEND: build
125+
CIBW_BUILD: ${{ matrix.cibw_build }}
126+
CIBW_SKIP: ${{ matrix.cibw_skip }}
127+
CIBW_ARCHS: ${{ matrix.cibw_archs }}
128+
CIBW_ENVIRONMENT: SQLCIPHER3_COMPILE_TARGET=${{ matrix.compile_target }}
129+
CIBW_BEFORE_ALL_LINUX: command -v yum >/dev/null && yum -y install perl-core || command -v apk >/dev/null && apk add perl || true
130+
CIBW_TEST_COMMAND: >
131+
mv {project}/sqlcipher3 {project}/sqlcipher3_ &&
132+
python {project}/tests/ &&
133+
mv {project}/sqlcipher3_ {project}/sqlcipher3
134+
135+
- uses: actions/upload-artifact@v4
136+
with:
137+
name: wheels-${{ matrix.out }}
138+
path: wheelhouse/*.whl
139+
140+
publish:
141+
needs: [sdist, wheels]
142+
runs-on: ubuntu-latest
143+
steps:
144+
- uses: actions/download-artifact@v4
145+
with:
146+
pattern: wheels-*
147+
path: dist
148+
merge-multiple: true
149+
150+
- uses: actions/download-artifact@v4
151+
with:
152+
name: sdist
153+
path: dist
154+
merge-multiple: true
155+
156+
- uses: pypa/gh-action-pypi-publish@release/v1
157+
with:
158+
user: __token__
159+
password: ${{ secrets.PYPI_API_TOKEN }}

MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,6 @@ include src/*.h
66
include src/*.c
77
include vendor/*.h
88
include vendor/*.c
9+
include conanfile.py
910

1011
global-exclude *~ *.pyc

build-scripts/README

Lines changed: 0 additions & 16 deletions
This file was deleted.

build-scripts/_build_wheels.sh

Lines changed: 0 additions & 92 deletions
This file was deleted.

build-scripts/build.sh

Lines changed: 0 additions & 13 deletions
This file was deleted.

build-scripts/cleanup.sh

Lines changed: 0 additions & 8 deletions
This file was deleted.

conanfile.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
from conan import ConanFile
2+
3+
class OpensslRecipe(ConanFile):
4+
def requirements(self):
5+
self.requires('openssl/3.6.0')

pyproject.toml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
[build-system]
2+
requires = [
3+
"setuptools>=69",
4+
"conan>=2.0",
5+
"wheel"
6+
]
7+
build-backend = "setuptools.build_meta"
8+
9+
[project]
10+
name = "sqlcipher3"
11+
version = "0.6.1"
12+
description = "DB-API 2.0 interface for SQLCipher 4.x"
13+
readme = "README.md"
14+
requires-python = ">=3.9"
15+
authors = [
16+
{ name = "Charles Leifer", email = "coleifer@gmail.com" },
17+
{ name = "laggykiller", email = "chaudominic2@gmail.com" }
18+
]
19+
license = "MIT"
20+
classifiers = [
21+
"Programming Language :: Python",
22+
"Programming Language :: Python :: 3",
23+
"Programming Language :: C",
24+
"Topic :: Database",
25+
"Topic :: Database :: Database Engines/Servers",
26+
"Topic :: Database :: Front-Ends",
27+
"Topic :: Software Development",
28+
"Topic :: Software Development :: Libraries :: Python Modules",
29+
]
30+
31+
[project.urls]
32+
Repository = "https://github.com/coleifer/sqlcipher3"
33+
34+
[tool.setuptools]
35+
package-dir = { "sqlcipher3" = "sqlcipher3" }
36+
37+
[tool.cibuildwheel]
38+
build = "cp39-* cp310-* cp311-* cp312-* cp313-* cp314-*"
39+
skip = "pp* *-musllinux_i686"

setup.cfg

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)