reflex 0.5.0a3__py3-none-any.whl → 0.5.0.post1__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.
Potentially problematic release.
This version of reflex might be problematic. Click here for more details.
- reflex/utils/prerequisites.py +41 -5
- {reflex-0.5.0a3.dist-info → reflex-0.5.0.post1.dist-info}/METADATA +1 -1
- {reflex-0.5.0a3.dist-info → reflex-0.5.0.post1.dist-info}/RECORD +6 -6
- {reflex-0.5.0a3.dist-info → reflex-0.5.0.post1.dist-info}/LICENSE +0 -0
- {reflex-0.5.0a3.dist-info → reflex-0.5.0.post1.dist-info}/WHEEL +0 -0
- {reflex-0.5.0a3.dist-info → reflex-0.5.0.post1.dist-info}/entry_points.txt +0 -0
reflex/utils/prerequisites.py
CHANGED
|
@@ -181,7 +181,12 @@ def get_install_package_manager() -> str | None:
|
|
|
181
181
|
Returns:
|
|
182
182
|
The path to the package manager.
|
|
183
183
|
"""
|
|
184
|
-
if
|
|
184
|
+
if (
|
|
185
|
+
constants.IS_WINDOWS
|
|
186
|
+
and not is_windows_bun_supported()
|
|
187
|
+
or windows_check_onedrive_in_path()
|
|
188
|
+
or windows_npm_escape_hatch()
|
|
189
|
+
):
|
|
185
190
|
return get_package_manager()
|
|
186
191
|
return get_config().bun_path
|
|
187
192
|
|
|
@@ -199,6 +204,24 @@ def get_package_manager() -> str | None:
|
|
|
199
204
|
return npm_path
|
|
200
205
|
|
|
201
206
|
|
|
207
|
+
def windows_check_onedrive_in_path() -> bool:
|
|
208
|
+
"""For windows, check if oneDrive is present in the project dir path.
|
|
209
|
+
|
|
210
|
+
Returns:
|
|
211
|
+
If oneDrive is in the path of the project directory.
|
|
212
|
+
"""
|
|
213
|
+
return "onedrive" in str(Path.cwd()).lower()
|
|
214
|
+
|
|
215
|
+
|
|
216
|
+
def windows_npm_escape_hatch() -> bool:
|
|
217
|
+
"""For windows, if the user sets REFLEX_USE_NPM, use npm instead of bun.
|
|
218
|
+
|
|
219
|
+
Returns:
|
|
220
|
+
If the user has set REFLEX_USE_NPM.
|
|
221
|
+
"""
|
|
222
|
+
return os.environ.get("REFLEX_USE_NPM", "").lower() in ["true", "1", "yes"]
|
|
223
|
+
|
|
224
|
+
|
|
202
225
|
def get_app(reload: bool = False) -> ModuleType:
|
|
203
226
|
"""Get the app module based on the default config.
|
|
204
227
|
|
|
@@ -737,10 +760,17 @@ def install_bun():
|
|
|
737
760
|
Raises:
|
|
738
761
|
FileNotFoundError: If required packages are not found.
|
|
739
762
|
"""
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
763
|
+
win_supported = is_windows_bun_supported()
|
|
764
|
+
one_drive_in_path = windows_check_onedrive_in_path()
|
|
765
|
+
if constants.IS_WINDOWS and not win_supported or one_drive_in_path:
|
|
766
|
+
if not win_supported:
|
|
767
|
+
console.warn(
|
|
768
|
+
"Bun for Windows is currently only available for x86 64-bit Windows. Installation will fall back on npm."
|
|
769
|
+
)
|
|
770
|
+
if one_drive_in_path:
|
|
771
|
+
console.warn(
|
|
772
|
+
"Creating project directories in OneDrive is not recommended for bun usage on windows. This will fallback to npm."
|
|
773
|
+
)
|
|
744
774
|
|
|
745
775
|
# Skip if bun is already installed.
|
|
746
776
|
if os.path.exists(get_config().bun_path) and get_bun_version() == version.parse(
|
|
@@ -843,6 +873,7 @@ def install_frontend_packages(packages: set[str], config: Config):
|
|
|
843
873
|
if not constants.IS_WINDOWS
|
|
844
874
|
or constants.IS_WINDOWS
|
|
845
875
|
and is_windows_bun_supported()
|
|
876
|
+
and not windows_check_onedrive_in_path()
|
|
846
877
|
else None
|
|
847
878
|
)
|
|
848
879
|
processes.run_process_with_fallback(
|
|
@@ -929,6 +960,11 @@ def needs_reinit(frontend: bool = True) -> bool:
|
|
|
929
960
|
console.warn(
|
|
930
961
|
f"""On Python < 3.12, `uvicorn==0.20.0` is recommended for improved hot reload times. Found {uvi_ver} instead."""
|
|
931
962
|
)
|
|
963
|
+
|
|
964
|
+
if windows_check_onedrive_in_path():
|
|
965
|
+
console.warn(
|
|
966
|
+
"Creating project directories in OneDrive may lead to performance issues. For optimal performance, It is recommended to avoid using OneDrive for your reflex app."
|
|
967
|
+
)
|
|
932
968
|
# No need to reinitialize if the app is already initialized.
|
|
933
969
|
return False
|
|
934
970
|
|
|
@@ -505,7 +505,7 @@ reflex/utils/export.py,sha256=UJd4BYFW9_eexhLCP4C5Ri8Cq2tWAPNVspq70lPLCyo,2270
|
|
|
505
505
|
reflex/utils/format.py,sha256=ny6nr-3ZzLo4bBchO1Ciinbc4A6Ji3iZl_WprQn_oz8,22652
|
|
506
506
|
reflex/utils/imports.py,sha256=v_xLZiMn7UxxPu5mXln74tXi52wYKqPuZe11Ka31WuM,2309
|
|
507
507
|
reflex/utils/path_ops.py,sha256=Vy6fU_bXvOcCvbXdTSmeLwy_C4h9seYU-3yIrVdZEZQ,4737
|
|
508
|
-
reflex/utils/prerequisites.py,sha256=
|
|
508
|
+
reflex/utils/prerequisites.py,sha256=k9j308v2-rsA4Zs62GCfHwjwjrK--IGanDoU2xspw4c,52506
|
|
509
509
|
reflex/utils/processes.py,sha256=p8o6MXuWaCcqXs4itDD-41M7FCmioeh784IZ6UGbyo8,11242
|
|
510
510
|
reflex/utils/pyi_generator.py,sha256=cOfDESTXjnIvJhi8-anKVDNllgpnsGd4OyRmwdw1z5Y,30637
|
|
511
511
|
reflex/utils/serializers.py,sha256=bKY4UxwumFfzE-75tpCFQWRfCeXn301fALwCAUgzgDw,9037
|
|
@@ -514,8 +514,8 @@ reflex/utils/types.py,sha256=NVdeZIQZTrrUCJMmlRSzQ8ZvCdAnQPQWCLBQioR4aQg,14842
|
|
|
514
514
|
reflex/utils/watch.py,sha256=HzGrHQIZ_62Di0BO46kd2AZktNA3A6nFIBuf8c6ip30,2609
|
|
515
515
|
reflex/vars.py,sha256=1IboqkSJYh_z-XlWAPzfcCaX-5imVdv6QSrpUAXBWNg,67317
|
|
516
516
|
reflex/vars.pyi,sha256=7sVCLoLg9Y7QAmXWz6FCtVmScpSV84u0yQ3ZBImb_Bk,5583
|
|
517
|
-
reflex-0.5.
|
|
518
|
-
reflex-0.5.
|
|
519
|
-
reflex-0.5.
|
|
520
|
-
reflex-0.5.
|
|
521
|
-
reflex-0.5.
|
|
517
|
+
reflex-0.5.0.post1.dist-info/LICENSE,sha256=dw3zLrp9f5ObD7kqS32vWfhcImfO52PMmRqvtxq_YEE,11358
|
|
518
|
+
reflex-0.5.0.post1.dist-info/METADATA,sha256=s-fu2IC5ncY9whgRREaJ3Ebmfw0GPkzjVAuzztuxHUw,12093
|
|
519
|
+
reflex-0.5.0.post1.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
520
|
+
reflex-0.5.0.post1.dist-info/entry_points.txt,sha256=H1Z5Yat_xJfy0dRT1Frk2PkO_p41Xy7fCKlj4FcdL9o,44
|
|
521
|
+
reflex-0.5.0.post1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|