Skip to content

Commit

Permalink
Merge branch 'master' into patch-3
Browse files Browse the repository at this point in the history
  • Loading branch information
traversaro authored Nov 3, 2021
2 parents 886d608 + c468225 commit 85bd4f4
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 31 deletions.
9 changes: 2 additions & 7 deletions recipe/activate.msh
Original file line number Diff line number Diff line change
@@ -1,7 +1,2 @@
if_(is_set("COMSPEC")).then_([
export("GEM_HOME", path.join(env("CONDA_PREFIX"), "Library/share/rubygems")),
sys.path_prepend(path.join(env("CONDA_PREFIX"), "Library/share/rubygems/bin"))
]).else_([
export("GEM_HOME", path.join(env("CONDA_PREFIX"), "share/rubygems")),
sys.path_prepend(path.join(env("CONDA_PREFIX"), "share/rubygems/bin"))
])
export("GEM_HOME", path.join(env("CONDA_PREFIX"), "share/rubygems")),
sys.path_prepend(path.join(env("CONDA_PREFIX"), "share/rubygems/bin"))
9 changes: 2 additions & 7 deletions recipe/activate.ps1
Original file line number Diff line number Diff line change
@@ -1,7 +1,2 @@
if (Test-Path env:COMSPEC) {
$Env:GEM_HOME=$(Join-Path -Path $Env:CONDA_PREFIX -ChildPath Library/share/rubygems)
$Env:PATH="$(Join-Path -Path $Env:CONDA_PREFIX -ChildPath Library/share/rubygems/bin);$Env:PATH"
} else {
$Env:GEM_HOME=$(Join-Path -Path $Env:CONDA_PREFIX -ChildPath share/rubygems)
$Env:PATH="$(Join-Path -Path $Env:CONDA_PREFIX -ChildPath share/rubygems/bin);$Env:PATH"
}
$Env:GEM_HOME=$(Join-Path -Path $Env:CONDA_PREFIX -ChildPath share/rubygems)
$Env:PATH="$(Join-Path -Path $Env:CONDA_PREFIX -ChildPath share/rubygems/bin);$Env:PATH"
9 changes: 2 additions & 7 deletions recipe/activate.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,2 @@
if [ -z "$COMSPEC" ]; then
export GEM_HOME=$CONDA_PREFIX/share/rubygems/
export PATH="$CONDA_PREFIX/share/rubygems/bin:$PATH"
else
export GEM_HOME=$CONDA_PREFIX/Library/share/rubygems/
export PATH="$CONDA_PREFIX/Library/share/rubygems/bin:$PATH"
fi
export GEM_HOME=$CONDA_PREFIX/share/rubygems/
export PATH="$CONDA_PREFIX/share/rubygems/bin:$PATH"
8 changes: 4 additions & 4 deletions recipe/bld.bat
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ setlocal enableextensions

RMDIR /s /q ext\fiddle\libffi-3.2.1

CALL win32\configure.bat --prefix=%LIBRARY_PREFIX%
CALL win32\configure.bat --prefix=%PREFIX%
if %errorlevel% neq 0 exit /b %errorlevel%

nmake
Expand All @@ -11,13 +11,13 @@ if %errorlevel% neq 0 exit /b %errorlevel%
nmake install
if %errorlevel% neq 0 exit /b %errorlevel%

mkdir %LIBRARY_PREFIX%\etc
mkdir %PREFIX%\etc
if %errorlevel% neq 0 exit /b %errorlevel%

mkdir %LIBRARY_PREFIX%\share\rubygems
mkdir %PREFIX%\share\rubygems
if %errorlevel% neq 0 exit /b %errorlevel%

echo "gemhome: %LIBRARY_PREFIX%/share/rubygems" > %LIBRARY_PREFIX%/etc/gemrc
echo "gemhome: %PREFIX%/share/rubygems" > %PREFIX%/etc/gemrc
if %errorlevel% neq 0 exit /b %errorlevel%

setlocal EnableDelayedExpansion
Expand Down
2 changes: 1 addition & 1 deletion recipe/deactivate.bat
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ goto :EOF

:start
set GEM_HOME=
call :removeFromPath "%CONDA_PREFIX%\Library\share\rubygems\bin"
call :removeFromPath "%CONDA_PREFIX%\share\rubygems\bin"
1 change: 0 additions & 1 deletion recipe/deactivate.msh
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
unset(env("GEM_HOME"))
sys.path_remove(path.join(env("CONDA_PREFIX"), "Library/share/rubygems/bin"))
sys.path_remove(path.join(env("CONDA_PREFIX"), "share/rubygems/bin"))
2 changes: 0 additions & 2 deletions recipe/deactivate.ps1
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
try { Remove-Item env:GEM_HOME}
catch { Write-Host "Failed to execute Remove-Item env:GEM_HOME" }
$rmpath = $(Join-Path -Path $Env:CONDA_PREFIX -ChildPath Library/share/rubygems/bin)
$Env:PATH = ($Env:PATH.Split(';') | Where-Object { $_ -ne $rmpath }) -join ';'
$rmpath = $(Join-Path -Path $Env:CONDA_PREFIX -ChildPath share/rubygems/bin)
$Env:PATH = ($Env:PATH.Split(';') | Where-Object { $_ -ne $rmpath }) -join ';'
2 changes: 0 additions & 2 deletions recipe/deactivate.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
if [ "$ZSH_VERSION" != "" ]; then
unset GEM_HOME
path=(${path[@]:#"$CONDA_PREFIX/Library/share/rubygems/bin"})
path=(${path[@]:#"$CONDA_PREFIX/share/rubygems/bin"})
else
# Taken from http://www.linuxfromscratch.org/blfs/view/svn/postlfs/profile.html
Expand All @@ -19,6 +18,5 @@ else
export $PATHVARIABLE="$NEWPATH"
}
unset GEM_HOME
pathremove "$CONDA_PREFIX/Library/share/rubygems/bin"
pathremove "$CONDA_PREFIX/share/rubygems/bin"
fi

0 comments on commit 85bd4f4

Please sign in to comment.