Compare commits
6 Commits
d38022b5a6
...
eb457950d3
Author | SHA1 | Date | |
---|---|---|---|
eb457950d3 | |||
4afe4048d9 | |||
74cc54ae85 | |||
fd0dbb0c4a | |||
d0b696206c | |||
92966ca86d |
3
.gitignore
vendored
3
.gitignore
vendored
@ -10,4 +10,5 @@ d2/book1/books
|
|||||||
*.egg-info
|
*.egg-info
|
||||||
*.whl
|
*.whl
|
||||||
*.tar.gz
|
*.tar.gz
|
||||||
.code
|
.vscode/*
|
||||||
|
!.vscode/launch.json
|
||||||
|
49
.vscode/launch.json
vendored
Normal file
49
.vscode/launch.json
vendored
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
{
|
||||||
|
// Use IntelliSense to learn about possible attributes.
|
||||||
|
// Hover to view descriptions of existing attributes.
|
||||||
|
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
||||||
|
"version": "0.2.0",
|
||||||
|
"configurations": [
|
||||||
|
/*
|
||||||
|
{
|
||||||
|
"name": "Python Debugger: Module",
|
||||||
|
"type": "debugpy",
|
||||||
|
"request": "launch",
|
||||||
|
"module": "online_fxreader.vpn.vpn",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Python Debugger: Current File with Arguments",
|
||||||
|
"type": "debugpy",
|
||||||
|
"request": "launch",
|
||||||
|
"program": "${file}",
|
||||||
|
"console": "integratedTerminal",
|
||||||
|
"args": [
|
||||||
|
"${command:pickArgs}"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
*/
|
||||||
|
{
|
||||||
|
"name": "Python Debugger: Remote Attach",
|
||||||
|
"type": "debugpy",
|
||||||
|
"request": "attach",
|
||||||
|
"connect": {
|
||||||
|
"host": "127.0.0.1",
|
||||||
|
"port": 4444
|
||||||
|
},
|
||||||
|
"pathMappings": [
|
||||||
|
/*
|
||||||
|
{
|
||||||
|
"localRoot": "${workspaceFolder}/deps/com.github.aiortc.aiortc/src/",
|
||||||
|
//"remoteRoot": "."
|
||||||
|
"remoteRoot": "~/.local/bin/env3/lib/python3.12/site-packages/",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"localRoot": "${workspaceFolder}/deps/com.github.aiortc.aiortc/",
|
||||||
|
//"remoteRoot": "."
|
||||||
|
"remoteRoot": "~/.local/bin/env3/lib/python3.12/site-packages/",
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
18
Makefile
18
Makefile
@ -22,6 +22,12 @@ python_clean_env:
|
|||||||
rm -fr \
|
rm -fr \
|
||||||
$(INSTALL_ROOT)/env3;
|
$(INSTALL_ROOT)/env3;
|
||||||
|
|
||||||
|
python_put_env:
|
||||||
|
[[ -d $(INSTALL_ROOT)/env3 ]] || (\
|
||||||
|
uv venv --system-site-packages --seed $(INSTALL_ROOT)/env3 && \
|
||||||
|
$(INSTALL_ROOT)/env3/bin/python3 -m pip install uv \
|
||||||
|
);
|
||||||
|
|
||||||
python_clean_dist:
|
python_clean_dist:
|
||||||
for o in $(PYTHON_PROJECTS); do \
|
for o in $(PYTHON_PROJECTS); do \
|
||||||
[[ -d $$o/dist ]] || continue; \
|
[[ -d $$o/dist ]] || continue; \
|
||||||
@ -31,20 +37,18 @@ python_clean_dist:
|
|||||||
|
|
||||||
python_clean: python_clean_dist python_clean_env
|
python_clean: python_clean_dist python_clean_env
|
||||||
|
|
||||||
python_put:
|
python_put_dist:
|
||||||
[[ -d $(INSTALL_ROOT)/env3 ]] || (\
|
|
||||||
uv venv --system-site-packages --seed $(INSTALL_ROOT)/env3 && \
|
|
||||||
$(INSTALL_ROOT)/env3/bin/python3 -m pip install uv \
|
|
||||||
);
|
|
||||||
for f in \
|
for f in \
|
||||||
$(PYTHON_PROJECTS); do \
|
$(PYTHON_PROJECTS); do \
|
||||||
[[ -d $$f/dist ]] && continue; \
|
[[ -d $$f/dist ]] && continue; \
|
||||||
echo $$f; \
|
echo $$f; \
|
||||||
python3 -m build --installer uv $$f; \
|
python3 -m build -n $$f; \
|
||||||
$(INSTALL_ROOT)/env3/bin/python3 -m uv pip install $$f/dist/*.whl; \
|
$(INSTALL_ROOT)/env3/bin/python3 -m uv pip install --offline $$f/dist/*.whl; \
|
||||||
done
|
done
|
||||||
ln -sf $(INSTALL_ROOT)/env3/bin/online-fxreader-pr34-commands $(INSTALL_ROOT)/commands
|
ln -sf $(INSTALL_ROOT)/env3/bin/online-fxreader-pr34-commands $(INSTALL_ROOT)/commands
|
||||||
|
|
||||||
|
python_put: python_put_dist python_put_env
|
||||||
|
|
||||||
dotfiles_put:
|
dotfiles_put:
|
||||||
mkdir -p $(INSTALL_ROOT)
|
mkdir -p $(INSTALL_ROOT)
|
||||||
cp dotfiles/.local/bin/gnome-shortcuts-macbook-air $(INSTALL_ROOT)/
|
cp dotfiles/.local/bin/gnome-shortcuts-macbook-air $(INSTALL_ROOT)/
|
||||||
|
2
deps/com.github.aiortc.aiortc
vendored
2
deps/com.github.aiortc.aiortc
vendored
@ -1 +1 @@
|
|||||||
Subproject commit adef10a8c41f5c550622879370a40f8a9e545574
|
Subproject commit 1c8f054d29bfa9dae897f6101f95e8eb4f920305
|
@ -99,5 +99,30 @@
|
|||||||
"key": "alt+r",
|
"key": "alt+r",
|
||||||
"command": "-toggleSearchEditorRegex",
|
"command": "-toggleSearchEditorRegex",
|
||||||
"when": "inSearchEditor && searchInputBoxFocus"
|
"when": "inSearchEditor && searchInputBoxFocus"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "ctrl+/",
|
||||||
|
"command": "-editor.action.accessibleViewAcceptInlineCompletion",
|
||||||
|
"when": "accessibleViewIsShown && accessibleViewCurrentProviderId == 'inlineCompletions'"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "ctrl+k ctrl+/",
|
||||||
|
"command": "-editor.foldAllBlockComments",
|
||||||
|
"when": "editorTextFocus && foldingEnabled"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "ctrl+/",
|
||||||
|
"command": "-toggleExplainMode",
|
||||||
|
"when": "suggestWidgetVisible"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "ctrl+/",
|
||||||
|
"command": "-workbench.action.chat.attachContext",
|
||||||
|
"when": "inChatInput && chatLocation == 'editing-session' || inChatInput && chatLocation == 'editor' || inChatInput && chatLocation == 'notebook' || inChatInput && chatLocation == 'panel' || inChatInput && chatLocation == 'terminal'"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "ctrl+/",
|
||||||
|
"command": "-workbench.action.terminal.sendSequence",
|
||||||
|
"when": "terminalFocus"
|
||||||
}
|
}
|
||||||
]
|
]
|
@ -2,5 +2,8 @@
|
|||||||
"editor.wordWrap": "on",
|
"editor.wordWrap": "on",
|
||||||
"editor.minimap.autohide": true,
|
"editor.minimap.autohide": true,
|
||||||
"editor.minimap.maxColumn": 80,
|
"editor.minimap.maxColumn": 80,
|
||||||
"editor.minimap.size": "fit"
|
"editor.minimap.size": "fit",
|
||||||
|
"diffEditor.hideUnchangedRegions.enabled": true,
|
||||||
|
"python.experiments.enabled": false,
|
||||||
|
"debugpy.debugJustMyCode": false
|
||||||
}
|
}
|
@ -1625,6 +1625,7 @@ def vpn(argv: list[str]) -> None:
|
|||||||
'sudo',
|
'sudo',
|
||||||
*python_path,
|
*python_path,
|
||||||
'-B',
|
'-B',
|
||||||
|
'-Xfrozen_modules=off',
|
||||||
'-m',
|
'-m',
|
||||||
'online_fxreader.vpn.vpn',
|
'online_fxreader.vpn.vpn',
|
||||||
*argv,
|
*argv,
|
||||||
|
35
python/online/fxreader/pr34/commands_typed/debug.py
Normal file
35
python/online/fxreader/pr34/commands_typed/debug.py
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
import os
|
||||||
|
import logging
|
||||||
|
|
||||||
|
from typing import (Optional,)
|
||||||
|
|
||||||
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
class DebugPy:
|
||||||
|
@classmethod
|
||||||
|
def set_trace(
|
||||||
|
cls,
|
||||||
|
host: Optional[str] = None,
|
||||||
|
port: Optional[int] = None,
|
||||||
|
wait: Optional[bool] = None,
|
||||||
|
) -> None:
|
||||||
|
if host is None:
|
||||||
|
host = '127.0.0.1'
|
||||||
|
if port is None:
|
||||||
|
port = 4444
|
||||||
|
if wait is None:
|
||||||
|
wait = True
|
||||||
|
|
||||||
|
import debugpy
|
||||||
|
|
||||||
|
if os.environ.get('DEBUGPY_RUNNING') != 'true':
|
||||||
|
logger.info('debugpy init')
|
||||||
|
import debugpy
|
||||||
|
debugpy.listen((host, port))
|
||||||
|
os.environ['DEBUGPY_RUNNING'] = 'true'
|
||||||
|
|
||||||
|
if wait:
|
||||||
|
debugpy.wait_for_client()
|
||||||
|
debugpy.breakpoint()
|
||||||
|
|
||||||
|
logger.info('debugpy done')
|
@ -1,8 +1,12 @@
|
|||||||
import logging
|
import logging
|
||||||
|
from typing import (Optional,)
|
||||||
|
|
||||||
|
def setup(level: Optional[int] = None) -> None:
|
||||||
|
if level is None:
|
||||||
|
level = logging.INFO
|
||||||
|
|
||||||
def setup() -> None:
|
|
||||||
logging.basicConfig(
|
logging.basicConfig(
|
||||||
level=logging.INFO,
|
level=level,
|
||||||
format=(
|
format=(
|
||||||
'%(levelname)s:%(name)s:%(message)s'
|
'%(levelname)s:%(name)s:%(message)s'
|
||||||
':%(process)d'
|
':%(process)d'
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[project]
|
[project]
|
||||||
name = 'online.fxreader.pr34'
|
name = 'online.fxreader.pr34'
|
||||||
version = '0.1'
|
version = '0.1.1'
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
#"-r requirements.txt",
|
#"-r requirements.txt",
|
||||||
|
Loading…
Reference in New Issue
Block a user