# HG changeset patch # User drewp@bigasterisk.com # Date 2022-04-07 08:07:54 # Node ID aeafe7d0b033e01e105ace0852d96f1900fd3a4f # Parent decbbd709f94525c45a1dc43746c14215f21724f have bin/* run via pdm's python config diff --git a/bin/python b/bin/python new file mode 100755 --- /dev/null +++ b/bin/python @@ -0,0 +1,2 @@ +#!/bin/sh +pdm run python3 "$@" diff --git a/bin/run_local.py b/bin/run_local.py --- a/bin/run_local.py +++ b/bin/run_local.py @@ -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 diff --git a/makefile b/makefile --- a/makefile +++ b/makefile @@ -8,21 +8,6 @@ packages: 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