Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@ if (CMAKE_VERSION VERSION_GREATER "3.11.99")
cmake_policy(SET CMP0074 NEW)
endif()

project(slycot VERSION ${SLYCOT_VERSION})
project(slycot VERSION ${SLYCOT_VERSION} LANGUAGES NONE)

# Fortran detection fails on windows, use the CMAKE_C_SIMULATE flag to
# force success
if(WIN32)
set(CMAKE_Fortran_SIMULATE_VERSION 19.0)
# set(CMAKE_Fortran_COMPILER_FORCED TRUE)
# set(CMAKE_C_COMPILER_VERSION 19.0)
endif()

# this does not seem to work, maybe scikit-build's doing? the cxx compiler is
# still tested
enable_language(C)
enable_language(Fortran)

Expand Down
70 changes: 6 additions & 64 deletions conda-recipe-openblas/bld.bat
Original file line number Diff line number Diff line change
Expand Up @@ -2,71 +2,13 @@
cd %RECIPE_DIR%
cd ..

:: indicating fortran compiler is essential
set FC=%BUILD_PREFIX%\Library\bin\flang.exe
:: Clear old build attempts
RD /S /Q _skbuild

:: The batch file created by conda-build sets a load of environment variables
:: Building worked fine without conda; apparently one or more of these
:: variables produce test & link failures. Resetting most of these here
set ARCH=
set BUILD=
set BUILD_PREFIX=
set CMAKE_GENERATOR=
set CommandPromptType=
set CPU_COUNT=
set DISTUTILS_USE_SDK=
set folder=
set cpu_optimization_target=
set fortran_compiler=
set Framework40Version=
set FrameworkDir=
set FrameworkDIR64=
set FrameworkVersion=
set FrameworkVersion64=
set ignore_build_only_deps=
set CFLAGS=
set CXXFLAGS=
set cxx_compiler=
set c_compiler=
set INCLUDE=
set LDFLAGS_SHARED=
set LIBPATH=
set LIB=;%LIB%
set MSSdk=
set MSYS2_ARG_CONV_EXCL=
set MSYS2_ENV_CONV_EXCL=
set NETFSXDIR=
set PIP_IGNORE_INSTALLED=
set platform=
set WindowsLibPath=
set WindowsSdkDir=
set CYGWIN_PREFIX=
set SRC_DIR=
set STDLIB_DIR=
set SUBDIR=
set SYS_PREFIX=
set target_platform=
set UCRTVersion=
set UniversalCRTSdkDir=
set VCINSTALLDIR=
set vc=
set win=
set VisualStudioVersion=
set VSINSTALLDIR=
set VSREGKEY=
set VS_MAJOR=
set VS_VERSION=
set VS_YEAR=
set WindowsSDKLibVersion=
set WindowsSDKVersion=
set WindowsSDKExecutablePath_x64=
set WindowsSDKExecutablePath_x86=

:: information on remaining variables
set

set BLAS_ROOT=%CONDA_PREFIX%
set LAPACK_ROOT=%CONDA_PREFIX%
set BLAS_ROOT=%PREFIX%
set LAPACK_ROOT=%PREFIX%
set NUMPY_INCLUDE=%PREFIX%\Include
set F2PY=%PREFIX%\Scripts\f2py.exe

"%PYTHON%" setup.py install

Expand Down
9 changes: 7 additions & 2 deletions conda-recipe-openblas/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@ cd $RECIPE_DIR/..

# specify where CMAKE will search for lapack and blas
# needs recent cmake (conda's 3.12) and policy CMP0074 NEW
export BLAS_ROOT=${CONDA_PREFIX}
export LAPACK_ROOT=${CONDA_PREFIX}
# the ${PREFIX} points to conda-build's host environment
export BLAS_ROOT=${PREFIX}
export LAPACK_ROOT=${PREFIX}

# ensure we are not building with old cmake files
rm -rf _skbuild

# do the build
$PYTHON setup.py install
50 changes: 30 additions & 20 deletions conda-recipe-openblas/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,45 +1,55 @@
package:
name: slycot
version: "0.3.3"
version: {{ environ.get('GIT_DESCRIBE_TAG', 'v0.0.0')[1:] }}

source:
git_url: ../

build:
number: 0
number: {{ environ.get('GIT_DESCRIBE_NUMBER', 0) }}
string: py{{ environ.get('PY_VER').replace('.', '') }}{{ environ.get('GIT_DESCRIBE_HASH', '') }}_obl_{{ environ.get('GIT_DESCRIBE_NUMBER', 0) }}

requirements:
host:
- python {{PY_VER}}
- flang # [win]
- {{ compiler('c') }} # [win]
- {{ compiler('fortran') }} # [not win]
- numpy
- scikit-build >=0.8.0

