flyshell 1.3.5__tar.gz → 1.3.7__tar.gz

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.
Files changed (52) hide show
  1. {flyshell-1.3.5/src/flyshell.egg-info → flyshell-1.3.7}/PKG-INFO +2 -2
  2. {flyshell-1.3.5/c_src → flyshell-1.3.7/c_src/diskops}/diskops.c +3 -3
  3. flyshell-1.3.7/c_src/diskops/posix/placeholder.c +2 -0
  4. {flyshell-1.3.5 → flyshell-1.3.7}/pyproject.toml +3 -2
  5. flyshell-1.3.7/setup.py +22 -0
  6. {flyshell-1.3.5 → flyshell-1.3.7}/src/flyshell/__init__.py +4 -4
  7. {flyshell-1.3.5 → flyshell-1.3.7}/src/flyshell/constants.py +2 -2
  8. flyshell-1.3.7/src/flyshell/native/__init__.py +0 -0
  9. flyshell-1.3.7/src/flyshell/native/diskops_bridge.py +49 -0
  10. flyshell-1.3.7/src/flyshell/startup/__init__.py +0 -0
  11. {flyshell-1.3.5 → flyshell-1.3.7/src/flyshell.egg-info}/PKG-INFO +2 -2
  12. {flyshell-1.3.5 → flyshell-1.3.7}/src/flyshell.egg-info/SOURCES.txt +5 -1
  13. flyshell-1.3.5/setup.py +0 -14
  14. {flyshell-1.3.5 → flyshell-1.3.7}/LICENSE +0 -0
  15. {flyshell-1.3.5 → flyshell-1.3.7}/README.md +0 -0
  16. {flyshell-1.3.5 → flyshell-1.3.7}/setup.cfg +0 -0
  17. {flyshell-1.3.5 → flyshell-1.3.7}/src/flyshell/abstract/__init__.py +0 -0
  18. {flyshell-1.3.5 → flyshell-1.3.7}/src/flyshell/abstract/base_cmd.py +0 -0
  19. {flyshell-1.3.5 → flyshell-1.3.7}/src/flyshell/abstract/base_plugin.py +0 -0
  20. {flyshell-1.3.5 → flyshell-1.3.7}/src/flyshell/abstract/parent_cmd.py +0 -0
  21. {flyshell-1.3.5 → flyshell-1.3.7}/src/flyshell/accounts/__init__.py +0 -0
  22. {flyshell-1.3.5 → flyshell-1.3.7}/src/flyshell/accounts/auth.py +0 -0
  23. {flyshell-1.3.5/src/flyshell/builtin → flyshell-1.3.7/src/flyshell/bin}/__init__.py +0 -0
  24. {flyshell-1.3.5/src/flyshell/core → flyshell-1.3.7/src/flyshell/builtin}/__init__.py +0 -0
  25. {flyshell-1.3.5 → flyshell-1.3.7}/src/flyshell/builtin/diskops.py +0 -0
  26. {flyshell-1.3.5 → flyshell-1.3.7}/src/flyshell/builtin/fs.py +0 -0
  27. {flyshell-1.3.5 → flyshell-1.3.7}/src/flyshell/builtin/pkg.py +0 -0
  28. {flyshell-1.3.5 → flyshell-1.3.7}/src/flyshell/builtin/system.py +0 -0
  29. {flyshell-1.3.5 → flyshell-1.3.7}/src/flyshell/builtin/utils.py +0 -0
  30. {flyshell-1.3.5/src/flyshell/startup → flyshell-1.3.7/src/flyshell/core}/__init__.py +0 -0
  31. {flyshell-1.3.5 → flyshell-1.3.7}/src/flyshell/core/console.py +0 -0
  32. {flyshell-1.3.5 → flyshell-1.3.7}/src/flyshell/core/data.py +0 -0
  33. {flyshell-1.3.5 → flyshell-1.3.7}/src/flyshell/core/directory.py +0 -0
  34. {flyshell-1.3.5 → flyshell-1.3.7}/src/flyshell/main.py +0 -0
  35. {flyshell-1.3.5 → flyshell-1.3.7}/src/flyshell/startup/deps.py +0 -0
  36. {flyshell-1.3.5 → flyshell-1.3.7}/src/flyshell/startup/env.py +0 -0
  37. {flyshell-1.3.5 → flyshell-1.3.7}/src/flyshell/startup/loader.py +0 -0
  38. {flyshell-1.3.5 → flyshell-1.3.7}/src/flyshell.egg-info/dependency_links.txt +0 -0
  39. {flyshell-1.3.5 → flyshell-1.3.7}/src/flyshell.egg-info/entry_points.txt +0 -0
  40. {flyshell-1.3.5 → flyshell-1.3.7}/src/flyshell.egg-info/requires.txt +0 -0
  41. {flyshell-1.3.5 → flyshell-1.3.7}/src/flyshell.egg-info/top_level.txt +0 -0
  42. {flyshell-1.3.5 → flyshell-1.3.7}/tests/test_auth.py +0 -0
  43. {flyshell-1.3.5 → flyshell-1.3.7}/tests/test_data.py +0 -0
  44. {flyshell-1.3.5 → flyshell-1.3.7}/tests/test_deps.py +0 -0
  45. {flyshell-1.3.5 → flyshell-1.3.7}/tests/test_directory.py +0 -0
  46. {flyshell-1.3.5 → flyshell-1.3.7}/tests/test_diskops.py +0 -0
  47. {flyshell-1.3.5 → flyshell-1.3.7}/tests/test_env.py +0 -0
  48. {flyshell-1.3.5 → flyshell-1.3.7}/tests/test_fs.py +0 -0
  49. {flyshell-1.3.5 → flyshell-1.3.7}/tests/test_loader.py +0 -0
  50. {flyshell-1.3.5 → flyshell-1.3.7}/tests/test_pkg.py +0 -0
  51. {flyshell-1.3.5 → flyshell-1.3.7}/tests/test_security.py +0 -0
  52. {flyshell-1.3.5 → flyshell-1.3.7}/tests/test_utils.py +0 -0
