Skip to content

Commit

Permalink
Merge pull request #74 from zigastegu/lowhangingfruits
Browse files Browse the repository at this point in the history
scripts, env, windows
  • Loading branch information
drandyhaas authored Nov 7, 2022
2 parents 76e020c 82c39a1 commit 55b469b
Show file tree
Hide file tree
Showing 7 changed files with 57 additions and 0 deletions.
3 changes: 3 additions & 0 deletions software/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 1,3 @@
venv*
__pycache__
*.pyc
8 changes: 8 additions & 0 deletions software/scripts/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 1,8 @@
pyserial
numpy
scipy
pyqtgraph
pyqt5
h5py
pyftdi
ftd2xx
5 changes: 5 additions & 0 deletions software/scripts/windows/init_virtual_env.bat
Original file line number Diff line number Diff line change
@@ -0,0 1,5 @@
python.exe -m pip install virtualenv
cd "%~dp0..\.."
python -m venv venv
call ".\venv\Scripts\activate.bat"
python -m pip --no-input install -r "%~dp0..\requirements.txt"
12 changes: 12 additions & 0 deletions software/scripts/windows/python2/init_virtual_env.bat
Original file line number Diff line number Diff line change
@@ -0,0 1,12 @@
SET Python2=C:\Python27\python.exe
@echo off
if not exist %Python2% (
echo "Python2 path not correct, check"
EXIT /b
)

@echo on
%Python2% -m pip install virtualenv
%Python2% -m virtualenv "%~dp0..\..\..\venv2"
call "%~dp0..\..\..\venv2\Scripts\activate.bat"
python -m pip --no-input install -r "%~dp0requirements.txt"
5 changes: 5 additions & 0 deletions software/scripts/windows/python2/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 1,5 @@
pyserial
numpy
matplotlib
PySide
scipy
12 changes: 12 additions & 0 deletions software/scripts/windows/python2/run.bat
Original file line number Diff line number Diff line change
@@ -0,0 1,12 @@
@echo off
cd "%~dp0..\..\.."
SET venv=venv2\Scripts\activate.bat
if not exist %venv% (
echo Virtual Python environment is probably not set.
echo Run init_virtual_env.bat
EXIT /b
)

@echo on
call .\%venv%
python HaasoscopeDraw.py
12 changes: 12 additions & 0 deletions software/scripts/windows/run.bat
Original file line number Diff line number Diff line change
@@ -0,0 1,12 @@
@echo off
cd "%~dp0..\.."
SET venv=venv\Scripts\activate.bat
if not exist %venv% (
echo Virtual Python environment is probably not set.
echo Run init_virtual_env.bat
EXIT /b
)

@echo on
call .\%venv%
python HaasoscopeQt.py

0 comments on commit 55b469b

Please sign in to comment.