Skip to content

Commit 232b548

Browse files
authored
Merge branch 'master' into drop-py37
2 parents ada14e0 + 32d9ed7 commit 232b548

File tree

5 files changed

+63
-27
lines changed

5 files changed

+63
-27
lines changed

.github/workflows/install-edgedb.sh

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,20 @@ shopt -s nullglob
55

66
srv="https://packages.edgedb.com"
77

8-
curl -fL "${srv}/dist/x86_64-unknown-linux-musl/edgedb-cli" \
9-
> "/usr/local/bin/edgedb"
8+
curl -fL "${srv}/dist/$(uname -m)-unknown-linux-musl/edgedb-cli" \
9+
> "/usr/bin/edgedb"
1010

11-
chmod +x "/usr/local/bin/edgedb"
11+
chmod +x "/usr/bin/edgedb"
1212

13-
useradd --shell /bin/bash edgedb
13+
if command -v useradd >/dev/null 2>&1; then
14+
useradd --shell /bin/bash edgedb
15+
else
16+
# musllinux/alpine doesn't have useradd
17+
adduser -s /bin/bash -D edgedb
18+
fi
1419

1520
su -l edgedb -c "edgedb server install"
1621
ln -s $(su -l edgedb -c "edgedb server info --latest --bin-path") \
17-
"/usr/local/bin/edgedb-server"
22+
"/usr/bin/edgedb-server"
1823

1924
edgedb-server --version

.github/workflows/release.yml

Lines changed: 42 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
mkdir -p dist/
4040
echo "${VERSION}" > dist/VERSION
4141
42-
- uses: actions/upload-artifact@v2
42+
- uses: actions/upload-artifact@v3
4343
with:
4444
name: dist
4545
path: dist/
@@ -52,7 +52,7 @@ jobs:
5252
PIP_DISABLE_PIP_VERSION_CHECK: 1
5353

