deno 0.0.2__py3-none-win_amd64.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 deno might be problematic. Click here for more details.

deno/__init__.py ADDED
@@ -0,0 +1,6 @@
1
+ from __future__ import annotations
2
+
3
+
4
+ from ._find_deno import find_deno_bin
5
+
6
+ __all__ = ["find_deno_bin"]
deno/__main__.py ADDED
@@ -0,0 +1,44 @@
1
+ import os
2
+ import sys
3
+
4
+ from deno import find_deno_bin
5
+
6
+
7
+ def _detect_virtualenv() -> str:
8
+ """
9
+ Find the virtual environment path for the current Python executable.
10
+ """
11
+
12
+ # If it's already set, then just use it
13
+ value = os.getenv("VIRTUAL_ENV")
14
+ if value:
15
+ return value
16
+
17
+ # Otherwise, check if we're in a venv
18
+ venv_marker = os.path.join(sys.prefix, "pyvenv.cfg")
19
+
20
+ if os.path.exists(venv_marker):
21
+ return sys.prefix
22
+
23
+ return ""
24
+
25
+
26
+ def _run() -> None:
27
+ deno = os.fsdecode(find_deno_bin())
28
+
29
+ env = os.environ.copy()
30
+ venv = _detect_virtualenv()
31
+ if venv:
32
+ env.setdefault("VIRTUAL_ENV", venv)
33
+
34
+ if sys.platform == "win32":
35
+ import subprocess
36
+
37
+ completed_process = subprocess.run([deno, *sys.argv[1:]], env=env)
38
+ sys.exit(completed_process.returncode)
39
+ else:
40
+ os.execvpe(deno, [deno, *sys.argv[1:]], env=env)
41
+
42
+
43
+ if __name__ == "__main__":
44
+ _run()
deno/_find_deno.py ADDED
@@ -0,0 +1,36 @@
1
+ from __future__ import annotations
2
+
3
+ import os
4
+ import sys
5
+ import sysconfig
6
+
7
+
8
+ def find_deno_bin() -> str:
9
+ """Return the deno binary path."""
10
+
11
+ deno_exe = "deno" + sysconfig.get_config_var("EXE")
12
+
13
+ path = os.path.join(sysconfig.get_path("scripts"), deno_exe)
14
+ if os.path.isfile(path):
15
+ return path
16
+
17
+ if sys.version_info >= (3, 10):
18
+ user_scheme = sysconfig.get_preferred_scheme("user")
19
+ elif os.name == "nt":
20
+ user_scheme = "nt_user"
21
+ elif sys.platform == "darwin" and sys._framework:
22
+ user_scheme = "osx_framework_user"
23
+ else:
24
+ user_scheme = "posix_user"
25
+
26
+ path = os.path.join(sysconfig.get_path("scripts", scheme=user_scheme), deno_exe)
27
+ if os.path.isfile(path):
28
+ return path
29
+
30
+ # Search in `bin` adjacent to package root (as created by `pip install --target`).
31
+ pkg_root = os.path.dirname(os.path.dirname(__file__))
32
+ target_path = os.path.join(pkg_root, "bin", deno_exe)
33
+ if os.path.isfile(target_path):
34
+ return target_path
35
+
36
+ raise FileNotFoundError(path)
Binary file
@@ -0,0 +1,23 @@
1
+ Metadata-Version: 2.4
2
+ Name: deno
3
+ Version: 0.0.2
4
+ Requires-Python: >=3.10
5
+ Description-Content-Type: text/markdown
6
+
7
+ ```sh
8
+ scripts/build.sh # build all the distributions under ./dist
9
+ uvx --from dist/deno-2.3.5-py3-none-macosx_11_0_arm64.whl deno --version
10
+ # deno 2.3.5 (stable, release, aarch64-apple-darwin)
11
+ # v8 13.7.152.6-rusty
12
+ # typescript 5.8.3
13
+ ```
14
+
15
+ ```py
16
+ $ uv run --with dist/deno-2.3.5-py3-none-macosx_11_0_arm64.whl python
17
+ # Python 3.13.3 (main, May 30 2025, 05:45:55) [Clang 20.1.4 ] on darwin
18
+ # Type "help", "copyright", "credits" or "license" for more information.
19
+ # >>> import deno
20
+ # >>> deno.find_deno_bin()
21
+ # '/Users/manzt/.cache/uv/archive-v0/BykgqI7nUKj0T27s79pu3/bin/deno'
22
+ # >>>
23
+ ```
@@ -0,0 +1,7 @@
1
+ deno/__init__.py,sha256=4TK0SkAoOQ5etvpPZmqBCJr9QHbWbr46GAE148MsCP4,104
2
+ deno/__main__.py,sha256=ZIq3cDH6qsf2dP9c5itnf8PqUjVY8UAyvfqyjxGcEZY,941
3
+ deno/_find_deno.py,sha256=NS29auI2RWAs5IoYKvnBfBZqHlOyAuq0ABmKZuvqblE,1050
4
+ deno-0.0.2.data/scripts/deno.exe,sha256=BpZ0FHfwtzRj8Iq6wIqMltOPvI7IO8aEyJiFGzJAPoY,110299608
5
+ deno-0.0.2.dist-info/METADATA,sha256=DDFPi_-yr1NoEThOGQ0BAV9N7EvCFVGl3dcgnSh0wQ4,696
6
+ deno-0.0.2.dist-info/WHEEL,sha256=k6hccRrl6UmjGsv-l-15TwZnTH21KqjgBTXuBtbSCtM,93
7
+ deno-0.0.2.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: hatchling 1.27.0
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-win_amd64