ccoding 0.2.4__tar.gz → 0.2.5__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 (33) hide show
  1. {ccoding-0.2.4 → ccoding-0.2.5}/PKG-INFO +1 -1
  2. {ccoding-0.2.4 → ccoding-0.2.5}/pyproject.toml +1 -1
  3. {ccoding-0.2.4 → ccoding-0.2.5}/src/ccode/remote_common.py +25 -3
  4. {ccoding-0.2.4 → ccoding-0.2.5}/uv.lock +1 -1
  5. {ccoding-0.2.4 → ccoding-0.2.5}/.github/workflows/publish.yml +0 -0
  6. {ccoding-0.2.4 → ccoding-0.2.5}/.gitignore +0 -0
  7. {ccoding-0.2.4 → ccoding-0.2.5}/CLAUDE.md +0 -0
  8. {ccoding-0.2.4 → ccoding-0.2.5}/LICENSE +0 -0
  9. {ccoding-0.2.4 → ccoding-0.2.5}/README.md +0 -0
  10. {ccoding-0.2.4 → ccoding-0.2.5}/screenshot.png +0 -0
  11. {ccoding-0.2.4 → ccoding-0.2.5}/screenshot_mobile1.jpeg +0 -0
  12. {ccoding-0.2.4 → ccoding-0.2.5}/screenshot_mobile2.jpeg +0 -0
  13. {ccoding-0.2.4 → ccoding-0.2.5}/src/ccode/__init__.py +0 -0
  14. {ccoding-0.2.4 → ccoding-0.2.5}/src/ccode/__main__.py +0 -0
  15. {ccoding-0.2.4 → ccoding-0.2.5}/src/ccode/api.py +0 -0
  16. {ccoding-0.2.4 → ccoding-0.2.5}/src/ccode/cli.py +0 -0
  17. {ccoding-0.2.4 → ccoding-0.2.5}/src/ccode/config.py +0 -0
  18. {ccoding-0.2.4 → ccoding-0.2.5}/src/ccode/env_schema.json +0 -0
  19. {ccoding-0.2.4 → ccoding-0.2.5}/src/ccode/logo.py +0 -0
  20. {ccoding-0.2.4 → ccoding-0.2.5}/src/ccode/remote.py +0 -0
  21. {ccoding-0.2.4 → ccoding-0.2.5}/src/ccode/remote_cli.py +0 -0
  22. {ccoding-0.2.4 → ccoding-0.2.5}/src/ccode/remote_client.py +0 -0
  23. {ccoding-0.2.4 → ccoding-0.2.5}/src/ccode/remote_server.py +0 -0
  24. {ccoding-0.2.4 → ccoding-0.2.5}/src/ccode/ui.py +0 -0
  25. {ccoding-0.2.4 → ccoding-0.2.5}/src/ccode/web/__init__.py +0 -0
  26. {ccoding-0.2.4 → ccoding-0.2.5}/src/ccode/web/app.js +0 -0
  27. {ccoding-0.2.4 → ccoding-0.2.5}/src/ccode/web/assets/addon-fit.js +0 -0
  28. {ccoding-0.2.4 → ccoding-0.2.5}/src/ccode/web/assets/xterm-LICENSE +0 -0
  29. {ccoding-0.2.4 → ccoding-0.2.5}/src/ccode/web/assets/xterm-addon-fit-LICENSE +0 -0
  30. {ccoding-0.2.4 → ccoding-0.2.5}/src/ccode/web/assets/xterm.css +0 -0
  31. {ccoding-0.2.4 → ccoding-0.2.5}/src/ccode/web/assets/xterm.js +0 -0
  32. {ccoding-0.2.4 → ccoding-0.2.5}/src/ccode/web/index.html +0 -0
  33. {ccoding-0.2.4 → ccoding-0.2.5}/src/ccode/web/style.css +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ccoding
3
- Version: 0.2.4
3
+ Version: 0.2.5
4
4
  Summary: Curses-based Claude Code launcher
5
5
  Project-URL: Homepage, https://github.com/8DE4732A/ccode
6
6
  Project-URL: Repository, https://github.com/8DE4732A/ccode
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "ccoding"
3
- version = "0.2.4"
3
+ version = "0.2.5"
4
4
  description = "Curses-based Claude Code launcher"
5
5
  readme = "README.md"
6
6
  license = { file = "LICENSE" }
@@ -3,11 +3,20 @@ from __future__ import annotations
3
3
  import base64
4
4
  import contextlib
5
5
  import datetime as dt
6
- import fcntl
7
6
  import hashlib
8
7
  import hmac
9
8
  import os
10
9
  import re
10
+
11
+ try:
12
+ import fcntl
13
+ except ImportError:
14
+ fcntl = None
15
+
16
+ try:
17
+ import msvcrt
18
+ except ImportError:
19
+ msvcrt = None
11
20
  import secrets
12
21
  import time
13
22
  from dataclasses import dataclass
@@ -209,11 +218,24 @@ def web_asset_text(name: str) -> str:
209
218
  def file_lock(path: Any) -> Iterator[None]:
210
219
  CONFIG_DIR.mkdir(parents=True, exist_ok=True)
211
220
  with path.open("a+") as lock_file:
212
- fcntl.flock(lock_file.fileno(), fcntl.LOCK_EX)
221
+ if msvcrt is not None:
222
+ if path.stat().st_size == 0:
223
+ lock_file.write("0")
224
+ lock_file.flush()
225
+ lock_file.seek(0)
226
+ getattr(msvcrt, "locking")(lock_file.fileno(), getattr(msvcrt, "LK_LOCK"), 1)
227
+ elif fcntl is not None:
228
+ fcntl.flock(lock_file.fileno(), fcntl.LOCK_EX)
229
+ else:
230
+ raise OSError("file locking is not supported on this platform")
213
231
  try:
214
232
  yield
215
233
  finally:
216
- fcntl.flock(lock_file.fileno(), fcntl.LOCK_UN)
234
+ if msvcrt is not None:
235
+ lock_file.seek(0)
236
+ getattr(msvcrt, "locking")(lock_file.fileno(), getattr(msvcrt, "LK_UNLCK"), 1)
237
+ elif fcntl is not None:
238
+ fcntl.flock(lock_file.fileno(), fcntl.LOCK_UN)
217
239
 
218
240
 
219
241
  def rotate_log(path: Any, max_bytes: int, backups: int) -> None:
@@ -36,7 +36,7 @@ wheels = [
36
36
 
37
37
  [[package]]
38
38
  name = "ccoding"
39
- version = "0.2.2"
39
+ version = "0.2.5"
40
40
  source = { editable = "." }
41
41
  dependencies = [
42
42
  { name = "windows-curses", marker = "sys_platform == 'win32'" },
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
File without changes
File without changes
File without changes
File without changes
File without changes