Skip to content
Closed
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
26 changes: 26 additions & 0 deletions news/install-script.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
**Added:**

* <news item>

**Changed:**

* Modernized install script: Python 3.8 to 3.12, replaced 28 hardcoded .whl
files with direct pip install from PyPI, added PySide6, switched from
setup.py to pip install, added pip self-upgrade step, and used %~dp0 for
reliable relative paths.

**Deprecated:**

* <news item>

**Removed:**

* <news item>

**Fixed:**

* <news item>

**Security:**

* <news item>
97 changes: 60 additions & 37 deletions scripts/install_from_local.bat
Original file line number Diff line number Diff line change
@@ -1,45 +1,68 @@
:: This batch script will install python 3.8, pytentiostat and it's necessary packages
:: This batch script will install Python 3.12 and pytentiostat with all
:: necessary packages including PySide6 for the GUI.
@echo off
cd ../local_install
echo Installing python
START /WAIT python-3.8.1-amd64

echo ============================================================
echo JUAMI Pytentiostat Installer
echo ============================================================
echo.

:: Step 1 - Install Python 3.12
echo Installing Python 3.12...
cd /d "%~dp0..\local_install"
START /WAIT python-3.12.0-amd64.exe /passive InstallAllUsers=0 PrependPath=1 Include_pip=1
echo.

:: Verify Python installed correctly
python --version
if errorlevel 1 goto NoPython
pip install whls/pytz-2019.3-py2.py3-none-any.whl
pip install whls/kiwisolver-1.1.0-cp38-none-win_amd64.whl
pip install whls/six-1.14.0-py2.py3-none-any.whl
pip install whls/pyparsing-2.4.6-py2.py3-none-any.whl
pip install whls/python_dateutil-2.8.1-py2.py3-none-any.whl
pip install whls/pyserial-3.4-py2.py3-none-any.whl
pip install whls/pyFirmata-1.1.0-py2.py3-none-any.whl
pip install whls/numpy-1.18.1-cp38-cp38-win_amd64.whl
pip install whls/pandas-0.25.3-cp38-cp38-win_amd64.whl
pip install whls/PyYAML-5.3-cp38-cp38-win_amd64.whl
pip install whls/urllib3-1.25.8-py2.py3-none-any.whl
pip install whls/py-1.8.1-py2.py3-none-any.whl
pip install whls/idna-2.8-py2.py3-none-any.whl
pip install whls/chardet-3.0.4-py2.py3-none-any.whl
pip install whls/certifi-2019.11.28-py2.py3-none-any.whl
pip install whls/pluggy-0.13.1-py2.py3-none-any.whl
pip install whls/packaging-20.0-py2.py3-none-any.whl
pip install whls/more_itertools-8.1.0-py3-none-any.whl
pip install whls/wcwidth-0.1.8-py2.py3-none-any.whl
pip install whls/atomicwrites-1.3.0-py2.py3-none-any.whl
pip install whls/attrs-19.3.0-py2.py3-none-any.whl
pip install whls/cycler-0.10.0-py2.py3-none-any.whl
pip install whls/matplotlib-3.1.2-cp38-cp38-win_amd64.whl
pip install whls/coverage-5.0.3.tar.gz
pip install whls/colorama-0.4.3-py2.py3-none-any.whl
pip install whls/requests-2.22.0-py2.py3-none-any.whl
pip install whls/pytest-5.3.4-py3-none-any.whl
pip install whls/mock-3.0.5-py2.py3-none-any.whl
pip install whls/codecov-2.0.15-py2.py3-none-any.whl
cd ..
python setup.py install
echo Python installed successfully.
echo.

:: Step 2 - Upgrade pip
echo Upgrading pip...
python -m pip install --upgrade pip
echo.

:: Step 3 - Install runtime dependencies
echo Installing pytentiostat dependencies...
pip install pyfirmata
pip install matplotlib
pip install pyyaml
pip install pandas
pip install numpy
pip install pyserial
pip install pyside6
echo.

:: Step 4 - Install test dependencies
echo Installing test dependencies...
pip install pytest
pip install mock
echo.

:: Step 5 - Install pytentiostat
echo Installing pytentiostat...
cd /d "%~dp0.."
pip install .
echo.

echo ============================================================
echo Installation complete!
echo.
echo To run the pytentiostat CLI:
echo python -m pytentiostat.main
echo.
echo To run in simulation mode (no hardware needed):
echo set PYTENTIOSTAT_SIMULATE=1
echo python -m pytentiostat.main
echo ============================================================
@pause
goto:eof
goto :eof

:NoPython
echo.
echo Python installation failed. Please retry.
echo Make sure python-3.12.0-amd64.exe is in the local_install folder.
@pause
goto:eof
goto :eof
Loading