5454
steps:
55-
- uses: actions/checkout@v2
55+
- uses: actions/checkout@v3
5656
with:
5757
fetch-depth: 50
5858
submodules: true
@@ -65,19 +65,41 @@ jobs:
6565
pip install -U setuptools wheel pip
6666
python setup.py sdist
6767
68-
- uses: actions/upload-artifact@v2
68+
- uses: actions/upload-artifact@v3
6969
with:
7070
name: dist
7171
path: dist/*.tar.*
7272

73-
build-wheels:
73+
build-wheels-matrix:
7474
needs: validate-release-request
75+
runs-on: ubuntu-latest
76+
outputs:
77+
include: ${{ steps.set-matrix.outputs.include }}
78+
steps:
79+
- uses: actions/checkout@v3
80+
- uses: actions/setup-python@v4
81+
with:
82+
python-version: "3.x"
83+
- run: pip install cibuildwheel==2.12.3
84+
- id: set-matrix
85+
# Cannot test on Musl distros yet.
86+
run: |
87+
MATRIX_INCLUDE=$(
88+
{
89+
cibuildwheel --print-build-identifiers --platform linux --arch x86_64,aarch64 | grep cp | grep many | jq -nRc '{"only": inputs, "os": "ubuntu-latest"}' \
90+
&& cibuildwheel --print-build-identifiers --platform macos --arch x86_64,arm64 | grep cp | jq -nRc '{"only": inputs, "os": "macos-latest"}' \
91+
&& cibuildwheel --print-build-identifiers --platform windows --arch AMD64 | grep cp | jq -nRc '{"only": inputs, "os": "windows-2019"}'
92+
} | jq -sc
93+
)
94+
echo "include=$MATRIX_INCLUDE" >> $GITHUB_OUTPUT
95+
build-wheels:
96+
needs: build-wheels-matrix
7597
runs-on: ${{ matrix.os }}
98+
name: Build ${{ matrix.only }}
7699
strategy:
100+
fail-fast: false
77101
matrix:
78-
os: [ubuntu-latest, macos-latest, windows-2019]
79-
cibw_python: ["cp37-*", "cp38-*", "cp39-*", "cp310-*"]
80-
cibw_arch: ["auto64"]
102+
include: ${{ fromJson(needs.build-wheels-matrix.outputs.include) }}
81103

82104
defaults:
83105
run:
@@ -87,32 +109,32 @@ jobs:
87109
PIP_DISABLE_PIP_VERSION_CHECK: 1
88110

89111
steps:
90-
- uses: actions/checkout@v2
112+
- uses: actions/checkout@v3
91113
with:
92114
fetch-depth: 50
93115
submodules: true
94116

95117
- name: Setup WSL
96-
if: ${{ steps.release.outputs.version == 0 && matrix.os == 'windows-2019' }}
97-
uses: vampire/setup-wsl@v1
118+
if: ${{ matrix.os == 'windows-2019' }}
119+
uses: vampire/setup-wsl@v2
98120
with:
99121
wsl-shell-user: edgedb
100122
additional-packages:
101123
ca-certificates
102124
curl
103125

126+
- name: Set up QEMU
127+
if: runner.os == 'Linux'
128+
uses: docker/setup-qemu-action@v2
129+
104130
- name: Install EdgeDB
105131
uses: edgedb/setup-edgedb@v1
106132

107-
- uses: pypa/[email protected]
133+
- uses: pypa/[email protected]
134+
with:
135+
only: ${{ matrix.only }}
108136
env:
109137
CIBW_BUILD_VERBOSITY: 1
110-
CIBW_BUILD: ${{ matrix.cibw_python }}
111-
# Cannot test on Musl distros yet.
112-
CIBW_SKIP: "*-musllinux*"
113-
CIBW_ARCHS: ${{ matrix.cibw_arch }}
114-
# EdgeDB doesn't run on CentOS 6, so use 2014 as baseline
115-
CIBW_MANYLINUX_X86_64_IMAGE: "quay.io/pypa/manylinux2014_x86_64"
116138
CIBW_BEFORE_ALL_LINUX: >
117139
.github/workflows/install-edgedb.sh
118140
CIBW_TEST_EXTRAS: "test"
@@ -126,7 +148,7 @@ jobs:
126148
&& chmod -R go+rX "$(dirname $(dirname $(dirname $PY)))"
127149
&& su -l edgedb -c "EDGEDB_PYTHON_TEST_CODEGEN_CMD=$CODEGEN $PY {project}/tests/__init__.py"
128150
129-
- uses: actions/upload-artifact@v2
151+
- uses: actions/upload-artifact@v3
130152
with:
131153
name: dist
132154
path: wheelhouse/*.whl
@@ -136,12 +158,12 @@ jobs:
136158
runs-on: ubuntu-latest
137159

138160
steps:
139-
- uses: actions/checkout@v2
161+
- uses: actions/checkout@v3
140162
with:
141163
fetch-depth: 5
142164
submodules: false
143165

144-
- uses: actions/download-artifact@v2
166+
- uses: actions/download-artifact@v3
145167
with:
146168
name: dist
147169
path: dist/

edgedb/_testbase.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ def _start_cluster(*, cleanup_atexit=True):
135135
stderr=subprocess.STDOUT,
136136
)
137137

138-
for _ in range(250):
138+
for _ in range(600):
139139
try:
140140
with open(status_file, 'rb') as f:
141141
for line in f:
@@ -171,6 +171,11 @@ def _start_cluster(*, cleanup_atexit=True):
171171

172172
client = edgedb.create_client(password='test', **con_args)
173173
client.ensure_connected()
174+
client.execute("""
175+
# Set session_idle_transaction_timeout to 5 minutes.
176+
CONFIGURE INSTANCE SET session_idle_transaction_timeout :=
177+
<duration>'5 minutes';
178+
""")
174179
_default_cluster = {
175180
'proc': p,
176181
'client': client,

pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[build-system]
2+
requires = ["setuptools"]
3+
build-backend = "setuptools.build_meta"

setup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ def finalize_options(self):
285285
author_email='[email protected]',
286286
url='https://github.com/edgedb/edgedb-python',
287287
license='Apache License, Version 2.0',
288-
packages=['edgedb'],
288+
packages=setuptools.find_packages(),
289289
provides=['edgedb'],
290290
zip_safe=False,
291291
include_package_data=True,
@@ -335,6 +335,7 @@ def finalize_options(self):
335335
],
336336
cmdclass={'build_ext': build_ext},
337337
test_suite='tests.suite',
338+
python_requires=">=3.7",
338339
install_requires=[
339340
'certifi>=2021.5.30; platform_system == "Windows"',
340341
],

0 commit comments

Comments
 (0)