Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/osx python improvements #306

Merged
merged 4 commits into from
Nov 15, 2024
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
2 changes: 1 addition & 1 deletion LIBSTELL/Sources/Modules/fieldlines_input_mod.f90
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ SUBROUTINE read_fieldlines_input(filename, istat)
END IF
READ(iunit,NML=fieldlines_input,IOSTAT=istat)
IF (istat /= 0) THEN
WRITE(6,'(A)') 'ERROR reading namelist BEAMS3D_INPUT from file: ',TRIM(filename)
WRITE(6,'(A)') 'ERROR reading namelist FIELDLINES_INPUT from file: ',TRIM(filename)
backspace(iunit)
read(iunit,fmt='(A)') line
write(6,'(A)') 'Invalid line in namelist: '//TRIM(line)
Expand Down
11 changes: 10 additions & 1 deletion SHARE/make_macports.inc
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,19 @@
#######################################################################
FLAGS_R = -O2 -g -fexternal-blas -fbacktrace -fcheck=all,no-array-temps
FLAGS_D = -O0 -g -fexternal-blas -fbacktrace -fcheck=all,no-array-temps -fbounds-check
LIBS = -L/usr/lib -L/opt/local/lib -lopenblas -lscalapack
LIBS = -L/usr/lib -L/opt/local/lib -lscalapack -framework Accelerate
FLAGS_R += -fallow-argument-mismatch
FLAGS_D += -fallow-argument-mismatch

#######################################################################
# Check for Accelerate Framework/OpenBLAS
#######################################################################
ifneq ("$(wildcard /opt/local/lib/libopenblas*)","")
LIBS += -L/opt/local/lib -lopenblas
else
LIBS += -framework Accelerate
endif


#######################################################################
# MPI Options
Expand Down
5 changes: 1 addition & 4 deletions build_all
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,4 @@ do
done

# make a dynamic library
make pystel
#cd LIBSTELL
#make shared_release
#cd ..
#make pystel
4 changes: 2 additions & 2 deletions makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ endif

pystel: libstell$(SHARED_EXT)
@echo 'Building pySTEL'
@cd pySTEL; python3 setup.py install --user

@cd pySTEL; pip install .
libstell$(SHARED_EXT):
@cd LIBSTELL; make shared_release

Expand Down
28 changes: 28 additions & 0 deletions pySTEL/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"

[project]
name = "pySTEL"
dynamic = ["version"]
description = "Python library for interfacing with STELLOPT"
readme = "README.md"
authors = [
{ name = "Samuel A. Lazerson", email = "[email protected]" },
]
dependencies = [
"contourpy",
"gmsh",
"matplotlib",
"numpy",
"numpy-stl",
"pyqt5",
"pyvtk",
"scipy",
"vtk",
"pyyaml"
]

[project.urls]
Homepage = "https://github.com/PrincetonUniversity/STELLOPT"

2 changes: 1 addition & 1 deletion pySTEL/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@
scripts = ['VMECplot.py','FIELDLINESplot.py','vmec_util.py',\
'boozer_util.py','coils_util.py','fieldlines_util.py'],
install_requires=['numpy','matplotlib','PyQt5','scipy', \
'contourpy','vtk','numpy-stl','gmsh']
'contourpy','PyVTK','numpy-stl','gmsh','vtk']
)