diff --git a/142.patch b/142.patch new file mode 100644 index 0000000..0f7d4b1 --- /dev/null +++ b/142.patch @@ -0,0 +1,128 @@ +From f14059f532d6b5c6b505d9803b36a77b75546b18 Mon Sep 17 00:00:00 2001 +From: Matthieu Dartiailh +Date: Fri, 3 Jun 2022 09:11:18 +0200 +Subject: [PATCH 1/3] py: use nullptr instead of 0 in PyTuple_SET_ITEM + +--- + py/src/symbolics.h | 2 +- + py/src/util.h | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/py/src/symbolics.h b/py/src/symbolics.h +index 69ea540..1558063 100644 +--- a/py/src/symbolics.h ++++ b/py/src/symbolics.h +@@ -123,7 +123,7 @@ PyObject* BinaryMul::operator()( Expression* first, double second ) + return 0; + Py_ssize_t end = PyTuple_GET_SIZE( first->terms ); + for( Py_ssize_t i = 0; i < end; ++i ) // memset 0 for safe error return +- PyTuple_SET_ITEM( terms.get(), i, 0 ); ++ PyTuple_SET_ITEM( terms.get(), i, nullptr ); + for( Py_ssize_t i = 0; i < end; ++i ) + { + PyObject* item = PyTuple_GET_ITEM( first->terms, i ); +diff --git a/py/src/util.h b/py/src/util.h +index 4b00fa7..1f40dc9 100644 +--- a/py/src/util.h ++++ b/py/src/util.h +@@ -117,7 +117,7 @@ make_terms( const std::map& coeffs ) + return 0; + Py_ssize_t size = PyTuple_GET_SIZE( terms.get() ); + for( Py_ssize_t i = 0; i < size; ++i ) // zero tuple for safe early return +- PyTuple_SET_ITEM( terms.get(), i, 0 ); ++ PyTuple_SET_ITEM( terms.get(), i, nullptr ); + Py_ssize_t i = 0; + iter_t it = coeffs.begin(); + iter_t end = coeffs.end(); + +From 389639bbd3c578c64cc5bef88892174fee63019a Mon Sep 17 00:00:00 2001 +From: Matthieu Dartiailh +Date: Fri, 3 Jun 2022 09:14:32 +0200 +Subject: [PATCH 2/3] cis: use setup-python@v3 + +--- + .github/workflows/ci.yml | 2 +- + .github/workflows/docs.yml | 2 +- + .github/workflows/release.yml | 4 ++-- + 3 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml +index cfa3a02..d7608f4 100644 +--- a/.github/workflows/ci.yml ++++ b/.github/workflows/ci.yml +@@ -30,7 +30,7 @@ jobs: + git fetch --prune --unshallow + git fetch --depth=1 origin +refs/tags/*:refs/tags/* + - name: Set up Python ${{ matrix.python-version }} +- uses: actions/setup-python@v2 ++ uses: actions/setup-python@v3 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies +diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml +index e3c6b9d..59fb628 100644 +--- a/.github/workflows/docs.yml ++++ b/.github/workflows/docs.yml +@@ -27,7 +27,7 @@ jobs: + git fetch --prune --unshallow + git fetch --depth=1 origin +refs/tags/*:refs/tags/* + - name: Set up Python +- uses: actions/setup-python@v2 ++ uses: actions/setup-python@v3 + - name: Install dependencies + run: | + python -m pip install --upgrade pip +diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml +index e496600..6274263 100644 +--- a/.github/workflows/release.yml ++++ b/.github/workflows/release.yml +@@ -19,7 +19,7 @@ jobs: + git fetch --prune --unshallow + git fetch --depth=1 origin +refs/tags/*:refs/tags/* + - name: Setup Python +- uses: actions/setup-python@v2 ++ uses: actions/setup-python@v3 + with: + python-version: '3.10' + - name: Build sdist +@@ -77,7 +77,7 @@ jobs: + git fetch --prune --unshallow + git fetch --depth=1 origin +refs/tags/*:refs/tags/* + - name: Setup Python +- uses: actions/setup-python@v2 ++ uses: actions/setup-python@v3 + with: + python-version: '3.9' + - name: Set up QEMU + +From 1787c6556a8d6b597631aac91608a9d66ed1af1d Mon Sep 17 00:00:00 2001 +From: Matthieu Dartiailh +Date: Fri, 3 Jun 2022 09:14:50 +0200 +Subject: [PATCH 3/3] cis: start testing on 3.11 and test on PyPI 3.8 + +--- + .github/workflows/ci.yml | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml +index d7608f4..dce31bd 100644 +--- a/.github/workflows/ci.yml ++++ b/.github/workflows/ci.yml +@@ -81,7 +81,7 @@ jobs: + strategy: + matrix: + os: [ubuntu-latest, windows-latest, macos-latest] +- python-version: ['3.7', '3.8', '3.9', '3.10', pypy-3.7] ++ python-version: ['3.7', '3.8', '3.9', '3.10', 'pypy-3.7', 'pypy-3.8', '3.11.0-beta - 3.11.0'] + steps: + - uses: actions/checkout@v2 + - name: Get history and tags for SCM versioning to work +@@ -89,7 +89,7 @@ jobs: + git fetch --prune --unshallow + git fetch --depth=1 origin +refs/tags/*:refs/tags/* + - name: Set up Python ${{ matrix.python-version }} +- uses: actions/setup-python@v2 ++ uses: actions/setup-python@v3 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies diff --git a/python-kiwisolver.spec b/python-kiwisolver.spec index 09ccded..8a2b61e 100644 --- a/python-kiwisolver.spec +++ b/python-kiwisolver.spec @@ -9,6 +9,9 @@ License: BSD URL: https://github.com/nucleic/kiwi Source0: %pypi_source +# Upstream patch for Python 3.11 compatibility +Patch: https://github.com/nucleic/kiwi/pull/142.patch + %global _description \ Kiwi is an efficient C++ implementation of the Cassowary constraint solving \ algorithm. Kiwi is an implementation of the algorithm based on the seminal \ @@ -27,7 +30,7 @@ Summary: %{summary} %description -n python3-%{srcname} %{_description} %prep -%autosetup -n %{srcname}-%{version} +%autosetup -p1 -n %{srcname}-%{version} %generate_buildrequires %pyproject_buildrequires