@@ -1,8 +1,8 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: flyshell
3
- Version: 1.3.5
3
+ Version: 1.3.7
4
4
  Summary: A modular, zero-dependency command-line environment in Python.
5
- License: MIT
5
+ License-Expression: MIT
6
6
  Requires-Python: >=3.10
7
7
  Description-Content-Type: text/markdown
8
8
  License-File: LICENSE
@@ -1,4 +1,4 @@
1
- // c_src/diskops.c
1
+ // c_src/diskops/diskops.c
2
2
 
3
3
  #define PY_SSIZE_T_CLEAN
4
4
  #include <Python.h>
@@ -17,13 +17,13 @@ static PyMethodDef NativeDiskMethods[] = {
17
17
 
18
18
  static struct PyModuleDef nativediskmodule = {
19
19
  PyModuleDef_HEAD_INIT,
20
- "_native_disk",
20
+ "_native_diskops",
21
21
  "Native C engine backend for Flyshell",
22
22
  -1,
23
23
  NativeDiskMethods
24
24
  };
25
25
 
26
26
 
27
- PyMODINIT_FUNC PyInit__native_disk(void) {
27
+ PyMODINIT_FUNC PyInit__native_diskops(void) {
28
28
  return PyModule_Create(&nativediskmodule);
29
29
  }
@@ -0,0 +1,2 @@
1
+ /* Placeholder for future implementation */
2
+ static void placeholder(void) {}
@@ -1,5 +1,5 @@
1
1
  [build-system]
2
- requires = ["setuptools>=61.0", "wheel"]
2
+ requires = ["setuptools>=77.0.0", "wheel"]
3
3
  build-backend = "setuptools.build_meta"
4
4
 
5
5
  [tool.cibuildwheel]
@@ -21,7 +21,8 @@ dynamic = ["version"]
21
21
  description = "A modular, zero-dependency command-line environment in Python."
22
22
  readme = "README.md"
23
23
  requires-python = ">=3.10"
24
- license = { text = "MIT" }
24
+ license = "MIT"
25
+ license-files = ["LICENSE"]
25
26
 
26
27
  [project.scripts]
27
28
  flyshell = "flyshell.main:main"
@@ -0,0 +1,22 @@
1
+ # setup.py
2
+
3
+ from setuptools import Extension, setup
4
+ import sys
5
+
6
+ sources = [
7
+ "c_src/diskops/diskops.c",
8
+ ]
9
+
10
+ if sys.platform == "win32":
11
+ sources.append("c_src/diskops/win32/placeholder.c")
12
+ else:
13
+ sources.append("c_src/diskops/posix/placeholder.c")
14
+
15
+ native_disk = Extension(
16
+ name="flyshell.bin._native_diskops",
17
+ sources=sources,
18
+ )
19
+
20
+ setup(
21
+ ext_modules=[native_disk],
22
+ )
@@ -11,12 +11,12 @@ except ImportError:
11
11
 
12
12
 
13
13
  try:
14
- from . import _native_disk
14
+ from flyshell.bin import _native_diskops
15
15
  except ImportError:
16
- _native_disk = None
16
+ _native_diskops = None
17
17
 
18
18
 
19
19
  def check_native() -> bool:
20
- if _native_disk is not None:
21
- return _native_disk.ping() == 42
20
+ if _native_diskops is not None:
21
+ return _native_diskops.ping() == 42
22
22
  return False
@@ -5,8 +5,8 @@ import os
5
5
  import platform
6
6
  import time
7
7
 
8
- BUILD = 145
9
- VERSION = "1.3.5"
8
+ BUILD = 147
9
+ VERSION = "1.3.7"
10
10
 
11
11
 
12
12
  def _resolve_app_dir() -> Path:
File without changes
@@ -0,0 +1,49 @@
1
+ # src/flyshell/native/diskops_bridge.py
2
+
3
+ from typing import Any
4
+
5
+ _HAS_NATIVE: bool = False
6
+ _native: Any = None
7
+
8
+ try:
9
+ from flyshell.bin import _native_diskops
10
+
11
+ if hasattr(_native_diskops, "ping") and _native_diskops.ping() == 42:
12
+ _native = _native_diskops
13
+ _HAS_NATIVE = True
14
+ except (ImportError, AttributeError):
15
+ _HAS_NATIVE = False
16
+ _native = None
17
+
18
+ ERROR_MAP = {
19
+ -1: ("System Error", "File or path not found"),
20
+ -2: ("System Error", "Permission denied"),
21
+ -3: ("System Error", "Target is a directory, not a file"),
22
+ -4: ("System Error", "Target is not a directory"),
23
+ -5: ("System Error", "Item already exists"),
24
+ -6: ("Directory Error", "Directory is not empty"),
25
+ -7: ("System Error", "Source and destination are the same"),
26
+ -8: ("System Error", "Target file is empty"),
27
+ -9: ("Command Error", "Invalid path syntax or file name"),
28
+ -10: ("System Error", "Cannot move directly across devices or partitions"),
29
+ -11: ("System Error", "File is currently in use or locked by another process"),
30
+ -12: ("System Error", "No space left on device"),
31
+ -13: ("System Error", "Read/write I/O failure"),
32
+ -14: ("System Error", "Failed to decode content as UTF-8"),
33
+ -15: ("System Error", "Failed to launch application or file"),
34
+ -99: ("System Error", "Unexpected native filesystem error"),
35
+ }
36
+
37
+
38
+ def has_native_support() -> bool:
39
+ return _HAS_NATIVE
40
+
41
+
42
+ def translate_error(code: int, target: str = "") -> tuple[int, str]:
43
+ category, default_msg = ERROR_MAP.get(
44
+ code, ("System Error", "Unknown native error.")
45
+ )
46
+ target_str = f"for '{target}'" if target else ""
47
+ if target_str:
48
+ return (1, f"\n{category}: {default_msg} {target_str}\n")
49
+ return (1, f"\n{category}: {default_msg}.")
File without changes
@@ -1,8 +1,8 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: flyshell
3
- Version: 1.3.5
3
+ Version: 1.3.7
4
4
  Summary: A modular, zero-dependency command-line environment in Python.
5
- License: MIT
5
+ License-Expression: MIT
6
6
  Requires-Python: >=3.10
7
7
  Description-Content-Type: text/markdown
8
8
  License-File: LICENSE
@@ -2,7 +2,8 @@ LICENSE
2
2
  README.md
3
3
  pyproject.toml
4
4
  setup.py
5
- c_src/diskops.c
5
+ c_src/diskops/diskops.c
6
+ c_src/diskops/posix/placeholder.c
6
7
  src/flyshell/__init__.py
7
8
  src/flyshell/constants.py
8
9
  src/flyshell/main.py
@@ -18,6 +19,7 @@ src/flyshell/abstract/base_plugin.py
18
19
  src/flyshell/abstract/parent_cmd.py
19
20
  src/flyshell/accounts/__init__.py
20
21
  src/flyshell/accounts/auth.py
22
+ src/flyshell/bin/__init__.py
21
23
  src/flyshell/builtin/__init__.py
22
24
  src/flyshell/builtin/diskops.py
23
25
  src/flyshell/builtin/fs.py
@@ -28,6 +30,8 @@ src/flyshell/core/__init__.py
28
30
  src/flyshell/core/console.py
29
31
  src/flyshell/core/data.py
30
32
  src/flyshell/core/directory.py
33
+ src/flyshell/native/__init__.py
34
+ src/flyshell/native/diskops_bridge.py
31
35
  src/flyshell/startup/__init__.py
32
36
  src/flyshell/startup/deps.py
33
37
  src/flyshell/startup/env.py
flyshell-1.3.5/setup.py DELETED
@@ -1,14 +0,0 @@
1
- # setup.py
2
-
3
- from setuptools import Extension, find_packages, setup
4
-
5
- native_disk = Extension(
6
- name="flyshell._native_disk",
7
- sources=["c_src/diskops.c"],
8
- )
9
-
10
- setup(
11
- package_dir={"": "src"},
12
- packages=find_packages(where="src"),
13
- ext_modules=[native_disk],
14
- )
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes