Skip to content
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
1 change: 1 addition & 0 deletions scripts/windows/build-conda-installer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -373,4 +373,5 @@ cp "${CACHEDIR:?}/miniconda/Miniconda3-${MINICONDA_VERSION}-Windows-${CONDAPLATT

mkdir -p "${BASEDIR:?}/icons"
cp scripts/windows/{Orange.ico,OrangeOWS.ico} "${BASEDIR:?}/icons"
cp "$(dirname "$0")"/sitecustomize.py "${BASEDIR:?}"/conda-pkgs
make-installer
3 changes: 3 additions & 0 deletions scripts/windows/condainstall.bat
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,6 @@ if not exist "%ACTIVATE_BAT%" (
echo @echo off > "%ACTIVATE_BAT%"
echo call "%CONDA_BASE_PREFIX%\Scripts\activate.bat" "%PREFIX%" >> "%ACTIVATE_BAT%"
)

rem # install custom sitecustomize module
copy sitecustomize.py "%PREFIX%\Lib\
27 changes: 27 additions & 0 deletions scripts/windows/sitecustomize.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#
# sitecustomize added by orange3 installer.
#
# (Ana)conda python distribution expects it is 'activated', it does not really
# support unactivated invocations (although a similar facility to this was
# included in anaconda python 3.6 and earlier).

import sys
import os


def normalize(path):
return os.path.normcase(os.path.normpath(path))


extra_paths = [
r"Library\bin",
]

paths = os.environ.get("PATH", "").split(os.path.pathsep)
paths = [normalize(path) for path in paths]

for path in extra_paths:
path = os.path.join(sys.prefix, path)

if os.path.isdir(path) and normalize(path) not in paths:
os.environ["PATH"] = os.pathsep.join((path, os.environ.get("PATH", "")))