From 91f3c34c5b5ad98d09b956e051d9621462e5cad1 Mon Sep 17 00:00:00 2001 From: andreika-git Date: Fri, 1 Apr 2022 12:12:22 +0300 Subject: [PATCH] more Python3 compatibility --- bin/check_all.sh | 4 ++-- bin/copy_from_Kicad.py | 2 +- bin/export_kicad_module_footprint.py | 2 +- bin/requirements.txt | 12 ++++++++++++ 4 files changed, 16 insertions(+), 4 deletions(-) create mode 100644 bin/requirements.txt diff --git a/bin/check_all.sh b/bin/check_all.sh index 157c3e7..ad6e73d 100755 --- a/bin/check_all.sh +++ b/bin/check_all.sh @@ -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 diff --git a/bin/copy_from_Kicad.py b/bin/copy_from_Kicad.py index 38a307d..aa78df8 100644 --- a/bin/copy_from_Kicad.py +++ b/bin/copy_from_Kicad.py @@ -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] diff --git a/bin/export_kicad_module_footprint.py b/bin/export_kicad_module_footprint.py index b17ef65..52f412b 100644 --- a/bin/export_kicad_module_footprint.py +++ b/bin/export_kicad_module_footprint.py @@ -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] diff --git a/bin/requirements.txt b/bin/requirements.txt new file mode 100644 index 0000000..1a836d0 --- /dev/null +++ b/bin/requirements.txt @@ -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