changeset 2030:aeafe7d0b033

have bin/* run via pdm's python config
author drewp@bigasterisk.com
date Thu, 07 Apr 2022 01:07:54 -0700
parents decbbd709f94
children e7e3fbae767d
files bin/python bin/run_local.py makefile
diffstat 3 files changed, 5 insertions(+), 39 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bin/python	Thu Apr 07 01:07:54 2022 -0700
@@ -0,0 +1,2 @@
+#!/bin/sh
+pdm run python3 "$@"
--- a/bin/run_local.py	Tue Apr 05 23:16:12 2022 -0700
+++ b/bin/run_local.py	Thu Apr 07 01:07:54 2022 -0700
@@ -4,31 +4,10 @@
 
 import sys, os, socket
 
+from twisted.python.failure import Failure
 
-def fixSysPath():
-    root = os.path.abspath(os.path.join(os.path.dirname(sys.argv[0]),
-                                        '..')) + '/'
-    sys.path = [
-        root,
-        root + 'env/lib/python3.7',
-        root + 'env/lib/python3.7/plat-x86_64-linux-gnu',
-        root + 'env/lib/python3.7/lib-tk',
-        root + 'env/lib/python3.7/lib-old',
-        root + 'env/lib/python3.7/lib-dynload',
-        '/usr/lib/python3/dist-packages/',
-        '/usr/lib/python3.7',
-        #        '/usr/lib/python3.7/plat-x86_64-linux-gnu',
-        #        '/usr/lib/python3.7/lib-tk',
-        #        root + 'env/local/lib/python3.7/site-packages',
-        #        root + 'env/local/lib/python3.7/site-packages/gtk-2.0',
-        root + 'env/lib/python3.7/site-packages',
-        #        root + 'env/lib/python3.7/site-packages/gtk-2.0',
-    ]
-
-
-fixSysPath()
-
-from twisted.python.failure import Failure
+# to support 'import light9' until I rearrange things better:
+sys.path.append('.')
 
 try:
     import tkinter
--- a/makefile	Tue Apr 05 23:16:12 2022 -0700
+++ b/makefile	Thu Apr 07 01:07:54 2022 -0700
@@ -8,21 +8,6 @@
 gst_packages:
 	sudo aptitude install python3-gi gir1.2-gst-plugins-base-1.0 libgirepository-1.0-1 gir1.2-gstreamer-1.0 gstreamer1.0-tools gstreamer1.0-plugins-good gstreamer1.0-pulseaudio python3-gst-1.0 gir1.2-goocanvas-2.0
 
-PYTHON=/usr/bin/python3
-
-create_virtualenv:
-	mkdir -p env
-	virtualenv -p $(PYTHON) env
-	env/bin/pip install -U pip
-	ln -sf ../env/bin/python bin/python
-
-install_python_deps:
-	env/bin/pip install --index-url https://projects.bigasterisk.com/ --extra-index-url https://pypi.org/simple -U -r requirements.txt
-
-binexec:
-	chmod a+x bin/*
-
-
 node_modules/bower/bin/bower:
 	npm install