build:
- numpy
- libflang # [win]
- libgfortran # [not win]
- python {{ PY_VER }}
- numpy >=1.16
- openblas >=0.3.0
- {{ compiler('c') }} # [not osx]
- gcc # [osx]
- {{ compiler('fortran') }} # [linux]
- scikit-build >=0.8.0

host:
- python {{ PY_VER }}
- flang # [win]
- numpy >=1.16
- openblas >=0.3.0
- libgfortran-ng # [not-win]
- libgcc-ng # [linux]
- scikit-build >=0.8.0
# on Windows, this relies on having visual studio CE 2015
# this link needed quite some searching, please do not delete!
# https://go.microsoft.com/fwlink/?LinkId=532606&clcid=0x409

run:
- numpy
- python {{ PY_VER }}
- numpy >=1.16
- openblas >=0.3.0
- libgfortran # [not win]
- libflang # [win]
- libgfortran-ng # [not win]
- libgcc-ng # [linux]
- libflang # [win]

test:
requires:
- numpy
- openblas
- python {{PY_VER}}
- libgfortran # [not win]
- libflang # [win]
imports:
- slycot

about:
home: https://github.com/python-control/slycot
license: GPLv2
summary: 'A wrapper for the SLICOT control and systems library'

# on OSX, the SDK for 10.9 is currently needed
# download the 10.9 sdk from https://github.com/phracker/MacOSX-SDKs/releases
# unpack and set environment variable CONDA_BUILD_SYSROOT to that location
10 changes: 7 additions & 3 deletions conda-recipe/bld.bat
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,14 @@
cd %RECIPE_DIR%
cd ..

set F77=%BUILD_PREFIX%\Library\bin\flang.exe
set F90=%BUILD_PREFIX%\Library\bin\flang.exe
:: clean old build attempts
RD /S /Q _skbuild

set BLAS_ROOT=%PREFIX%
set LAPACK_ROOT=%PREFIX%
set NUMPY_INCLUDE=%PREFIX%\Include
set F2PY=%PREFIX%\Scripts\f2py.exe

"%PYTHON%" setup.py build
"%PYTHON%" setup.py install

if errorlevel 1 exit 1
Expand Down
13 changes: 13 additions & 0 deletions conda-recipe/build.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,15 @@
cd $RECIPE_DIR/..

# specify where CMAKE will search for lapack and blas
# needs recent cmake (conda's 3.12) and policy CMP0074 NEW
# the ${PREFIX} points to conda-build's host environment
export BLAS_ROOT=${PREFIX}
export LAPACK_ROOT=${PREFIX}

# ensure we are not building with old cmake files
rm -rf _skbuild

env

# do the build
$PYTHON setup.py install
52 changes: 31 additions & 21 deletions conda-recipe/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,41 +1,51 @@
package:
name: slycot
version: "0.3.3"
version: {{ environ.get('GIT_DESCRIBE_TAG', 'v0.0.0')[1:] }}

source:
git_url: ../

build:
number: 0
number: {{ environ.get('GIT_DESCRIBE_NUMBER', 0) }}
string: py{{ environ.get('PY_VER').replace('.', '') }}{{ environ.get('GIT_DESCRIBE_HASH', '') }}_mkl_{{ environ.get('GIT_DESCRIBE_NUMBER', 0) }}

requirements:
host:
# note: the osx build is with gcc for now, due to problems with the
# conda-supplied clang and library linking see e.g.
# https://github.com/conda-forge/mpi-feedstock issue #4
# conda-forge might have the configuration in place for clang build and link?
build:
- python {{PY_VER}}
- numpy
- flang # [win]
- {{ compiler('c') }} # [win]
- {{ compiler('fortran') }} # [not win]
- scikit-build >=0.8.0
- numpy >=1.16
- {{ compiler('c') }} # [not osx]
- gcc # [osx]
- {{ compiler('fortran') }} # [linux]
- scikit-build >=0.8.0

build:
- numpy
- libflang # [win]
- libgfortran # [not win]
- lapack
host:
- python {{ PY_VER }}
- flang # [win]
- numpy >=1.16
- mkl
- libgfortran-ng # [not win]
- libgcc-ng # [linux]
- libflang # [win]
- scikit-build >=0.8.0
# on Windows, this relies on having visual studio CE 2015
# this link needed quite some searching, please do not delete!
# https://go.microsoft.com/fwlink/?LinkId=532606&clcid=0x409

run:
- numpy
- lapack
- libgfortran # [not win]
- libflang # [win]
- python {{ PY_VER }}
- numpy >=1.16
- mkl
- libgfortran-ng # [not win]
- libgcc-ng # [linux]
- libflang # [win]

test:
requires:
- numpy
- lapack
- python {{PY_VER}}
- libgfortran # [not win]
- libflang # [win]
imports:
- slycot

Expand Down
Loading