Skip to content

Commit 5c316ec

Browse files
committed
Do not use Cython 3 on build deps
Cython 3 generates code which fails on Python that was built with assertions enabled. This commit adds the upper bound version until this issue has been fixed. CI has been updated to test out this specific scenario. Signed-off-by: Jordan Borean <jborean93@gmail.com>
1 parent 3a14a03 commit 5c316ec

File tree

3 files changed

+42
-2
lines changed

3 files changed

+42
-2
lines changed

.github/workflows/ci.yml

+38
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,43 @@ jobs:
134134
path: ./wheelhouse/*.whl
135135
name: artifact
136136

137+
# To catch issues like this https://github.com/pythongssapi/python-gssapi/issues/327
138+
assertion_build:
139+
needs:
140+
- build_sdist
141+
142+
runs-on: ubuntu-latest
143+
steps:
144+
- name: Download gssapi sdist
145+
uses: actions/download-artifact@v3
146+
with:
147+
name: artifact
148+
path: ./dist
149+
150+
- name: Compile Python with assertions
151+
shell: bash
152+
run: |
153+
PYTHON_VERSION="3.11.5"
154+
wget --quiet "https://www.python.org/ftp/python/${PYTHON_VERSION}/Python-${PYTHON_VERSION}.tar.xz"
155+
tar xf "Python-${PYTHON_VERSION}.tar.xz"
156+
cd "Python-${PYTHON_VERSION}/"
157+
./configure --with-assertions --prefix "${PWD}/../Python-${PYTHON_VERSION}-build"
158+
make
159+
make install
160+
cd ..
161+
162+
sudo apt-get update
163+
DEBIAN_FRONTEND=noninteractive sudo apt-get -y install krb5-user libkrb5-dev
164+
165+
GSSAPI_VER="$( find ./dist -type f -name 'gssapi-*.tar.gz' -printf "%f\n" | sed -n 's/gssapi-\(.*\)\.tar\.gz/\1/p' )"
166+
167+
PATH="${PWD}/Python-${PYTHON_VERSION}-build/bin:${PATH}"
168+
python3 -m pip install gssapi=="${GSSAPI_VER}" \
169+
--find-links "file://${PWD}/dist" \
170+
--verbose
171+
172+
python3 -c "import gssapi"
173+
137174
linux:
138175
needs:
139176
- build_sdist
@@ -257,6 +294,7 @@ jobs:
257294
name: publish
258295

259296
needs:
297+
- assertion_build
260298
- linux
261299
- macos
262300
- windows

pyproject.toml

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
[build-system]
22
requires = [
3-
"Cython >= 0.29.29, < 4.0.0", # 0.29.29 includes fixes for Python 3.11
3+
# 0.29.29 includes fixes for Python 3.11
4+
# Cannot use 3 until https://github.com/cython/cython/issues/5665 is fixed
5+
"Cython >= 0.29.29, < 3.0.0",
46
"setuptools >= 40.6.0", # Start of PEP 517 support for setuptools
57
]
68
build-backend = "setuptools.build_meta"

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ def gssapi_modules(lst):
274274

275275
setup(
276276
name='gssapi',
277-
version='1.8.3',
277+
version='1.8.4',
278278
author='The Python GSSAPI Team',
279279
author_email='jborean93@gmail.com',
280280
packages=['gssapi', 'gssapi.raw', 'gssapi.raw._enum_extensions',

0 commit comments

Comments
 (0)