multi-lang-build 0.2.3__tar.gz → 0.2.4__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 (22) hide show
  1. {multi_lang_build-0.2.3 → multi_lang_build-0.2.4}/PKG-INFO +1 -1
  2. {multi_lang_build-0.2.3 → multi_lang_build-0.2.4}/pyproject.toml +1 -1
  3. {multi_lang_build-0.2.3 → multi_lang_build-0.2.4}/src/multi_lang_build/__init__.py +1 -1
  4. {multi_lang_build-0.2.3 → multi_lang_build-0.2.4}/src/multi_lang_build/register.py +29 -17
  5. {multi_lang_build-0.2.3 → multi_lang_build-0.2.4}/.gitignore +0 -0
  6. {multi_lang_build-0.2.3 → multi_lang_build-0.2.4}/LICENSE +0 -0
  7. {multi_lang_build-0.2.3 → multi_lang_build-0.2.4}/README.md +0 -0
  8. {multi_lang_build-0.2.3 → multi_lang_build-0.2.4}/src/multi_lang_build/cli.py +0 -0
  9. {multi_lang_build-0.2.3 → multi_lang_build-0.2.4}/src/multi_lang_build/compiler/__init__.py +0 -0
  10. {multi_lang_build-0.2.3 → multi_lang_build-0.2.4}/src/multi_lang_build/compiler/base.py +0 -0
  11. {multi_lang_build-0.2.3 → multi_lang_build-0.2.4}/src/multi_lang_build/compiler/go.py +0 -0
  12. {multi_lang_build-0.2.3 → multi_lang_build-0.2.4}/src/multi_lang_build/compiler/pnpm.py +0 -0
  13. {multi_lang_build-0.2.3 → multi_lang_build-0.2.4}/src/multi_lang_build/compiler/python.py +0 -0
  14. {multi_lang_build-0.2.3 → multi_lang_build-0.2.4}/src/multi_lang_build/mirror/__init__.py +0 -0
  15. {multi_lang_build-0.2.3 → multi_lang_build-0.2.4}/src/multi_lang_build/mirror/cli.py +0 -0
  16. {multi_lang_build-0.2.3 → multi_lang_build-0.2.4}/src/multi_lang_build/mirror/config.py +0 -0
  17. {multi_lang_build-0.2.3 → multi_lang_build-0.2.4}/src/multi_lang_build/py.typed +0 -0
  18. {multi_lang_build-0.2.3 → multi_lang_build-0.2.4}/src/multi_lang_build/types.py +0 -0
  19. {multi_lang_build-0.2.3 → multi_lang_build-0.2.4}/tests/__init__.py +0 -0
  20. {multi_lang_build-0.2.3 → multi_lang_build-0.2.4}/tests/conftest.py +0 -0
  21. {multi_lang_build-0.2.3 → multi_lang_build-0.2.4}/tests/test_compiler.py +0 -0
  22. {multi_lang_build-0.2.3 → multi_lang_build-0.2.4}/tests/test_mirror.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: multi-lang-build
3
- Version: 0.2.3
3
+ Version: 0.2.4
4
4
  Summary: Multi-language automated build tool with domestic mirror acceleration support
5
5
  Project-URL: Homepage, https://github.com/example/multi-lang-build
6
6
  Project-URL: Repository, https://github.com/example/multi-lang-build
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "multi-lang-build"
7
- version = "0.2.3"
7
+ version = "0.2.4"
8
8
  description = "Multi-language automated build tool with domestic mirror acceleration support"
9
9
  readme = "README.md"
10
10
  license = {text = "MIT"}
@@ -7,7 +7,7 @@ from multi_lang_build.compiler.python import PythonCompiler
7
7
  from multi_lang_build.mirror.config import MirrorConfig, get_mirror_config
8
8
  from multi_lang_build.register import register_skill
9
9
 
