Unverified Commit 55301751 authored by Simon Ward's avatar Simon Ward
Browse files

Gfortran for OSX

parent 29d4edda
......@@ -26,6 +26,7 @@ jobs:
matrix:
python-version: [3.6, 3.7, 3.8, 3.9]
os: [macos-10.15, macos-latest]
gcc_v: [ 10 ] # Version of GFortran we want to use.
exclude:
- os: macos-latest
python-version: '3.6'
......@@ -42,14 +43,17 @@ jobs:
with:
python-version: ${{matrix.python-version}}
- name: Set Compiler (OSX)
run: |
echo "FC=gfortran-9" >> $GITHUB_ENV
echo "CC=gcc-9" >> $GITHUB_ENV
# - name: Set Compiler (OSX)
# run: |
# echo "FC=gfortran-${{ matrix.gcc_v }}" >> $GITHUB_ENV
# echo "CC=gcc-${{ matrix.gcc_v }}" >> $GITHUB_ENV
- name: Install cmake
run: pip3 install cmake delocate
- name: Fix Fortran
run: cp /usr/local/bin/gfortran-${{ matrix.gcc_v}} /usr/local/bin/gfortran
- name: Build CFML
run: pip wheel ./ --no-deps -w ./dist/
......
......@@ -102,7 +102,7 @@ macro(set_compiler_flags)
endif()
endif()
elseif(COMPILER_NAME STREQUAL gfortran)
elseif(COMPILER_NAME MATCHES "^gfortran")
if(WIN32)
if(CMAKE_BUILD_TYPE STREQUAL Debug)
......
......@@ -10,12 +10,21 @@ import pathlib
import os
import sys
import shutil
from sys import platform as _platform
BITS = struct.calcsize("P") * 8
PACKAGE_NAME = "crysfml_api"
SOURCE_DIR = '.'
COMPILER = 'gfortran'
# if _platform == "linux" or _platform == "linux2":
# linux
if _platform == "darwin":
# MAC OS X
COMPILER = 'gfortran-10'
# elif _platform == "win32":
# # Windows
# elif _platform == "win64":
# # Windows 64-bit
# We can use cmake provided from pip which (normally) gets installed at /bin
# Except that in the manylinux builds it's placed at /opt/python/[version]/bin/
# (as a symlink at least) which is *not* on the path.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment