meerschaum 2.4.0rc2__py3-none-any.whl → 2.4.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.
- meerschaum/actions/bootstrap.py +1 -1
- meerschaum/api/dash/callbacks/dashboard.py +7 -0
- meerschaum/api/dash/callbacks/pipes.py +19 -5
- meerschaum/api/dash/pipes.py +17 -2
- meerschaum/config/__init__.py +9 -9
- meerschaum/config/_read_config.py +10 -10
- meerschaum/config/_sync.py +20 -13
- meerschaum/config/_version.py +1 -1
- meerschaum/config/stack/__init__.py +1 -1
- meerschaum/connectors/api/_APIConnector.py +2 -1
- meerschaum/connectors/sql/_create_engine.py +64 -67
- meerschaum/connectors/sql/_pipes.py +8 -5
- meerschaum/core/Pipe/_data.py +16 -7
- meerschaum/core/Pipe/_sync.py +0 -2
- meerschaum/jobs/__init__.py +2 -1
- meerschaum/utils/packages/__init__.py +176 -124
- meerschaum/utils/packages/_packages.py +4 -1
- meerschaum/utils/schedule.py +1 -0
- meerschaum/utils/venv/__init__.py +10 -9
- {meerschaum-2.4.0rc2.dist-info → meerschaum-2.4.2.dist-info}/METADATA +17 -5
- {meerschaum-2.4.0rc2.dist-info → meerschaum-2.4.2.dist-info}/RECORD +27 -27
- {meerschaum-2.4.0rc2.dist-info → meerschaum-2.4.2.dist-info}/WHEEL +1 -1
- {meerschaum-2.4.0rc2.dist-info → meerschaum-2.4.2.dist-info}/LICENSE +0 -0
- {meerschaum-2.4.0rc2.dist-info → meerschaum-2.4.2.dist-info}/NOTICE +0 -0
- {meerschaum-2.4.0rc2.dist-info → meerschaum-2.4.2.dist-info}/entry_points.txt +0 -0
- {meerschaum-2.4.0rc2.dist-info → meerschaum-2.4.2.dist-info}/top_level.txt +0 -0
- {meerschaum-2.4.0rc2.dist-info → meerschaum-2.4.2.dist-info}/zip-safe +0 -0
@@ -240,11 +240,11 @@ def manually_import_module(
|
|
240
240
|
if install:
|
241
241
|
if not pip_install(
|
242
242
|
root_name,
|
243
|
-
venv
|
244
|
-
split
|
245
|
-
check_update
|
246
|
-
color
|
247
|
-
debug
|
243
|
+
venv=venv,
|
244
|
+
split=False,
|
245
|
+
check_update=check_update,
|
246
|
+
color=color,
|
247
|
+
debug=debug
|
248
248
|
) and warn:
|
249
249
|
warn_function(
|
250
250
|
f"There's an update available for '{install_name}', "
|
@@ -252,14 +252,14 @@ def manually_import_module(
|
|
252
252
|
+ "Try installig via Meerschaum with "
|
253
253
|
+ "`install packages '{install_name}'`.",
|
254
254
|
ImportWarning,
|
255
|
-
stacklevel
|
256
|
-
color
|
255
|
+
stacklevel=3,
|
256
|
+
color=False,
|
257
257
|
)
|
258
258
|
elif warn:
|
259
259
|
warn_function(
|
260
260
|
f"There's an update available for '{root_name}'.",
|
261
|
-
stack
|
262
|
-
color
|
261
|
+
stack=False,
|
262
|
+
color=False,
|
263
263
|
)
|
264
264
|
spec = (
|
265
265
|
importlib.util.find_spec(import_name)
|
@@ -267,7 +267,6 @@ def manually_import_module(
|
|
267
267
|
else importlib.util.spec_from_file_location(import_name, str(mod_path))
|
268
268
|
)
|
269
269
|
|
270
|
-
|
271
270
|
if spec is None:
|
272
271
|
try:
|
273
272
|
mod = _import_module(import_name)
|
@@ -291,7 +290,7 @@ def manually_import_module(
|
|
291
290
|
sys.modules[import_name] = old_sys_mod
|
292
291
|
else:
|
293
292
|
del sys.modules[import_name]
|
294
|
-
|
293
|
+
|
295
294
|
return mod
|
296
295
|
|
297
296
|
|
@@ -497,8 +496,19 @@ def _get_package_metadata(import_name: str, venv: Optional[str]) -> Dict[str, st
|
|
497
496
|
cache_dir_path = VIRTENV_RESOURCES_PATH / venv / 'cache'
|
498
497
|
_args += ['--cache-dir', cache_dir_path.as_posix()]
|
499
498
|
|
499
|
+
if use_uv():
|
500
|
+
package_name = 'uv'
|
501
|
+
_args = ['pip', 'show', install_name]
|
502
|
+
else:
|
503
|
+
package_name = 'pip'
|
504
|
+
_args = ['show', install_name]
|
505
|
+
|
506
|
+
print(f"{package_name=}")
|
507
|
+
import traceback
|
508
|
+
traceback.print_stack()
|
509
|
+
|
500
510
|
proc = run_python_package(
|
501
|
-
|
511
|
+
package_name, _args,
|
502
512
|
capture_output=True, as_proc=True, venv=venv, universal_newlines=True,
|
503
513
|
)
|
504
514
|
outs, errs = proc.communicate()
|
@@ -515,16 +525,16 @@ def _get_package_metadata(import_name: str, venv: Optional[str]) -> Dict[str, st
|
|
515
525
|
|
516
526
|
|
517
527
|
def need_update(
|
518
|
-
|
519
|
-
|
520
|
-
|
521
|
-
|
522
|
-
|
523
|
-
|
524
|
-
|
525
|
-
|
526
|
-
|
527
|
-
|
528
|
+
package: Optional['ModuleType'] = None,
|
529
|
+
install_name: Optional[str] = None,
|
530
|
+
import_name: Optional[str] = None,
|
531
|
+
version: Optional[str] = None,
|
532
|
+
check_pypi: bool = False,
|
533
|
+
split: bool = True,
|
534
|
+
color: bool = True,
|
535
|
+
debug: bool = False,
|
536
|
+
_run_determine_version: bool = True,
|
537
|
+
) -> bool:
|
528
538
|
"""
|
529
539
|
Check if a Meerschaum dependency needs an update.
|
530
540
|
Returns a bool for whether or not a package needs to be updated.
|
@@ -749,21 +759,21 @@ def get_pip(
|
|
749
759
|
|
750
760
|
|
751
761
|
def pip_install(
|
752
|
-
|
753
|
-
|
754
|
-
|
755
|
-
|
756
|
-
|
757
|
-
|
758
|
-
|
759
|
-
|
760
|
-
|
761
|
-
|
762
|
-
|
763
|
-
|
764
|
-
|
765
|
-
|
766
|
-
|
762
|
+
*install_names: str,
|
763
|
+
args: Optional[List[str]] = None,
|
764
|
+
requirements_file_path: Union[pathlib.Path, str, None] = None,
|
765
|
+
venv: Optional[str] = 'mrsm',
|
766
|
+
split: bool = False,
|
767
|
+
check_update: bool = True,
|
768
|
+
check_pypi: bool = True,
|
769
|
+
check_wheel: bool = True,
|
770
|
+
_uninstall: bool = False,
|
771
|
+
_from_completely_uninstall: bool = False,
|
772
|
+
_install_uv_pip: bool = True,
|
773
|
+
color: bool = True,
|
774
|
+
silent: bool = False,
|
775
|
+
debug: bool = False,
|
776
|
+
) -> bool:
|
767
777
|
"""
|
768
778
|
Install packages from PyPI with `pip`.
|
769
779
|
|
@@ -818,7 +828,6 @@ def pip_install(
|
|
818
828
|
from meerschaum.config import get_config
|
819
829
|
from meerschaum.config.static import STATIC_CONFIG
|
820
830
|
from meerschaum.utils.warnings import warn
|
821
|
-
from meerschaum.utils.misc import is_android
|
822
831
|
if args is None:
|
823
832
|
args = ['--upgrade'] if not _uninstall else []
|
824
833
|
if color:
|
@@ -847,7 +856,7 @@ def pip_install(
|
|
847
856
|
except (ImportError, FileNotFoundError):
|
848
857
|
uv_bin = None
|
849
858
|
have_uv_pip = False
|
850
|
-
if have_pip and not have_uv_pip and _install_uv_pip and
|
859
|
+
if have_pip and not have_uv_pip and _install_uv_pip and is_uv_enabled():
|
851
860
|
if not pip_install(
|
852
861
|
'uv',
|
853
862
|
venv=None,
|
@@ -866,6 +875,7 @@ def pip_install(
|
|
866
875
|
venv_contains_package('uv', venv=None, debug=debug)
|
867
876
|
and uv_bin is not None
|
868
877
|
and venv is not None
|
878
|
+
and is_uv_enabled()
|
869
879
|
)
|
870
880
|
|
871
881
|
import sys
|
@@ -883,7 +893,7 @@ def pip_install(
|
|
883
893
|
+ "https://pip.pypa.io/en/stable/installing/"
|
884
894
|
)
|
885
895
|
sys.exit(1)
|
886
|
-
|
896
|
+
|
887
897
|
with Venv(venv, debug=debug):
|
888
898
|
if venv is not None:
|
889
899
|
if (
|
@@ -909,7 +919,7 @@ def pip_install(
|
|
909
919
|
if not have_wheel:
|
910
920
|
setup_packages_to_install = (
|
911
921
|
['setuptools', 'wheel']
|
912
|
-
+ ([] if
|
922
|
+
+ (['uv'] if is_uv_enabled() else [])
|
913
923
|
)
|
914
924
|
if not pip_install(
|
915
925
|
*setup_packages_to_install,
|
@@ -1047,10 +1057,10 @@ def get_prerelease_dependencies(_packages: Optional[List[str]] = None):
|
|
1047
1057
|
|
1048
1058
|
|
1049
1059
|
def completely_uninstall_package(
|
1050
|
-
|
1051
|
-
|
1052
|
-
|
1053
|
-
|
1060
|
+
install_name: str,
|
1061
|
+
venv: str = 'mrsm',
|
1062
|
+
debug: bool = False,
|
1063
|
+
) -> bool:
|
1054
1064
|
"""
|
1055
1065
|
Continue calling `pip uninstall` until a package is completely
|
1056
1066
|
removed from a virtual environment.
|
@@ -1092,8 +1102,8 @@ def completely_uninstall_package(
|
|
1092
1102
|
|
1093
1103
|
|
1094
1104
|
def pip_uninstall(
|
1095
|
-
|
1096
|
-
|
1105
|
+
*args, **kw
|
1106
|
+
) -> bool:
|
1097
1107
|
"""
|
1098
1108
|
Uninstall Python packages.
|
1099
1109
|
This function is a wrapper around `pip_install()` but with `_uninstall` enforced as `True`.
|
@@ -1102,16 +1112,16 @@ def pip_uninstall(
|
|
1102
1112
|
|
1103
1113
|
|
1104
1114
|
def run_python_package(
|
1105
|
-
|
1106
|
-
|
1107
|
-
|
1108
|
-
|
1109
|
-
|
1110
|
-
|
1111
|
-
|
1112
|
-
|
1113
|
-
|
1114
|
-
|
1115
|
+
package_name: str,
|
1116
|
+
args: Optional[List[str]] = None,
|
1117
|
+
venv: Optional[str] = 'mrsm',
|
1118
|
+
cwd: Optional[str] = None,
|
1119
|
+
foreground: bool = False,
|
1120
|
+
as_proc: bool = False,
|
1121
|
+
capture_output: bool = False,
|
1122
|
+
debug: bool = False,
|
1123
|
+
**kw: Any,
|
1124
|
+
) -> Union[int, subprocess.Popen, None]:
|
1115
1125
|
"""
|
1116
1126
|
Runs an installed python package.
|
1117
1127
|
E.g. Translates to `/usr/bin/python -m [package]`
|
@@ -1172,9 +1182,9 @@ def run_python_package(
|
|
1172
1182
|
try:
|
1173
1183
|
to_return = run_process(
|
1174
1184
|
command,
|
1175
|
-
foreground
|
1176
|
-
as_proc
|
1177
|
-
capture_output
|
1185
|
+
foreground=foreground,
|
1186
|
+
as_proc=as_proc,
|
1187
|
+
capture_output=capture_output,
|
1178
1188
|
**kw
|
1179
1189
|
)
|
1180
1190
|
except Exception as e:
|
@@ -1187,9 +1197,9 @@ def run_python_package(
|
|
1187
1197
|
)
|
1188
1198
|
proc = subprocess.Popen(
|
1189
1199
|
command,
|
1190
|
-
stdout
|
1191
|
-
stderr
|
1192
|
-
env
|
1200
|
+
stdout=stdout,
|
1201
|
+
stderr=stderr,
|
1202
|
+
env=env_dict,
|
1193
1203
|
)
|
1194
1204
|
to_return = proc if as_proc else proc.wait()
|
1195
1205
|
except KeyboardInterrupt:
|
@@ -1199,20 +1209,20 @@ def run_python_package(
|
|
1199
1209
|
|
1200
1210
|
|
1201
1211
|
def attempt_import(
|
1202
|
-
|
1203
|
-
|
1204
|
-
|
1205
|
-
|
1206
|
-
|
1207
|
-
|
1208
|
-
|
1209
|
-
|
1210
|
-
|
1211
|
-
|
1212
|
-
|
1213
|
-
|
1214
|
-
|
1215
|
-
|
1212
|
+
*names: str,
|
1213
|
+
lazy: bool = True,
|
1214
|
+
warn: bool = True,
|
1215
|
+
install: bool = True,
|
1216
|
+
venv: Optional[str] = 'mrsm',
|
1217
|
+
precheck: bool = True,
|
1218
|
+
split: bool = True,
|
1219
|
+
check_update: bool = False,
|
1220
|
+
check_pypi: bool = False,
|
1221
|
+
check_is_installed: bool = True,
|
1222
|
+
allow_outside_venv: bool = True,
|
1223
|
+
color: bool = True,
|
1224
|
+
debug: bool = False
|
1225
|
+
) -> Any:
|
1216
1226
|
"""
|
1217
1227
|
Raise a warning if packages are not installed; otherwise import and return modules.
|
1218
1228
|
If `lazy` is `True`, return lazy-imported modules.
|
@@ -1399,10 +1409,10 @@ def attempt_import(
|
|
1399
1409
|
|
1400
1410
|
|
1401
1411
|
def lazy_import(
|
1402
|
-
|
1403
|
-
|
1404
|
-
|
1405
|
-
|
1412
|
+
name: str,
|
1413
|
+
local_name: str = None,
|
1414
|
+
**kw
|
1415
|
+
) -> meerschaum.utils.packages.lazy_loader.LazyLoader:
|
1406
1416
|
"""
|
1407
1417
|
Lazily import a package.
|
1408
1418
|
"""
|
@@ -1440,10 +1450,10 @@ def pandas_name() -> str:
|
|
1440
1450
|
|
1441
1451
|
emitted_pandas_warning: bool = False
|
1442
1452
|
def import_pandas(
|
1443
|
-
|
1444
|
-
|
1445
|
-
|
1446
|
-
|
1453
|
+
debug: bool = False,
|
1454
|
+
lazy: bool = False,
|
1455
|
+
**kw
|
1456
|
+
) -> 'ModuleType':
|
1447
1457
|
"""
|
1448
1458
|
Quality-of-life function to attempt to import the configured version of `pandas`.
|
1449
1459
|
"""
|
@@ -1472,10 +1482,10 @@ def import_pandas(
|
|
1472
1482
|
|
1473
1483
|
|
1474
1484
|
def import_rich(
|
1475
|
-
|
1476
|
-
|
1477
|
-
|
1478
|
-
|
1485
|
+
lazy: bool = True,
|
1486
|
+
debug: bool = False,
|
1487
|
+
**kw : Any
|
1488
|
+
) -> 'ModuleType':
|
1479
1489
|
"""
|
1480
1490
|
Quality of life function for importing `rich`.
|
1481
1491
|
"""
|
@@ -1530,13 +1540,13 @@ def import_html(warn=False, **kw) -> 'ModuleType':
|
|
1530
1540
|
|
1531
1541
|
|
1532
1542
|
def get_modules_from_package(
|
1533
|
-
|
1534
|
-
|
1535
|
-
|
1536
|
-
|
1537
|
-
|
1538
|
-
|
1539
|
-
|
1543
|
+
package: 'package',
|
1544
|
+
names: bool = False,
|
1545
|
+
recursive: bool = False,
|
1546
|
+
lazy: bool = False,
|
1547
|
+
modules_venvs: bool = False,
|
1548
|
+
debug: bool = False
|
1549
|
+
):
|
1540
1550
|
"""
|
1541
1551
|
Find and import all modules in a package.
|
1542
1552
|
|
@@ -1585,13 +1595,13 @@ def get_modules_from_package(
|
|
1585
1595
|
|
1586
1596
|
|
1587
1597
|
def import_children(
|
1588
|
-
|
1589
|
-
|
1590
|
-
|
1591
|
-
|
1592
|
-
|
1593
|
-
|
1594
|
-
|
1598
|
+
package: Optional['ModuleType'] = None,
|
1599
|
+
package_name: Optional[str] = None,
|
1600
|
+
types : Optional[List[str]] = None,
|
1601
|
+
lazy: bool = True,
|
1602
|
+
recursive: bool = False,
|
1603
|
+
debug: bool = False
|
1604
|
+
) -> List['ModuleType']:
|
1595
1605
|
"""
|
1596
1606
|
Import all functions in a package to its `__init__`.
|
1597
1607
|
|
@@ -1660,12 +1670,12 @@ def import_children(
|
|
1660
1670
|
|
1661
1671
|
_reload_module_cache = {}
|
1662
1672
|
def reload_package(
|
1663
|
-
|
1664
|
-
|
1665
|
-
|
1666
|
-
|
1667
|
-
|
1668
|
-
|
1673
|
+
package: str,
|
1674
|
+
skip_submodules: Optional[List[str]] = None,
|
1675
|
+
lazy: bool = False,
|
1676
|
+
debug: bool = False,
|
1677
|
+
**kw: Any
|
1678
|
+
):
|
1669
1679
|
"""
|
1670
1680
|
Recursively load a package's subpackages, even if they were not previously loaded.
|
1671
1681
|
"""
|
@@ -1724,12 +1734,12 @@ def reload_meerschaum(debug: bool = False) -> SuccessTuple:
|
|
1724
1734
|
|
1725
1735
|
|
1726
1736
|
def is_installed(
|
1727
|
-
|
1728
|
-
|
1729
|
-
|
1730
|
-
|
1731
|
-
|
1732
|
-
|
1737
|
+
import_name: str,
|
1738
|
+
venv: Optional[str] = 'mrsm',
|
1739
|
+
split: bool = True,
|
1740
|
+
allow_outside_venv: bool = True,
|
1741
|
+
debug: bool = False,
|
1742
|
+
) -> bool:
|
1733
1743
|
"""
|
1734
1744
|
Check whether a package is installed.
|
1735
1745
|
|
@@ -1782,11 +1792,11 @@ def is_installed(
|
|
1782
1792
|
|
1783
1793
|
|
1784
1794
|
def venv_contains_package(
|
1785
|
-
|
1786
|
-
|
1787
|
-
|
1788
|
-
|
1789
|
-
|
1795
|
+
import_name: str,
|
1796
|
+
venv: Optional[str] = 'mrsm',
|
1797
|
+
split: bool = True,
|
1798
|
+
debug: bool = False,
|
1799
|
+
) -> bool:
|
1790
1800
|
"""
|
1791
1801
|
Search the contents of a virtual environment for a package.
|
1792
1802
|
"""
|
@@ -1821,10 +1831,10 @@ def ensure_readline() -> 'ModuleType':
|
|
1821
1831
|
try:
|
1822
1832
|
rl = attempt_import(
|
1823
1833
|
rl_name,
|
1824
|
-
lazy
|
1825
|
-
install
|
1826
|
-
venv
|
1827
|
-
warn
|
1834
|
+
lazy=False,
|
1835
|
+
install=True,
|
1836
|
+
venv=None,
|
1837
|
+
warn=False,
|
1828
1838
|
)
|
1829
1839
|
except (ImportError, ModuleNotFoundError):
|
1830
1840
|
if not pip_install(rl_name, args=['--upgrade', '--ignore-installed'], venv=None):
|
@@ -1867,9 +1877,51 @@ def _get_pip_os_env(color: bool = True):
|
|
1867
1877
|
path_sep = ':' if platform.system() != 'Windows' else ';'
|
1868
1878
|
pip_os_env.update({
|
1869
1879
|
'PIP_BREAK_SYSTEM_PACKAGES': 'true',
|
1880
|
+
'UV_BREAK_SYSTEM_PACKAGES': 'true',
|
1870
1881
|
('FORCE_COLOR' if color else 'NO_COLOR'): '1',
|
1871
1882
|
})
|
1872
1883
|
if str(python_bin_path) not in path_str:
|
1873
1884
|
pip_os_env['PATH'] = str(python_bin_path.parent) + path_sep + path_str
|
1874
1885
|
|
1875
1886
|
return pip_os_env
|
1887
|
+
|
1888
|
+
|
1889
|
+
def use_uv() -> bool:
|
1890
|
+
"""
|
1891
|
+
Return whether `uv` is available and enabled.
|
1892
|
+
"""
|
1893
|
+
from meerschaum.utils.misc import is_android
|
1894
|
+
if is_android():
|
1895
|
+
return False
|
1896
|
+
|
1897
|
+
if not is_uv_enabled():
|
1898
|
+
return False
|
1899
|
+
|
1900
|
+
try:
|
1901
|
+
import uv
|
1902
|
+
uv_bin = uv.find_uv_bin()
|
1903
|
+
except (ImportError, FileNotFoundError):
|
1904
|
+
uv_bin = None
|
1905
|
+
|
1906
|
+
if uv_bin is None:
|
1907
|
+
return False
|
1908
|
+
|
1909
|
+
return True
|
1910
|
+
|
1911
|
+
|
1912
|
+
def is_uv_enabled() -> bool:
|
1913
|
+
"""
|
1914
|
+
Return whether the user has disabled `uv`.
|
1915
|
+
"""
|
1916
|
+
from meerschaum.utils.misc import is_android
|
1917
|
+
if is_android():
|
1918
|
+
return False
|
1919
|
+
|
1920
|
+
try:
|
1921
|
+
import yaml
|
1922
|
+
except ImportError:
|
1923
|
+
return False
|
1924
|
+
|
1925
|
+
from meerschaum.config import get_config
|
1926
|
+
enabled = get_config('system', 'experimental', 'uv_pip')
|
1927
|
+
return enabled
|
@@ -39,7 +39,9 @@ packages: Dict[str, Dict[str, str]] = {
|
|
39
39
|
'semver' : 'semver>=3.0.0',
|
40
40
|
'pathspec' : 'pathspec>=0.9.0',
|
41
41
|
'dateutil' : 'python-dateutil>=2.7.5',
|
42
|
-
'requests' : 'requests>=2.
|
42
|
+
'requests' : 'requests>=2.32.3',
|
43
|
+
'certifi' : 'certifi>=2024.8.30',
|
44
|
+
'idna' : 'idna>=3.10.0',
|
43
45
|
'binaryornot' : 'binaryornot>=0.4.4',
|
44
46
|
'pyvim' : 'pyvim>=3.0.2',
|
45
47
|
'ptpython' : 'ptpython>=3.0.27',
|
@@ -49,6 +51,7 @@ packages: Dict[str, Dict[str, str]] = {
|
|
49
51
|
'more_itertools' : 'more-itertools>=8.7.0',
|
50
52
|
'fasteners' : 'fasteners>=0.19.0',
|
51
53
|
'virtualenv' : 'virtualenv>=20.1.0',
|
54
|
+
'attrs' : 'attrs<24.2.0',
|
52
55
|
'apscheduler' : 'APScheduler>=4.0.0a5',
|
53
56
|
'uv' : 'uv>=0.2.11',
|
54
57
|
},
|
meerschaum/utils/schedule.py
CHANGED
@@ -101,6 +101,7 @@ def schedule_function(
|
|
101
101
|
kw['debug'] = debug
|
102
102
|
kw = filter_keywords(function, **kw)
|
103
103
|
|
104
|
+
_ = mrsm.attempt_import('attrs', lazy=False)
|
104
105
|
apscheduler = mrsm.attempt_import('apscheduler', lazy=False)
|
105
106
|
now = round_time(datetime.now(timezone.utc), timedelta(minutes=1))
|
106
107
|
trigger = parse_schedule(schedule, now=now)
|
@@ -330,11 +330,11 @@ def verify_venv(
|
|
330
330
|
|
331
331
|
tried_virtualenv = False
|
332
332
|
def init_venv(
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
333
|
+
venv: str = 'mrsm',
|
334
|
+
verify: bool = True,
|
335
|
+
force: bool = False,
|
336
|
+
debug: bool = False,
|
337
|
+
) -> bool:
|
338
338
|
"""
|
339
339
|
Initialize the virtual environment.
|
340
340
|
|
@@ -366,6 +366,7 @@ def init_venv(
|
|
366
366
|
import sys, platform, os, pathlib, shutil
|
367
367
|
from meerschaum.config.static import STATIC_CONFIG
|
368
368
|
from meerschaum.config._paths import VIRTENV_RESOURCES_PATH
|
369
|
+
from meerschaum.utils.packages import is_uv_enabled
|
369
370
|
venv_path = VIRTENV_RESOURCES_PATH / venv
|
370
371
|
docker_home_venv_path = pathlib.Path('/home/meerschaum/venvs/mrsm')
|
371
372
|
|
@@ -387,7 +388,7 @@ def init_venv(
|
|
387
388
|
global tried_virtualenv
|
388
389
|
try:
|
389
390
|
import venv as _venv
|
390
|
-
uv = attempt_import('uv', venv=None, debug=debug)
|
391
|
+
uv = attempt_import('uv', venv=None, debug=debug) if is_uv_enabled() else None
|
391
392
|
virtualenv = None
|
392
393
|
except ImportError:
|
393
394
|
_venv = None
|
@@ -400,9 +401,9 @@ def init_venv(
|
|
400
401
|
_venv_success = run_python_package(
|
401
402
|
'uv',
|
402
403
|
['venv', venv_path.as_posix(), '-q'],
|
403
|
-
venv
|
404
|
-
env
|
405
|
-
debug
|
404
|
+
venv=None,
|
405
|
+
env=_get_pip_os_env(),
|
406
|
+
debug=debug,
|
406
407
|
) == 0
|
407
408
|
|
408
409
|
if _venv is not None and not _venv_success:
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: meerschaum
|
3
|
-
Version: 2.4.
|
3
|
+
Version: 2.4.2
|
4
4
|
Summary: Sync Time-Series Pipes with Meerschaum
|
5
5
|
Home-page: https://meerschaum.io
|
6
6
|
Author: Bennett Meares
|
@@ -66,7 +66,9 @@ Requires-Dist: update-checker >=0.18.0 ; extra == 'api'
|
|
66
66
|
Requires-Dist: semver >=3.0.0 ; extra == 'api'
|
67
67
|
Requires-Dist: pathspec >=0.9.0 ; extra == 'api'
|
68
68
|
Requires-Dist: python-dateutil >=2.7.5 ; extra == 'api'
|
69
|
-
Requires-Dist: requests >=2.
|
69
|
+
Requires-Dist: requests >=2.32.3 ; extra == 'api'
|
70
|
+
Requires-Dist: certifi >=2024.8.30 ; extra == 'api'
|
71
|
+
Requires-Dist: idna >=3.10.0 ; extra == 'api'
|
70
72
|
Requires-Dist: binaryornot >=0.4.4 ; extra == 'api'
|
71
73
|
Requires-Dist: pyvim >=3.0.2 ; extra == 'api'
|
72
74
|
Requires-Dist: ptpython >=3.0.27 ; extra == 'api'
|
@@ -76,6 +78,7 @@ Requires-Dist: prompt-toolkit >=3.0.39 ; extra == 'api'
|
|
76
78
|
Requires-Dist: more-itertools >=8.7.0 ; extra == 'api'
|
77
79
|
Requires-Dist: fasteners >=0.19.0 ; extra == 'api'
|
78
80
|
Requires-Dist: virtualenv >=20.1.0 ; extra == 'api'
|
81
|
+
Requires-Dist: attrs <24.2.0 ; extra == 'api'
|
79
82
|
Requires-Dist: APScheduler >=4.0.0a5 ; extra == 'api'
|
80
83
|
Requires-Dist: uv >=0.2.11 ; extra == 'api'
|
81
84
|
Requires-Dist: pprintpp >=0.4.0 ; extra == 'api'
|
@@ -116,7 +119,9 @@ Requires-Dist: update-checker >=0.18.0 ; extra == 'core'
|
|
116
119
|
Requires-Dist: semver >=3.0.0 ; extra == 'core'
|
117
120
|
Requires-Dist: pathspec >=0.9.0 ; extra == 'core'
|
118
121
|
Requires-Dist: python-dateutil >=2.7.5 ; extra == 'core'
|
119
|
-
Requires-Dist: requests >=2.
|
122
|
+
Requires-Dist: requests >=2.32.3 ; extra == 'core'
|
123
|
+
Requires-Dist: certifi >=2024.8.30 ; extra == 'core'
|
124
|
+
Requires-Dist: idna >=3.10.0 ; extra == 'core'
|
120
125
|
Requires-Dist: binaryornot >=0.4.4 ; extra == 'core'
|
121
126
|
Requires-Dist: pyvim >=3.0.2 ; extra == 'core'
|
122
127
|
Requires-Dist: ptpython >=3.0.27 ; extra == 'core'
|
@@ -126,6 +131,7 @@ Requires-Dist: prompt-toolkit >=3.0.39 ; extra == 'core'
|
|
126
131
|
Requires-Dist: more-itertools >=8.7.0 ; extra == 'core'
|
127
132
|
Requires-Dist: fasteners >=0.19.0 ; extra == 'core'
|
128
133
|
Requires-Dist: virtualenv >=20.1.0 ; extra == 'core'
|
134
|
+
Requires-Dist: attrs <24.2.0 ; extra == 'core'
|
129
135
|
Requires-Dist: APScheduler >=4.0.0a5 ; extra == 'core'
|
130
136
|
Requires-Dist: uv >=0.2.11 ; extra == 'core'
|
131
137
|
Provides-Extra: dash
|
@@ -199,7 +205,9 @@ Requires-Dist: update-checker >=0.18.0 ; extra == 'full'
|
|
199
205
|
Requires-Dist: semver >=3.0.0 ; extra == 'full'
|
200
206
|
Requires-Dist: pathspec >=0.9.0 ; extra == 'full'
|
201
207
|
Requires-Dist: python-dateutil >=2.7.5 ; extra == 'full'
|
202
|
-
Requires-Dist: requests >=2.
|
208
|
+
Requires-Dist: requests >=2.32.3 ; extra == 'full'
|
209
|
+
Requires-Dist: certifi >=2024.8.30 ; extra == 'full'
|
210
|
+
Requires-Dist: idna >=3.10.0 ; extra == 'full'
|
203
211
|
Requires-Dist: binaryornot >=0.4.4 ; extra == 'full'
|
204
212
|
Requires-Dist: pyvim >=3.0.2 ; extra == 'full'
|
205
213
|
Requires-Dist: ptpython >=3.0.27 ; extra == 'full'
|
@@ -209,6 +217,7 @@ Requires-Dist: prompt-toolkit >=3.0.39 ; extra == 'full'
|
|
209
217
|
Requires-Dist: more-itertools >=8.7.0 ; extra == 'full'
|
210
218
|
Requires-Dist: fasteners >=0.19.0 ; extra == 'full'
|
211
219
|
Requires-Dist: virtualenv >=20.1.0 ; extra == 'full'
|
220
|
+
Requires-Dist: attrs <24.2.0 ; extra == 'full'
|
212
221
|
Requires-Dist: APScheduler >=4.0.0a5 ; extra == 'full'
|
213
222
|
Requires-Dist: uv >=0.2.11 ; extra == 'full'
|
214
223
|
Requires-Dist: dill >=0.3.3 ; extra == 'full'
|
@@ -290,7 +299,9 @@ Requires-Dist: update-checker >=0.18.0 ; extra == 'sql'
|
|
290
299
|
Requires-Dist: semver >=3.0.0 ; extra == 'sql'
|
291
300
|
Requires-Dist: pathspec >=0.9.0 ; extra == 'sql'
|
292
301
|
Requires-Dist: python-dateutil >=2.7.5 ; extra == 'sql'
|
293
|
-
Requires-Dist: requests >=2.
|
302
|
+
Requires-Dist: requests >=2.32.3 ; extra == 'sql'
|
303
|
+
Requires-Dist: certifi >=2024.8.30 ; extra == 'sql'
|
304
|
+
Requires-Dist: idna >=3.10.0 ; extra == 'sql'
|
294
305
|
Requires-Dist: binaryornot >=0.4.4 ; extra == 'sql'
|
295
306
|
Requires-Dist: pyvim >=3.0.2 ; extra == 'sql'
|
296
307
|
Requires-Dist: ptpython >=3.0.27 ; extra == 'sql'
|
@@ -300,6 +311,7 @@ Requires-Dist: prompt-toolkit >=3.0.39 ; extra == 'sql'
|
|
300
311
|
Requires-Dist: more-itertools >=8.7.0 ; extra == 'sql'
|
301
312
|
Requires-Dist: fasteners >=0.19.0 ; extra == 'sql'
|
302
313
|
Requires-Dist: virtualenv >=20.1.0 ; extra == 'sql'
|
314
|
+
Requires-Dist: attrs <24.2.0 ; extra == 'sql'
|
303
315
|
Requires-Dist: APScheduler >=4.0.0a5 ; extra == 'sql'
|
304
316
|
Requires-Dist: uv >=0.2.11 ; extra == 'sql'
|
305
317
|
Provides-Extra: stack
|