bec-widgets 0.72.1__py3-none-any.whl → 0.72.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- CHANGELOG.md +6 -6
- PKG-INFO +1 -1
- bec_widgets/utils/bec_designer.py +50 -1
- {bec_widgets-0.72.1.dist-info → bec_widgets-0.72.2.dist-info}/METADATA +1 -1
- {bec_widgets-0.72.1.dist-info → bec_widgets-0.72.2.dist-info}/RECORD +9 -9
- pyproject.toml +1 -1
- {bec_widgets-0.72.1.dist-info → bec_widgets-0.72.2.dist-info}/WHEEL +0 -0
- {bec_widgets-0.72.1.dist-info → bec_widgets-0.72.2.dist-info}/entry_points.txt +0 -0
- {bec_widgets-0.72.1.dist-info → bec_widgets-0.72.2.dist-info}/licenses/LICENSE +0 -0
CHANGELOG.md
CHANGED
@@ -1,5 +1,11 @@
|
|
1
1
|
# CHANGELOG
|
2
2
|
|
3
|
+
## v0.72.2 (2024-06-25)
|
4
|
+
|
5
|
+
### Fix
|
6
|
+
|
7
|
+
* fix(designer): fixed designer for pyenv and venv; closes #237 ([`e631fc1`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/e631fc15d8707b73d58cb64316e115a7e43961ea))
|
8
|
+
|
3
9
|
## v0.72.1 (2024-06-24)
|
4
10
|
|
5
11
|
### Fix
|
@@ -147,9 +153,3 @@ in their parent process ([`ce37416`](https://gitlab.psi.ch/bec/bec_widgets/-/com
|
|
147
153
|
### Fix
|
148
154
|
|
149
155
|
* fix: fixed shutdown for pyside ([`2718bc6`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/2718bc624731301756df524d0d5beef6cb1c1430))
|
150
|
-
|
151
|
-
## v0.66.0 (2024-06-20)
|
152
|
-
|
153
|
-
### Feature
|
154
|
-
|
155
|
-
* feat(rpc): discover widgets automatically ([`ef25f56`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/ef25f5638032f931ceb292540ada618508bb2aed))
|
PKG-INFO
CHANGED
@@ -1,4 +1,7 @@
|
|
1
|
+
import importlib.metadata
|
2
|
+
import json
|
1
3
|
import os
|
4
|
+
import site
|
2
5
|
import sys
|
3
6
|
import sysconfig
|
4
7
|
from pathlib import Path
|
@@ -9,15 +12,55 @@ if PYSIDE6:
|
|
9
12
|
from PySide6.scripts.pyside_tool import (
|
10
13
|
_extend_path_var,
|
11
14
|
init_virtual_env,
|
15
|
+
qt_tool_wrapper,
|
12
16
|
is_pyenv_python,
|
13
17
|
is_virtual_env,
|
14
|
-
qt_tool_wrapper,
|
15
18
|
ui_tool_binary,
|
16
19
|
)
|
17
20
|
|
18
21
|
import bec_widgets
|
19
22
|
|
20
23
|
|
24
|
+
def list_editable_packages() -> list[tuple[str, str]]:
|
25
|
+
"""
|
26
|
+
List all editable packages in the environment.
|
27
|
+
|
28
|
+
Returns:
|
29
|
+
list[tuple[str, str]]: A list of tuples containing the package name and the path to the package.
|
30
|
+
"""
|
31
|
+
|
32
|
+
editable_packages = set()
|
33
|
+
|
34
|
+
# Get site-packages directories
|
35
|
+
site_packages = site.getsitepackages()
|
36
|
+
if hasattr(site, "getusersitepackages"):
|
37
|
+
site_packages.append(site.getusersitepackages())
|
38
|
+
|
39
|
+
for dist in importlib.metadata.distributions():
|
40
|
+
location = dist.locate_file("").resolve()
|
41
|
+
is_editable = all(not str(location).startswith(site_pkg) for site_pkg in site_packages)
|
42
|
+
|
43
|
+
if is_editable:
|
44
|
+
editable_packages.add(str(location))
|
45
|
+
|
46
|
+
for packages in site_packages:
|
47
|
+
# all dist-info directories in site-packages that contain a direct_url.json file
|
48
|
+
dist_info_dirs = Path(packages).rglob("*.dist-info")
|
49
|
+
for dist_info_dir in dist_info_dirs:
|
50
|
+
direct_url = dist_info_dir / "direct_url.json"
|
51
|
+
if not direct_url.exists():
|
52
|
+
continue
|
53
|
+
# load the json file and get the path to the package
|
54
|
+
with open(direct_url, "r", encoding="utf-8") as f:
|
55
|
+
data = json.load(f)
|
56
|
+
path = data.get("url", "")
|
57
|
+
if path.startswith("file://"):
|
58
|
+
path = path[7:]
|
59
|
+
editable_packages.add(path)
|
60
|
+
|
61
|
+
return editable_packages
|
62
|
+
|
63
|
+
|
21
64
|
def patch_designer(): # pragma: no cover
|
22
65
|
if not PYSIDE6:
|
23
66
|
print("PYSIDE6 is not available in the environment. Cannot patch designer.")
|
@@ -40,6 +83,12 @@ def patch_designer(): # pragma: no cover
|
|
40
83
|
library_name = f"libpython{major_version}.{minor_version}.dylib"
|
41
84
|
lib_path = str(Path(sysconfig.get_config_var("LIBDIR")) / library_name)
|
42
85
|
os.environ["DYLD_INSERT_LIBRARIES"] = lib_path
|
86
|
+
|
87
|
+
if is_pyenv_python() or is_virtual_env():
|
88
|
+
# append all editable packages to the PYTHONPATH
|
89
|
+
editable_packages = list_editable_packages()
|
90
|
+
for pckg in editable_packages:
|
91
|
+
_extend_path_var("PYTHONPATH", pckg, True)
|
43
92
|
elif sys.platform == "win32":
|
44
93
|
if is_virtual_env():
|
45
94
|
_extend_path_var("PATH", os.fspath(Path(sys._base_executable).parent), True)
|
@@ -2,11 +2,11 @@
|
|
2
2
|
.gitlab-ci.yml,sha256=RnYDz4zKXjlqltTryprlB1s5vLXxI2-seW-Vb70NNF0,8162
|
3
3
|
.pylintrc,sha256=OstrgmEyP0smNFBKoIN5_26-UmNZgMHnbjvAWX0UrLs,18535
|
4
4
|
.readthedocs.yaml,sha256=aSOc277LqXcsTI6lgvm_JY80lMlr69GbPKgivua2cS0,603
|
5
|
-
CHANGELOG.md,sha256=
|
5
|
+
CHANGELOG.md,sha256=AaBdg_zGOP0iVHGQZJ_fTkb3RLAvQ-4uGoIoLvLJdxA,7452
|
6
6
|
LICENSE,sha256=YRKe85CBRyP7UpEAWwU8_qSIyuy5-l_9C-HKg5Qm8MQ,1511
|
7
|
-
PKG-INFO,sha256=
|
7
|
+
PKG-INFO,sha256=mg37DoQMxkIsyA4lJXFyGNELbsvy76rdiBsAWETxMW8,1302
|
8
8
|
README.md,sha256=y4jB6wvArS7N8_iTbKWnSM_oRAqLA2GqgzUR-FMh5sU,2645
|
9
|
-
pyproject.toml,sha256=
|
9
|
+
pyproject.toml,sha256=dI3a7QcP6s6mxX5XGOExxFAIUVbVRrHwCJRM0KLVkxc,2215
|
10
10
|
.git_hooks/pre-commit,sha256=n3RofIZHJl8zfJJIUomcMyYGFi_rwq4CC19z0snz3FI,286
|
11
11
|
.gitlab/issue_templates/bug_report_template.md,sha256=gAuyEwl7XlnebBrkiJ9AqffSNOywmr8vygUFWKTuQeI,386
|
12
12
|
.gitlab/issue_templates/documentation_update_template.md,sha256=FHLdb3TS_D9aL4CYZCjyXSulbaW5mrN2CmwTaeLPbNw,860
|
@@ -39,7 +39,7 @@ bec_widgets/examples/plugin_example_pyside/tictactoeplugin.py,sha256=BBt3MD8oDLU
|
|
39
39
|
bec_widgets/examples/plugin_example_pyside/tictactoetaskmenu.py,sha256=LNwplI6deUdKY6FOhUuWBanotxk9asF2G-6k7lFfA8Y,2301
|
40
40
|
bec_widgets/utils/__init__.py,sha256=1930ji1Jj6dVuY81Wd2kYBhHYNV-2R0bN_L4o9zBj1U,533
|
41
41
|
bec_widgets/utils/bec_connector.py,sha256=3BNkb83HZDNL_fwbvMnG6FM28VTmlsndnc4z84E3v1w,7286
|
42
|
-
bec_widgets/utils/bec_designer.py,sha256=
|
42
|
+
bec_widgets/utils/bec_designer.py,sha256=2ay6c7dLozV06vsJcceoMRe78ePxQf_7pxnrEZjOrB8,4386
|
43
43
|
bec_widgets/utils/bec_dispatcher.py,sha256=yM9PG04O7ABhiA9Nzk38Rv9Qbjc5O93wi2xfSbOlOxc,6202
|
44
44
|
bec_widgets/utils/bec_table.py,sha256=nA2b8ukSeUfquFMAxGrUVOqdrzMoDYD6O_4EYbOG2zk,717
|
45
45
|
bec_widgets/utils/colors.py,sha256=GYSDe0ZxsJSwxvuy-yG2BH17qlf_Sjq8dhDcyp9IhBI,8532
|
@@ -210,8 +210,8 @@ tests/unit_tests/test_configs/config_device_no_entry.yaml,sha256=hdvue9KLc_kfNzG
|
|
210
210
|
tests/unit_tests/test_configs/config_scan.yaml,sha256=vo484BbWOjA_e-h6bTjSV9k7QaQHrlAvx-z8wtY-P4E,1915
|
211
211
|
tests/unit_tests/test_msgs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
212
212
|
tests/unit_tests/test_msgs/available_scans_message.py,sha256=m_z97hIrjHXXMa2Ex-UvsPmTxOYXfjxyJaGkIY6StTY,46532
|
213
|
-
bec_widgets-0.72.
|
214
|
-
bec_widgets-0.72.
|
215
|
-
bec_widgets-0.72.
|
216
|
-
bec_widgets-0.72.
|
217
|
-
bec_widgets-0.72.
|
213
|
+
bec_widgets-0.72.2.dist-info/METADATA,sha256=mg37DoQMxkIsyA4lJXFyGNELbsvy76rdiBsAWETxMW8,1302
|
214
|
+
bec_widgets-0.72.2.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
|
215
|
+
bec_widgets-0.72.2.dist-info/entry_points.txt,sha256=3otEkCdDB9LZJuBLzG4pFLK5Di0CVybN_12IsZrQ-58,166
|
216
|
+
bec_widgets-0.72.2.dist-info/licenses/LICENSE,sha256=YRKe85CBRyP7UpEAWwU8_qSIyuy5-l_9C-HKg5Qm8MQ,1511
|
217
|
+
bec_widgets-0.72.2.dist-info/RECORD,,
|
pyproject.toml
CHANGED
File without changes
|
File without changes
|
File without changes
|