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
6ddf9e62
Unverified
Commit
6ddf9e62
authored
Jul 13, 2021
by
Simon Ward
Browse files
More Fortran fixes
parent
169f8af0
Changes
2
Hide whitespace changes
Inline
Side-by-side
.github/workflows/build_variants.yml
View file @
6ddf9e62
...
...
@@ -24,7 +24,7 @@ jobs:
strategy
:
max-parallel
:
4
matrix
:
python-version
:
[
3.6
,
3.7
,
3.8
,
3.9
]
python-version
:
[
'
3.6
'
,
'
3.7
'
,
'
3.8
'
,
'
3.9
'
,
'
3.10'
]
os
:
[
macos-10.15
,
macos-11.0
,
windows-latest
]
gcc_v
:
[
10
]
# Version of GFortran we want to use.
exclude
:
...
...
@@ -47,22 +47,29 @@ jobs:
with
:
python-version
:
${{matrix.python-version}}
# - 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
run
:
pip3 install cmake
-
name
:
Build CFML
run
:
pip wheel ./ --no-deps -w ./dist/
-
name
:
Build CFML (Windows)
if
:
contains(matrix.os, 'windows')
env
:
FC
:
gfortran
CC
:
gcc
run
:
pip3 wheel ./ --no-deps -w ./dist/
-
name
:
Fix Wheel
-
name
:
Build CFML (OSX)
if
:
contains(matrix.os, 'macos')
run
:
delocate-wheel -w fixed_wheels -v ./dist/*.whl
env
:
FC
:
gfortran-${{ matrix.gcc_v }}
CC
:
gcc-${{ matrix.gcc_v }}
run
:
|
pip3 wheel ./ --no-deps -w ./dist/
pip3 install delocate
delocate-wheel -w fixed_wheels -v ./dist/*.whl
mv ./dist ./old
mv ./fixed_wheels ./dist
-
uses
:
actions/upload-artifact@v2
with
:
name
:
CrysFML - ${{ matrix.os }} - Python ${{ matrix.python-version }}
path
:
./fixed_wheels/*.whl
\ No newline at end of file
path
:
./dist/*.whl
\ No newline at end of file
setup.py
View file @
6ddf9e62
...
...
@@ -14,17 +14,10 @@ import shutil
BITS
=
struct
.
calcsize
(
"P"
)
*
8
PACKAGE_NAME
=
"crysfml_api"
SOURCE_DIR
=
'.'
def
cmd_exists
(
cmd
):
return
shutil
.
which
(
cmd
)
is
not
None
COMPILER
=
'gfortran'
if
not
cmd_exists
(
COMPILER
):
versions
=
[
10
,
9
,
8
]
for
version
in
versions
:
COMPILER
=
f
'gfortran-
{
version
}
'
if
cmd_exists
(
COMPILER
):
break
if
os
.
environ
.
get
(
'FC'
,
False
):
COMPILER
=
os
.
environ
.
get
(
'FC'
)
print
(
f
'Compiler set to:
{
COMPILER
}
'
)
# 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/
...
...
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