Compare commits
No commits in common. "7d1d8876921857d70d40aac366ee06a1e564be7f" and "0cee9beaea1436bc8f294850343448227cc59aa5" have entirely different histories.
7d1d887692
...
0cee9beaea
2
deps/com.github.aiortc.aiortc
vendored
2
deps/com.github.aiortc.aiortc
vendored
@ -1 +1 @@
|
|||||||
Subproject commit f94ded8fbfe62bea6e96827312eb25853990ecd3
|
Subproject commit 857be4a1fb1c07e2a239b61ce49b34cdd1698467
|
@ -133,24 +133,5 @@
|
|||||||
"key": "ctrl+b",
|
"key": "ctrl+b",
|
||||||
"command": "-extension.vim_ctrl+b",
|
"command": "-extension.vim_ctrl+b",
|
||||||
"when": "editorTextFocus && vim.active && vim.use<C-b> && !inDebugRepl && vim.mode != 'Insert'"
|
"when": "editorTextFocus && vim.active && vim.use<C-b> && !inDebugRepl && vim.mode != 'Insert'"
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "ctrl+w",
|
|
||||||
"command": "-workbench.action.closeActiveEditor"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "ctrl+w",
|
|
||||||
"command": "-workbench.action.closeGroup",
|
|
||||||
"when": "activeEditorGroupEmpty && multipleEditorGroups"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "ctrl+w",
|
|
||||||
"command": "-extension.vim_ctrl+w",
|
|
||||||
"when": "editorTextFocus && vim.active && vim.use<C-w> && !inDebugRepl"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "ctrl+w",
|
|
||||||
"command": "workbench.action.closeActiveEditor",
|
|
||||||
"when": "editorTextFocus"
|
|
||||||
}
|
}
|
||||||
]
|
]
|
@ -47,42 +47,5 @@
|
|||||||
"workbench.preferredHighContrastColorTheme": "Monokai",
|
"workbench.preferredHighContrastColorTheme": "Monokai",
|
||||||
"workbench.preferredHighContrastLightColorTheme": "Monokai",
|
"workbench.preferredHighContrastLightColorTheme": "Monokai",
|
||||||
"workbench.preferredLightColorTheme": "Monokai",
|
"workbench.preferredLightColorTheme": "Monokai",
|
||||||
"mesonbuild.downloadLanguageServer": false,
|
"mesonbuild.downloadLanguageServer": false
|
||||||
// "vim.easymotion": true,
|
|
||||||
// "vim.incsearch": true,
|
|
||||||
"vim.useSystemClipboard": true,
|
|
||||||
// "vim.useCtrlKeys": true,
|
|
||||||
"vim.hlsearch": true,
|
|
||||||
// "vim.insertModeKeyBindings": [
|
|
||||||
// {
|
|
||||||
// "before": ["j", "j"],
|
|
||||||
// "after": ["<Esc>"]
|
|
||||||
// }
|
|
||||||
// ],
|
|
||||||
"vim.normalModeKeyBindingsNonRecursive": [
|
|
||||||
{
|
|
||||||
"before": ["<leader>", "w"],
|
|
||||||
"after": ["<C-w>"],
|
|
||||||
// "after": ["d", "d"]
|
|
||||||
},
|
|
||||||
// {
|
|
||||||
// "before": ["<C-n>"],
|
|
||||||
// "commands": [":nohl"]
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// "before": ["K"],
|
|
||||||
// "commands": ["lineBreakInsert"],
|
|
||||||
// "silent": true
|
|
||||||
// }
|
|
||||||
],
|
|
||||||
"vim.leader": "\\",
|
|
||||||
// "vim.handleKeys": {
|
|
||||||
// "<C-a>": false,
|
|
||||||
// "<C-f>": false
|
|
||||||
// },
|
|
||||||
|
|
||||||
"// To improve performance",
|
|
||||||
"extensions.experimental.affinity": {
|
|
||||||
"vscodevim.vim": 1
|
|
||||||
},
|
|
||||||
}
|
}
|
@ -65,46 +65,6 @@ class CLI(abc.ABC):
|
|||||||
argv,
|
argv,
|
||||||
)
|
)
|
||||||
|
|
||||||
def pip_sync(
|
|
||||||
self,
|
|
||||||
project: str,
|
|
||||||
features: list[str],
|
|
||||||
) -> None:
|
|
||||||
from . import cli_bootstrap
|
|
||||||
|
|
||||||
pyproject = cli_bootstrap.pyproject_load(
|
|
||||||
self.projects[project].source_dir / 'pyproject.toml'
|
|
||||||
)
|
|
||||||
|
|
||||||
dependencies = sum([
|
|
||||||
pyproject.dependencies[o]
|
|
||||||
for o in features
|
|
||||||
], [])
|
|
||||||
|
|
||||||
pip_find_links : list[pathlib.Path] = []
|
|
||||||
|
|
||||||
if not pyproject.pip_find_links is None:
|
|
||||||
pip_find_links.extend(pyproject.pip_find_links)
|
|
||||||
|
|
||||||
|
|
||||||
logger.info(dict(
|
|
||||||
dependencies=dependencies,
|
|
||||||
))
|
|
||||||
|
|
||||||
if len(dependencies) > 0:
|
|
||||||
subprocess.check_call([
|
|
||||||
self.dist_settings.python_path,
|
|
||||||
'-m',
|
|
||||||
'uv', 'pip', 'install',
|
|
||||||
*sum([
|
|
||||||
['-f', str(o),]
|
|
||||||
for o in pip_find_links
|
|
||||||
], []),
|
|
||||||
# '-f', str(pathlib.Path(__file__).parent / 'deps' / 'dist'),
|
|
||||||
'--offline',
|
|
||||||
*dependencies,
|
|
||||||
])
|
|
||||||
|
|
||||||
def deploy_fetch_dist(
|
def deploy_fetch_dist(
|
||||||
self,
|
self,
|
||||||
force: bool,
|
force: bool,
|
||||||
@ -178,16 +138,6 @@ class CLI(abc.ABC):
|
|||||||
latest_file['path'],
|
latest_file['path'],
|
||||||
])
|
])
|
||||||
|
|
||||||
@property
|
|
||||||
def pkg_config_path(self,) -> set[pathlib.Path]:
|
|
||||||
return {
|
|
||||||
pathlib.Path(o)
|
|
||||||
for o in glob.glob(
|
|
||||||
str(self.dist_settings.env_path / 'lib' / 'python*' / '**' / 'pkgconfig'),
|
|
||||||
recursive=True,
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
def deploy_wheel(
|
def deploy_wheel(
|
||||||
self,
|
self,
|
||||||
project_name: str,
|
project_name: str,
|
||||||
@ -206,10 +156,7 @@ class CLI(abc.ABC):
|
|||||||
# Command.meson_setup.value,
|
# Command.meson_setup.value,
|
||||||
# ])
|
# ])
|
||||||
|
|
||||||
if argv is None:
|
assert argv is None or len(argv) == 0
|
||||||
argv = []
|
|
||||||
|
|
||||||
# assert argv is None or len(argv) == 0
|
|
||||||
|
|
||||||
if not project.meson_path is None:
|
if not project.meson_path is None:
|
||||||
self.meson_install(
|
self.meson_install(
|
||||||
@ -223,28 +170,16 @@ class CLI(abc.ABC):
|
|||||||
if env is None:
|
if env is None:
|
||||||
env = dict()
|
env = dict()
|
||||||
|
|
||||||
extra_args: list[str] = []
|
|
||||||
|
|
||||||
if len(self.third_party_roots) > 0:
|
|
||||||
extra_args.extend([
|
|
||||||
'-Csetup-args=%s' % (
|
|
||||||
'-Dthird_party_roots=%s' % str(o.absolute())
|
|
||||||
)
|
|
||||||
for o in self.third_party_roots
|
|
||||||
])
|
|
||||||
|
|
||||||
cmd = [
|
cmd = [
|
||||||
sys.executable,
|
sys.executable,
|
||||||
'-m',
|
'-m',
|
||||||
'build',
|
'build',
|
||||||
'-w', '-n',
|
'-w', '-n',
|
||||||
*extra_args,
|
|
||||||
'-Csetup-args=-Dmodes=pyproject',
|
'-Csetup-args=-Dmodes=pyproject',
|
||||||
'-Cbuild-dir=%s' % str(project.build_dir / 'pyproject'),
|
'-Cbuild-dir=%s' % str(project.build_dir / 'pyproject'),
|
||||||
'-Csetup-args=-Dinstall_path=%s' % str(project.dest_dir),
|
'-Csetup-args=-Dinstall_path=%s' % str(project.dest_dir),
|
||||||
# '-Cbuild-dir=%s' % str(project.build_dir),
|
# '-Cbuild-dir=%s' % str(project.build_dir),
|
||||||
str(project.source_dir),
|
str(project.source_dir),
|
||||||
*argv,
|
|
||||||
]
|
]
|
||||||
|
|
||||||
if not output_dir is None:
|
if not output_dir is None:
|
||||||
@ -334,16 +269,11 @@ class CLI(abc.ABC):
|
|||||||
*argv,
|
*argv,
|
||||||
])
|
])
|
||||||
|
|
||||||
@property
|
|
||||||
def third_party_roots(self) -> list[pathlib.Path]:
|
|
||||||
return []
|
|
||||||
|
|
||||||
def meson_setup(
|
def meson_setup(
|
||||||
self,
|
self,
|
||||||
project_name: str,
|
project_name: str,
|
||||||
force: bool,
|
force: bool,
|
||||||
argv: Optional[list[str]] = None,
|
argv: Optional[list[str]] = None,
|
||||||
# third_party_roots: Optional[list[pathlib.Path]] = None,
|
|
||||||
) -> None:
|
) -> None:
|
||||||
project = self.projects[project_name]
|
project = self.projects[project_name]
|
||||||
|
|
||||||
@ -355,21 +285,12 @@ class CLI(abc.ABC):
|
|||||||
logger.info(dict(action='removing build dir', path=project.build_dir / 'meson'))
|
logger.info(dict(action='removing build dir', path=project.build_dir / 'meson'))
|
||||||
shutil.rmtree(project.build_dir / 'meson')
|
shutil.rmtree(project.build_dir / 'meson')
|
||||||
|
|
||||||
extra_args : list[str] = []
|
|
||||||
|
|
||||||
if len(self.third_party_roots) > 0:
|
|
||||||
extra_args.extend([
|
|
||||||
'-Dthird_party_roots=%s' % str(o.absolute())
|
|
||||||
for o in self.third_party_roots
|
|
||||||
])
|
|
||||||
|
|
||||||
cmd = [
|
cmd = [
|
||||||
shutil_which('meson', True,),
|
shutil_which('meson', True,),
|
||||||
'setup',
|
'setup',
|
||||||
str(project.source_dir),
|
str(project.source_dir),
|
||||||
str(project.build_dir / 'meson'),
|
str(project.build_dir / 'meson'),
|
||||||
'-Dmodes=["meson"]',
|
'-Dmodes=["meson"]',
|
||||||
*extra_args,
|
|
||||||
# '-Dpkgconfig.relocatable=true',
|
# '-Dpkgconfig.relocatable=true',
|
||||||
'-Dprefix=/',
|
'-Dprefix=/',
|
||||||
*argv,
|
*argv,
|
||||||
|
@ -17,9 +17,6 @@ logger = logging.getLogger(__name__)
|
|||||||
class PyProject:
|
class PyProject:
|
||||||
dependencies: dict[str, list[str]]
|
dependencies: dict[str, list[str]]
|
||||||
early_features: Optional[list[str]] = None
|
early_features: Optional[list[str]] = None
|
||||||
pip_find_links: Optional[list[pathlib.Path]] = None
|
|
||||||
runtime_libdirs: Optional[list[pathlib.Path]] = None
|
|
||||||
runtime_preload: Optional[list[pathlib.Path]] = None
|
|
||||||
|
|
||||||
def pyproject_load(
|
def pyproject_load(
|
||||||
d: pathlib.Path,
|
d: pathlib.Path,
|
||||||
@ -45,7 +42,7 @@ def pyproject_load(
|
|||||||
assert isinstance(v, list)
|
assert isinstance(v, list)
|
||||||
assert isinstance(k, str)
|
assert isinstance(k, str)
|
||||||
|
|
||||||
dependencies[k] = v
|
dependencies[k] = v
|
||||||
|
|
||||||
|
|
||||||
res = PyProject(
|
res = PyProject(
|
||||||
@ -68,26 +65,6 @@ def pyproject_load(
|
|||||||
if 'early_features' in content['tool'][tool_name]:
|
if 'early_features' in content['tool'][tool_name]:
|
||||||
res.early_features = content['tool'][tool_name]['early_features']
|
res.early_features = content['tool'][tool_name]['early_features']
|
||||||
|
|
||||||
if 'pip_find_links' in content['tool'][tool_name]:
|
|
||||||
res.pip_find_links = [
|
|
||||||
d.parent / pathlib.Path(o)
|
|
||||||
for o in content['tool'][tool_name]['pip_find_links']
|
|
||||||
]
|
|
||||||
|
|
||||||
if 'runtime_libdirs' in content['tool'][tool_name]:
|
|
||||||
res.runtime_libdirs = [
|
|
||||||
d.parent / pathlib.Path(o)
|
|
||||||
# pathlib.Path(o)
|
|
||||||
for o in content['tool'][tool_name]['runtime_libdirs']
|
|
||||||
]
|
|
||||||
|
|
||||||
if 'runtime_preload' in content['tool'][tool_name]:
|
|
||||||
res.runtime_preload = [
|
|
||||||
d.parent / pathlib.Path(o)
|
|
||||||
# pathlib.Path(o)
|
|
||||||
for o in content['tool'][tool_name]['runtime_preload']
|
|
||||||
]
|
|
||||||
|
|
||||||
return res
|
return res
|
||||||
|
|
||||||
@dataclasses.dataclass
|
@dataclasses.dataclass
|
||||||
@ -138,25 +115,20 @@ def env_bootstrap(
|
|||||||
'build', 'setuptools', 'meson-python', 'pybind11',
|
'build', 'setuptools', 'meson-python', 'pybind11',
|
||||||
])
|
])
|
||||||
|
|
||||||
# early_wheels = glob.glob(
|
early_wheels = glob.glob(
|
||||||
# str(
|
str(
|
||||||
# pathlib.Path(__file__).parent / 'deps' / 'dist' / 'early' / '*.whl'
|
pathlib.Path(__file__).parent / 'deps' / 'dist' / 'early' / '*.whl'
|
||||||
# )
|
)
|
||||||
# )
|
)
|
||||||
|
|
||||||
# if len(early_wheels) > 0:
|
if len(early_wheels) > 0:
|
||||||
# subprocess.check_call([
|
subprocess.check_call([
|
||||||
# bootstrap_settings.python_path,
|
bootstrap_settings.python_path,
|
||||||
# '-m',
|
'-m',
|
||||||
# 'uv', 'pip', 'install',
|
'uv', 'pip', 'install',
|
||||||
# '--offline',
|
'--offline',
|
||||||
# *early_wheels,
|
*early_wheels,
|
||||||
# ])
|
])
|
||||||
|
|
||||||
pip_find_links : list[pathlib.Path] = []
|
|
||||||
|
|
||||||
if not pyproject.pip_find_links is None:
|
|
||||||
pip_find_links.extend(pyproject.pip_find_links)
|
|
||||||
|
|
||||||
if pyproject.early_features:
|
if pyproject.early_features:
|
||||||
early_dependencies = sum([
|
early_dependencies = sum([
|
||||||
@ -167,17 +139,11 @@ def env_bootstrap(
|
|||||||
logger.info(dict(
|
logger.info(dict(
|
||||||
early_dependencies=early_dependencies,
|
early_dependencies=early_dependencies,
|
||||||
))
|
))
|
||||||
|
|
||||||
if len(early_dependencies) > 0:
|
if len(early_dependencies) > 0:
|
||||||
subprocess.check_call([
|
subprocess.check_call([
|
||||||
bootstrap_settings.python_path,
|
bootstrap_settings.python_path,
|
||||||
'-m',
|
'-m',
|
||||||
'uv', 'pip', 'install',
|
'uv', 'pip', 'install',
|
||||||
*sum([
|
|
||||||
['-f', str(o),]
|
|
||||||
for o in pip_find_links
|
|
||||||
], []),
|
|
||||||
# '-f', str(pathlib.Path(__file__).parent / 'deps' / 'dist'),
|
|
||||||
'--offline',
|
'--offline',
|
||||||
*early_dependencies,
|
*early_dependencies,
|
||||||
])
|
])
|
||||||
|
@ -1,17 +1,7 @@
|
|||||||
import shutil
|
import shutil
|
||||||
import glob
|
|
||||||
import pathlib
|
|
||||||
import ctypes
|
|
||||||
import os
|
|
||||||
import sys
|
|
||||||
import logging
|
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
|
||||||
|
|
||||||
from typing import (overload, Optional, Literal,)
|
from typing import (overload, Optional, Literal,)
|
||||||
|
|
||||||
from .cli_bootstrap import PyProject
|
|
||||||
|
|
||||||
@overload
|
@overload
|
||||||
def shutil_which(
|
def shutil_which(
|
||||||
name: str,
|
name: str,
|
||||||
@ -32,61 +22,4 @@ def shutil_which(
|
|||||||
if res is None and raise_on_failure:
|
if res is None and raise_on_failure:
|
||||||
raise NotImplementedError
|
raise NotImplementedError
|
||||||
else:
|
else:
|
||||||
return res
|
return res
|
||||||
|
|
||||||
def runtime_libdirs_init(
|
|
||||||
project: PyProject,
|
|
||||||
) -> None:
|
|
||||||
if sys.platform == 'linux':
|
|
||||||
ld_library_path : list[pathlib.Path] = [
|
|
||||||
o
|
|
||||||
for o in [
|
|
||||||
*[
|
|
||||||
o.absolute()
|
|
||||||
for o in (
|
|
||||||
project.runtime_libdirs
|
|
||||||
if project.runtime_libdirs
|
|
||||||
else []
|
|
||||||
)
|
|
||||||
],
|
|
||||||
*[
|
|
||||||
pathlib.Path(o)
|
|
||||||
for o in os.environ.get(
|
|
||||||
'LD_LIBRARY_PATH',
|
|
||||||
''
|
|
||||||
).split(os.path.pathsep)
|
|
||||||
if o != ''
|
|
||||||
]
|
|
||||||
]
|
|
||||||
]
|
|
||||||
|
|
||||||
ld_library_path_present : list[pathlib.Path] = []
|
|
||||||
|
|
||||||
for o in ld_library_path:
|
|
||||||
if not o.exists():
|
|
||||||
logger.warning(dict(
|
|
||||||
ld_library_path=o,
|
|
||||||
msg='not found',
|
|
||||||
))
|
|
||||||
|
|
||||||
ld_library_path_present.append(o)
|
|
||||||
|
|
||||||
os.environ.update(
|
|
||||||
LD_LIBRARY_PATH=os.path.pathsep.join([
|
|
||||||
str(o) for o in ld_library_path_present
|
|
||||||
])
|
|
||||||
)
|
|
||||||
|
|
||||||
for preload_path in (project.runtime_preload or []):
|
|
||||||
for preload_found in glob.glob(str(
|
|
||||||
preload_path.parent / ('lib%s.so' % preload_path.name)
|
|
||||||
)):
|
|
||||||
logger.info(dict(
|
|
||||||
preload_path=preload_path, preload_found=preload_found,
|
|
||||||
# lib_path=o,
|
|
||||||
msg='load_library',
|
|
||||||
))
|
|
||||||
|
|
||||||
ctypes.cdll.LoadLibrary(preload_found)
|
|
||||||
else:
|
|
||||||
raise NotImplementedError
|
|
@ -1,10 +0,0 @@
|
|||||||
import pip._internal.commands.show
|
|
||||||
|
|
||||||
def pip_show(
|
|
||||||
argv: list[str],
|
|
||||||
) -> list[pip._internal.commands.show._PackageInfo]:
|
|
||||||
return list(
|
|
||||||
pip._internal.commands.show.search_packages_info(
|
|
||||||
argv,
|
|
||||||
)
|
|
||||||
)
|
|
@ -1,6 +1,6 @@
|
|||||||
[project]
|
[project]
|
||||||
name = 'online.fxreader.pr34'
|
name = 'online.fxreader.pr34'
|
||||||
version = '0.1.4.8'
|
version = '0.1.1'
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
#"-r requirements.txt",
|
#"-r requirements.txt",
|
||||||
@ -38,8 +38,8 @@ include-package-data = false
|
|||||||
#exclude = ['*']
|
#exclude = ['*']
|
||||||
#include = ['*.py']
|
#include = ['*.py']
|
||||||
|
|
||||||
# [tool.setuptools.exclude-package-data]
|
[tool.setuptools.exclude-package-data]
|
||||||
# 'online.fxreader.pr34' = ['online/fxreader/pr34/py.typed']
|
'online.fxreader.pr34' = ['online/fxreader/pr34/py.typed']
|
||||||
|
|
||||||
#[tool.setuptools.package-data]
|
#[tool.setuptools.package-data]
|
||||||
#'online_fxreader.vpn' = ['requirements.txt']
|
#'online_fxreader.vpn' = ['requirements.txt']
|
||||||
|
Loading…
Reference in New Issue
Block a user