Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Scientific Software
CrysFML
Commits
55301751
Unverified
Commit
55301751
authored
Jul 13, 2021
by
Simon Ward
Browse files
Gfortran for OSX
parent
29d4edda
Changes
3
Hide whitespace changes
Inline
Side-by-side
.github/workflows/build_many_linux.yml
View file @
55301751
...
...
@@ -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/
...
...
cmake/set_compiler_flags.cmake
View file @
55301751
...
...
@@ -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
)
...
...
setup.py
View file @
55301751
...
...
@@ -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.
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment