Skip to content

Commit

Permalink
try debug anaconda windows build according to scipy
Browse files Browse the repository at this point in the history
  • Loading branch information
jmrohwer committed Dec 12, 2023
1 parent 2aa32c5 commit d679421
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 12 deletions.
38 changes: 38 additions & 0 deletions packaging/conda/bld.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
@echo on
setlocal enabledelayedexpansion

mkdir builddir

:: check if clang-cl is on path as required
clang-cl.exe --version
if %ERRORLEVEL% neq 0 exit 1

:: set compilers to clang-cl
set "CC=clang-cl"

:: flang 17 still uses "temporary" name
set "FC=flang-new"

:: need to read clang version for path to compiler-rt
FOR /F "tokens=* USEBACKQ" %%F IN (`clang.exe -dumpversion`) DO (
SET "CLANG_VER=%%F"
)

:: attempt to match flags for flang as we set them for clang-on-win, see
:: https://github.com/conda-forge/clang-win-activation-feedstock/blob/main/recipe/activate-clang_win-64.sh
:: however, -Xflang --dependent-lib=msvcrt currently fails as an unrecognized option, see also
:: https://github.com/llvm/llvm-project/issues/63741
set "FFLAGS=-D_CRT_SECURE_NO_WARNINGS -D_MT -D_DLL --target=x86_64-pc-windows-msvc -nostdlib"
set "LDFLAGS=--target=x86_64-pc-windows-msvc -nostdlib -Xclang --dependent-lib=msvcrt -fuse-ld=lld"
set "LDFLAGS=%LDFLAGS% -Wl,-defaultlib:%BUILD_PREFIX%/Library/lib/clang/!CLANG_VER:~0,2!/lib/windows/clang_rt.builtins-x86_64.lib"

:: see explanation here:
:: https://github.com/conda-forge/scipy-feedstock/pull/253#issuecomment-1732578945
set "MESON_RSP_THRESHOLD=320000"

:: -wnx flags mean: --wheel --no-isolation --skip-dependency-check
%PYTHON% -m pip install --no-deps --no-build-isolation --ignore-installed ^
--config-settings=builddir=builddir ^
--config-settings=setup-args=-Dfortran_std=none ^
.
if %ERRORLEVEL% neq 0 (type builddir\meson-logs\meson-log.txt && exit 1)
12 changes: 6 additions & 6 deletions packaging/conda/conda_build_config.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
python:
- 3.9
- 3.10
# - 3.9
# - 3.10
- 3.11
# - 3.12
# - 3.12
numpy:
# - 1.23
# - 1.23
- 1.23
- 1.23
- 1.23
# - 1.26
# - 1.26
zip_keys:
- python
- numpy
15 changes: 9 additions & 6 deletions packaging/conda/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,25 @@ source:
build:
number: 0
include_recipe: True
script: "python -m pip install --no-deps --ignore-installed . -vv"
# script: "python -m pip install --no-deps --ignore-installed . -vv"

requirements:
build:
- {{ compiler('c') }}
- {{ compiler('cxx') }}
- {{ compiler('fortran') }} # [unix]
- m2w64-gcc-fortran # [win]
- clang # [win]
- flang # [win]
- lld # [win]
host:
- compiler-rt # [win]
- python {{ python }}
- setuptools
- numpy {{ numpy }}
- meson>=1.2.3
- meson-python
- ninja
- scipy
- matplotlib
- pip
run:
- python {{ python }}
- setuptools
Expand All @@ -43,9 +46,9 @@ test:
- python -s -c "import pysces; pysces.test(3)"

about:
home: http://pysces.sourceforge.net
home: http://pysces.github.io
license: BSD
licence_file: LICENCE.txt
license_file: LICENSE.txt
summary: Python Simulator for Cellular Systems

extra:
Expand Down

0 comments on commit d679421

Please sign in to comment.