more Python3 compatibility

This commit is contained in:
andreika-git 2022-04-01 12:12:22 +03:00
parent f750449926
commit 91f3c34c5b
4 changed files with 16 additions and 4 deletions

View File

@ -102,9 +102,9 @@ while true; do
python_ver=$($python_bin -V 2>&1 | grep -Po '(?<=Python )(.+)')
if [[ -z "$python_ver" ]] || [[ ! $python_ver =~ ^3\.[56789].* ]] ; then
echo "Error! Python 3.5 or later is required. It should be installed and added to the PATH!"
install_package python2
install_package python3
if [ "${machine}" = "linux" ] ; then
install_package python2-dev
install_package python3-dev
fi
else
break

View File

@ -13,7 +13,7 @@ import glob, shutil
# also recognized by JLCPCB: https://support.jlcpcb.com/article/29-suggested-naming-patterns
if len(sys.argv) < 5:
print "Error! Please specify the project type, base folder, gerber folder, name and rev."
print ("Error! Please specify the project type, base folder, gerber folder, name and rev.")
sys.exit(1)
type = sys.argv[1]
project_base = sys.argv[2]

View File

@ -9,7 +9,7 @@ import csv, re
import glob, shutil
if len(sys.argv) < 4:
print "Error! Please specify the module project folder, module name and rev."
print ("Error! Please specify the module project folder, module name and rev.")
sys.exit(1)
project_base = sys.argv[1]
name = sys.argv[2]

12
bin/requirements.txt Normal file
View File

@ -0,0 +1,12 @@
cairocffi==1.3.0
contextlib2==21.6.0
moderngl==5.6.4
numpy==1.22.3
Pillow==9.0.1
PyPDF2==1.26.0
pyrr==0.10.3
pytest==7.1.1
PyVRML97==2.3.1
setuptools==45.2.0
SimpleParse==2.2.2
tsp_solver==0.1