Compare commits
4 Commits
master
...
27-fix-htt
Author | SHA1 | Date | |
---|---|---|---|
a912e1b6bf | |||
fdcd67aae6 | |||
799280f074 | |||
202bf85f55 |
2
deps/com.github.aiortc.aiortc
vendored
2
deps/com.github.aiortc.aiortc
vendored
@ -1 +1 @@
|
|||||||
Subproject commit adef10a8c41f5c550622879370a40f8a9e545574
|
Subproject commit e52e1c22071d49ff23768dfefd1b33b94552ff6d
|
2
deps/online.fxreader.nartes.books
vendored
2
deps/online.fxreader.nartes.books
vendored
@ -1 +1 @@
|
|||||||
Subproject commit 3c691ef68d8899edf328d5b06135c0d3b02e7940
|
Subproject commit f2366f328fb8129fa6ae26d00b421025d2f090c7
|
@ -1158,6 +1158,7 @@ done'
|
|||||||
)
|
)
|
||||||
|
|
||||||
def http_server(argv):
|
def http_server(argv):
|
||||||
|
from .commands_typed import os as commands_os
|
||||||
assert isinstance(argv, list) and all([isinstance(o, str) for o in argv])
|
assert isinstance(argv, list) and all([isinstance(o, str) for o in argv])
|
||||||
parser = optparse.OptionParser()
|
parser = optparse.OptionParser()
|
||||||
parser.add_option(
|
parser.add_option(
|
||||||
@ -1215,10 +1216,17 @@ def http_server(argv):
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
assert not socket.inet_aton(options.host) is None
|
assert not socket.inet_aton(options.host) is None
|
||||||
subprocess.check_call([
|
# subprocess.check_call([
|
||||||
'ping', '-w', '1',
|
# 'ping', '-w', '1',
|
||||||
options.host
|
# options.host
|
||||||
])
|
# ])
|
||||||
|
assert options.host in sum([
|
||||||
|
[
|
||||||
|
o2.local
|
||||||
|
for o2 in o.addr_info
|
||||||
|
]
|
||||||
|
for o in commands_os.interfaces_index()
|
||||||
|
], [])
|
||||||
except Exception:
|
except Exception:
|
||||||
raise RuntimeError('invalid ip address %s' % options.host)
|
raise RuntimeError('invalid ip address %s' % options.host)
|
||||||
|
|
||||||
|
@ -65,42 +65,6 @@ class CLI(abc.ABC):
|
|||||||
argv,
|
argv,
|
||||||
)
|
)
|
||||||
|
|
||||||
def ruff(
|
|
||||||
self,
|
|
||||||
project_name: str,
|
|
||||||
argv: list[str],
|
|
||||||
) -> None:
|
|
||||||
project = self.projects[project_name]
|
|
||||||
|
|
||||||
if len(argv) == 0:
|
|
||||||
argv = ['check', '.',]
|
|
||||||
|
|
||||||
subprocess.check_call([
|
|
||||||
self.dist_settings.python_path,
|
|
||||||
'-m',
|
|
||||||
'ruff',
|
|
||||||
'--config', str(project.source_dir / 'pyproject.toml'),
|
|
||||||
*argv,
|
|
||||||
])
|
|
||||||
|
|
||||||
def pyright(
|
|
||||||
self,
|
|
||||||
project_name: str,
|
|
||||||
argv: list[str],
|
|
||||||
) -> None:
|
|
||||||
project = self.projects[project_name]
|
|
||||||
|
|
||||||
if len(argv) == 0:
|
|
||||||
argv = ['--threads', '3', '.']
|
|
||||||
|
|
||||||
subprocess.check_call([
|
|
||||||
self.dist_settings.python_path,
|
|
||||||
'-m',
|
|
||||||
'pyright',
|
|
||||||
'-p', str(project.source_dir / 'pyproject.toml'),
|
|
||||||
*argv,
|
|
||||||
])
|
|
||||||
|
|
||||||
def pip_sync(
|
def pip_sync(
|
||||||
self,
|
self,
|
||||||
project: str,
|
project: str,
|
||||||
@ -302,16 +266,15 @@ class CLI(abc.ABC):
|
|||||||
env=dict(list(os.environ.items())) | env,
|
env=dict(list(os.environ.items())) | env,
|
||||||
)
|
)
|
||||||
|
|
||||||
if not project.meson_path is None:
|
if tests:
|
||||||
if tests:
|
subprocess.check_call(
|
||||||
subprocess.check_call(
|
[
|
||||||
[
|
'ninja',
|
||||||
'ninja',
|
'-C',
|
||||||
'-C',
|
str(project.build_dir / 'pyproject'),
|
||||||
str(project.build_dir / 'pyproject'),
|
'test',
|
||||||
'test',
|
]
|
||||||
]
|
)
|
||||||
)
|
|
||||||
|
|
||||||
def meson_install(
|
def meson_install(
|
||||||
self,
|
self,
|
||||||
|
@ -1,14 +1,17 @@
|
|||||||
import shutil
|
import shutil
|
||||||
import glob
|
import glob
|
||||||
|
import subprocess
|
||||||
|
import pydantic
|
||||||
import pathlib
|
import pathlib
|
||||||
import ctypes
|
import ctypes
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
import logging
|
import logging
|
||||||
|
import dataclasses
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
from typing import (overload, Optional, Literal,)
|
from typing import (overload, Optional, Literal, Any, Annotated,)
|
||||||
|
|
||||||
from .cli_bootstrap import PyProject
|
from .cli_bootstrap import PyProject
|
||||||
|
|
||||||
@ -90,3 +93,30 @@ def runtime_libdirs_init(
|
|||||||
ctypes.cdll.LoadLibrary(preload_found)
|
ctypes.cdll.LoadLibrary(preload_found)
|
||||||
else:
|
else:
|
||||||
raise NotImplementedError
|
raise NotImplementedError
|
||||||
|
|
||||||
|
class interfaces_index_t:
|
||||||
|
@dataclasses.dataclass
|
||||||
|
class Interface:
|
||||||
|
@dataclasses.dataclass
|
||||||
|
class AddrInfo:
|
||||||
|
family: str
|
||||||
|
local: str
|
||||||
|
|
||||||
|
name: Annotated[
|
||||||
|
str,
|
||||||
|
pydantic.Field(
|
||||||
|
alias='ifname',
|
||||||
|
)
|
||||||
|
]
|
||||||
|
addr_info: list[AddrInfo]
|
||||||
|
|
||||||
|
def interfaces_index() -> list[interfaces_index_t.Interface]:
|
||||||
|
res = pydantic.RootModel[
|
||||||
|
list[interfaces_index_t.Interface]
|
||||||
|
].model_validate_json(
|
||||||
|
subprocess.check_output([
|
||||||
|
'ip', '-j', 'addr',
|
||||||
|
]).decode('utf-8')
|
||||||
|
).root
|
||||||
|
|
||||||
|
return res
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[project]
|
[project]
|
||||||
name = 'online.fxreader.pr34'
|
name = 'online.fxreader.pr34'
|
||||||
version = '0.1.5.11'
|
version = '0.1.5.9+27.2'
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
#"-r requirements.txt",
|
#"-r requirements.txt",
|
||||||
|
BIN
releases/whl/online_fxreader_pr34-0.1.5.10-py3-none-any.whl
(Stored with Git LFS)
BIN
releases/whl/online_fxreader_pr34-0.1.5.10-py3-none-any.whl
(Stored with Git LFS)
Binary file not shown.
BIN
releases/whl/online_fxreader_pr34-0.1.5.9+27.1-py3-none-any.whl
(Stored with Git LFS)
Normal file
BIN
releases/whl/online_fxreader_pr34-0.1.5.9+27.1-py3-none-any.whl
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
releases/whl/online_fxreader_pr34-0.1.5.9+27.2-py3-none-any.whl
(Stored with Git LFS)
Normal file
BIN
releases/whl/online_fxreader_pr34-0.1.5.9+27.2-py3-none-any.whl
(Stored with Git LFS)
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user