10
- __version__ = "0.2.3"
10
+ __version__ = "0.2.4"
11
11
  __all__ = [
12
12
  "BuildConfig",
13
13
  "BuildResult",
@@ -29,17 +29,18 @@ def register_claude_code(project_level: bool = True) -> bool:
29
29
  """Register as Claude Code skill.
30
30
 
31
31
  Args:
32
- project_level: If True (default), register to project-level .claude/CLAUDE.md.
32
+ project_level: If True (default), register to project-level .claude/multi-lang-build.md.
33
33
  If False, register to global ~/.claude/CLAUDE.md.
34
34
  """
35
35
  try:
36
36
  # Determine registration path
37
37
  if project_level:
38
- # Project-level: .claude/CLAUDE.md in current directory
38
+ # Project-level: .claude/multi-lang-build.md in current directory
39
39
  config_dir = Path.cwd() / ".claude"
40
40
  config_dir.mkdir(exist_ok=True)
41
- claude_md = config_dir / "CLAUDE.md"
41
+ skill_file = config_dir / "multi-lang-build.md"
42
42
  level_name = "project-level"
43
+ is_new = not skill_file.exists()
43
44
  else:
44
45
  # Global-level: ~/.claude/CLAUDE.md (only check CLI for global)
45
46
  result = subprocess.run(
@@ -55,17 +56,11 @@ def register_claude_code(project_level: bool = True) -> bool:
55
56
 
56
57
  claude_dir = Path.home() / ".claude"
57
58
  claude_dir.mkdir(exist_ok=True)
58
- claude_md = claude_dir / "CLAUDE.md"
59
+ skill_file = claude_dir / "CLAUDE.md"
59
60
  level_name = "global"
61
+ is_new = not skill_file.exists()
60
62
 
61
- # Read existing content
62
- existing_content = ""
63
- if claude_md.exists():
64
- existing_content = claude_md.read_text()
65
-
66
- skill_section = """
67
-
68
- ## Multi-Lang Build Tool
63
+ skill_content = """## Multi-Lang Build Tool
69
64
 
70
65
  You can use the `multi-lang-build` tool to compile projects:
71
66
 
@@ -73,6 +68,7 @@ You can use the `multi-lang-build` tool to compile projects:
73
68
  - `multi-lang-build pnpm <source> --output <dir>` - Build pnpm projects
74
69
  - `multi-lang-build go <source> --output <bin>` - Build Go projects
75
70
  - `multi-lang-build python <source> --output <dir>` - Build Python projects
71
+ - `multi-lang-build mirror list|set|show` - Configure domestic mirrors
76
72
 
77
73
  ### Examples:
78
74
  ```bash
@@ -87,23 +83,39 @@ multi-lang-build python ./src --output ./dist --mirror
87
83
 
88
84
  # Build pnpm project
89
85
  multi-lang-build pnpm ./src --output ./dist --mirror
86
+
87
+ # Configure mirror
88
+ multi-lang-build mirror set pip pip_aliyun
89
+ multi-lang-build mirror set go
90
90
  ```
91
91
 
92
92
  When working with Go projects, check if there are multiple main packages and use the `--target` flag to specify which one to build.
93
93
  """
94
94
 
95
- if "## Multi-Lang Build Tool" not in existing_content:
96
- with open(claude_md, "a") as f:
97
- f.write(skill_section)
98
- print(f"✅ Registered with Claude Code ({level_name}, added to {claude_md})")
95
+ if project_level:
96
+ # Project-level: create dedicated file
97
+ with open(skill_file, "w") as f:
98
+ f.write(skill_content)
99
+ print(f"✅ Registered with Claude Code ({level_name}, created {skill_file})")
99
100
  else:
100
- print(f"ℹ️ Already registered with Claude Code ({level_name}, {claude_md})")
101
+ # Global-level: append to existing CLAUDE.md if not already present
102
+ existing_content = ""
103
+ if skill_file.exists():
104
+ existing_content = skill_file.read_text()
105
+
106
+ if "## Multi-Lang Build Tool" not in existing_content:
107
+ with open(skill_file, "a") as f:
108
+ f.write(skill_content)
109
+ print(f"✅ Registered with Claude Code ({level_name}, added to {skill_file})")
110
+ else:
111
+ print(f"ℹ️ Already registered with Claude Code ({level_name}, {skill_file})")
101
112
 
102
113
  return True
103
114
 
104
115
  except Exception as e:
105
116
  print(f"❌ Failed to register with Claude Code: {e}")
106
117
  return False
118
+ return False
107
119
 
108
120
 
109
121
  def register_opencode(project_level: bool = True) -> bool: