diff --git a/docs/INSTALL.md b/docs/INSTALL.md index 84a1e26..cda32b3 100644 --- a/docs/INSTALL.md +++ b/docs/INSTALL.md @@ -2,6 +2,8 @@ *jersi_certu* has been developed using Python 3.8.5. So it is better to have installed such version or some higher version. +The following instructions might also work on other platforms, but only Windows and Linux have been tested. + ### Instructions for Linux and Windows platforms 1. Make an installation directory by either cloning this *git* repository or downloading it as a zip archive and unzipping it. @@ -17,7 +19,6 @@ 4. For un-installing *jersi_certu* just remove the installation directory. -5. The above instructions might also work on other platforms, but only Windows and Linux have been tested. ### Used dependencies diff --git a/jersi_start.py b/jersi_start.py index 6085ef7..e732e46 100644 --- a/jersi_start.py +++ b/jersi_start.py @@ -24,19 +24,17 @@ _product_home = os.path.abspath(os.path.dirname(__file__)) -os.chdir(_product_home) - _jersi_gui_executable = os.path.join(_product_home, "jersi_certu", "jersi_gui.py") _venv_home = os.path.join(_product_home, ".env") +os.chdir(_product_home) print() print("Checking virtual environment ...") if not os.path.isdir(_venv_home): - print() - print("Creating virtual environment ...") + print(" Creating virtual environment ...") subprocess.run(args=[sys.executable, "-m", "venv", ".env"], shell=False, check=True) - print("Creating virtual environment done") + print(" Creating virtual environment done") _install_dependencies = True else: @@ -55,17 +53,16 @@ else: _venv_python_executable = glob.glob(os.path.join(_venv_home, "*/python*"))[0] -print("_venv_python_executable = ", _venv_python_executable) +print(" _venv_python_executable = ", _venv_python_executable) print("Determining the python executable done") - if _install_dependencies: print() print("Installing dependencies ...") if os.name == 'nt': - # windows fix to "import _ssl" failure after "import ssl" in "pip" + # windows fix of "import _ssl" failure after "import ssl" during "pip" execution _sys_python_path = os.path.dirname(sys.executable) if 'PATH' in os.environ: @@ -77,19 +74,11 @@ os.environ['PATH'] = (_sys_python_path + os.pathsep + os.path.join(_sys_python_path, 'Scripts') + os.pathsep + os.path.join(_sys_python_path, 'Library', 'bin') ) - - - _venv_python_path = os.path.dirname(_venv_python_executable) - - if 'PATH' in os.environ: - os.environ['PATH'] = _venv_python_path + os.pathsep + os.environ['PATH'] - else: - os.environ['PATH'] = _venv_python_path - - subprocess.run(args=[_venv_python_executable, "-c", "import ssl"], shell=False, check=True) - + + subprocess.run(args=[_venv_python_executable, "-m", "ensurepip", "--upgrade"], shell=False, check=True) subprocess.run(args=[_venv_python_executable, "-m", "pip", "install", "--upgrade", "pip"], shell=False, check=True) subprocess.run(args=[_venv_python_executable, "-m", "pip", "install", "-r", "requirements.txt"], shell=False, check=True) + print() print("Installing dependencies done")