Skip to content

Commit

Permalink
Merge pull request #86 from minrk/cffi-pin
Browse files Browse the repository at this point in the history
  • Loading branch information
minrk authored Oct 11, 2024
2 parents eb917b8 + d5fb85d commit febe73a
Show file tree
Hide file tree
Showing 7 changed files with 60 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .azure-pipelines/azure-pipelines-osx.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

33 changes: 29 additions & 4 deletions azure-pipelines.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions recipe/build-dolfinx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,14 @@ if [[ "$target_platform" == "linux-aarch64" || "$target_platform" == "linux-ppc6
export CMAKE_BUILD_PARALLEL_LEVEL=1
fi

# cross-compiled linux produces wrong wheel tags
# causing pip check to fail
if [[ "${target_platform}" == "linux-aarch64" ]]; then
export _PYTHON_HOST_PLATFORM=linux_aarch64
elif [[ "${target_platform}" == "linux-ppc64le" ]]; then
export _PYTHON_HOST_PLATFORM=linux_ppc64le
fi

if [[ "${CONDA_BUILD_CROSS_COMPILATION:-0}" == "1" ]]; then
# needed for cross-compile openmpi
export OPAL_CC="$CC"
Expand Down
7 changes: 6 additions & 1 deletion recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
{% set major_minor = version.rsplit(".", 1)[0] %}
{% set ufl_version = "2024.2" %}

{% set build = 1 %}
{% set build = 2 %}

{%- if scalar is not defined %}
{%- set scalar = "" %}
Expand All @@ -24,6 +24,10 @@ package:
source:
url: https://github.com/fenics/dolfinx/archive/refs/tags/v{{ version }}{{ extra }}.tar.gz
sha256: b266c74360c2590c5745d74768c04568c965b44739becca4cd6b5aa58cdbbbd1
patches:
# cffi is pinned down for a bug
# but 1.17 is needed for Windows, CPython 3.13
- unpin-cffi.patch # [win or py>=313]

build:
number: {{ build }}
Expand Down Expand Up @@ -137,6 +141,7 @@ outputs:
- python
- {{ pin_subpackage("fenics-libdolfinx", exact=True) }}
- cffi
- cffi <1.17 # [not (win or py>=313)]
- mpi4py
- numpy >=1.21
- petsc4py # [not win]
Expand Down
4 changes: 2 additions & 2 deletions recipe/test-dolfinx.bat
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
setlocal EnableDelayedExpansion
@echo on

:: pip check
:: if errorlevel 1 exit 1
pip check
if errorlevel 1 exit 1

:: test packaging
pytest -vs test_dolfinx.py
Expand Down
2 changes: 1 addition & 1 deletion recipe/test-dolfinx.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
set -ex

pip check || echo "pip check failed! if it's petsc4py objecting to numpy 1, that's ok"
pip check

TEST_DIR=$PWD

Expand Down
13 changes: 13 additions & 0 deletions recipe/unpin-cffi.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/python/pyproject.toml b/python/pyproject.toml
index a2a4eddcf6..85804a9cc9 100644
--- a/python/pyproject.toml
+++ b/python/pyproject.toml
@@ -21,7 +21,7 @@ authors = [
]
dependencies = [
"numpy>=1.21",
- "cffi<1.17", # See https://github.com/FEniCS/dolfinx/issues/3340
+ "cffi",
"mpi4py",
"fenics-basix>=0.10.0.dev0,<0.11.0",
"fenics-ffcx>=0.10.0.dev0,<0.11.0",

0 comments on commit febe73a

Please sign in to comment.