Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
build/bin/sage-print-system-package-command (macports): Handle setup-…
Browse files Browse the repository at this point in the history
…build-env
  • Loading branch information
Matthias Koeppe committed Mar 18, 2021
1 parent b6f1596 commit e9eeb0b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
11 changes: 11 additions & 0 deletions build/bin/sage-print-system-package-command
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,17 @@ case $system:$command in
[ -n "$SAGE_ROOT" ] || SAGE_ROOT=.
echo "${PROMPT}source $SAGE_ROOT/.homebrew-build-env"
;;
macports*:setup-build-env)
$IF_VERBOSE echo "${COMMENT}"
$IF_VERBOSE echo "${COMMENT}MacPorts does not provide unversioned gcc and gfortran executables by default"
$IF_VERBOSE echo "${COMMENT}To make gfortran available (and build with gcc from XCode), use:"
$IF_VERBOSE echo "${COMMENT}"
print_shell_command "export FC=gfortran-mp-10"
$IF_VERBOSE echo "${COMMENT}"
$IF_VERBOSE echo "${COMMENT}Alternatively, to use gcc and gfortran from Macports, use:"
$IF_VERBOSE echo "${COMMENT}"
$IF_VERBOSE print_shell_command "${SUDO} port select --set gcc mp-gcc10"
;;
*:setup-build-env)
# Nothing needed
;;
Expand Down
1 change: 1 addition & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,7 @@ setenv =
local-macports-optlocal: SUDO=sudo
local-macports-optlocal: __SUDO=--sudo
local-macports: PATH={env:MP_PREFIX}/bin:/usr/bin:/bin:/usr/sbin:/sbin
local-macports: SETENV=eval $(build/bin/sage-print-system-package-command {env:SYSTEM} setup-build-env)
# conda
local-conda: CONDA_PREFIX={envdir}/conda
local-conda: PATH={env:CONDA_PREFIX}/bin:/usr/bin:/bin:/usr/sbin:/sbin
Expand Down

0 comments on commit e9eeb0b

Please sign in to comment.