multi-lang-build 0.2.5__py3-none-any.whl → 0.2.7__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.
@@ -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.5"
10
+ __version__ = "0.2.7"
11
11
  __all__ = [
12
12
  "BuildConfig",
13
13
  "BuildResult",
@@ -125,23 +125,35 @@ class GoCompiler(CompilerBase):
125
125
  Returns:
126
126
  BuildResult containing success status and output information.
127
127
  """
128
+ from loguru import logger
129
+
128
130
  go_executable = self._get_executable_path()
129
-
131
+
130
132
  # Validate directories
131
133
  source_dir = self._validate_directory(source_dir, create_if_not_exists=False)
132
134
  output_dir = self._validate_directory(output_dir, create_if_not_exists=True)
133
-
135
+
136
+ # Print current working directory
137
+ cwd = Path.cwd().resolve()
138
+ logger.info(f"当前工作目录: {cwd}")
139
+
134
140
  # Prepare environment
135
141
  env = environment.copy() if environment else {}
136
-
142
+
143
+ # Ensure GOMODCACHE is set
144
+ if "GOMODCACHE" not in env and "GOPATH" not in env:
145
+ default_cache = Path.home() / "go" / "pkg" / "mod"
146
+ env["GOMODCACHE"] = str(default_cache)
147
+ logger.info(f"Go模块缓存: {default_cache}")
148
+
137
149
  if mirror_enabled:
138
150
  mirror_key = self._mirror or "go"
139
151
  env = apply_mirror_environment(mirror_key, env)
140
-
152
+
141
153
  # Check for go.mod
142
154
  go_mod = source_dir / "go.mod"
143
155
  has_go_mod = go_mod.exists()
144
-
156
+
145
157
  # Download dependencies if go.mod exists
146
158
  if has_go_mod:
147
159
  deps_result = self._run_build(
@@ -197,6 +209,8 @@ class GoCompiler(CompilerBase):
197
209
  Returns:
198
210
  BuildResult containing success status and output information.
199
211
  """
212
+ from loguru import logger
213
+
200
214
  go_executable = self._get_executable_path()
201
215
 
202
216
  source_dir = self._validate_directory(source_dir, create_if_not_exists=False)
@@ -204,8 +218,19 @@ class GoCompiler(CompilerBase):
204
218
  # Ensure output directory exists
205
219
  output_path.parent.mkdir(parents=True, exist_ok=True)
206
220
 
221
+ # Print current working directory
222
+ cwd = Path.cwd().resolve()
223
+ logger.info(f"当前工作目录: {cwd}")
224
+
225
+ # Prepare environment
207
226
  env = environment.copy() if environment else {}
208
227
 
228
+ # Ensure GOMODCACHE is set
229
+ if "GOMODCACHE" not in env and "GOPATH" not in env:
230
+ default_cache = Path.home() / "go" / "pkg" / "mod"
231
+ env["GOMODCACHE"] = str(default_cache)
232
+ logger.info(f"Go模块缓存: {default_cache}")
233
+
209
234
  if mirror_enabled:
210
235
  mirror_key = self._mirror or "go"
211
236
  env = apply_mirror_environment(mirror_key, env)
@@ -253,13 +278,26 @@ class GoCompiler(CompilerBase):
253
278
  Returns:
254
279
  BuildResult containing success status and output information.
255
280
  """
281
+ from loguru import logger
282
+
256
283
  go_executable = self._get_executable_path()
257
284
 
258
285
  source_dir = self._validate_directory(source_dir, create_if_not_exists=False)
259
286
  output_dir = self._validate_directory(output_dir, create_if_not_exists=True)
260
287
 
288
+ # Print current working directory
289
+ cwd = Path.cwd().resolve()
290
+ logger.info(f"当前工作目录: {cwd}")
291
+
292
+ # Prepare environment
261
293
  env = environment.copy() if environment else {}
262
294
 
295
+ # Ensure GOMODCACHE is set
296
+ if "GOMODCACHE" not in env and "GOPATH" not in env:
297
+ default_cache = Path.home() / "go" / "pkg" / "mod"
298
+ env["GOMODCACHE"] = str(default_cache)
299
+ logger.info(f"Go模块缓存: {default_cache}")
300
+
263
301
  if mirror_enabled:
264
302
  mirror_key = self._mirror or "go"
265
303
  env = apply_mirror_environment(mirror_key, env)
@@ -300,16 +338,29 @@ class GoCompiler(CompilerBase):
300
338
  Returns:
301
339
  BuildResult containing success status and output information.
302
340
  """
341
+ from loguru import logger
342
+
303
343
  go_executable = self._get_executable_path()
304
-
344
+
305
345
  source_dir = self._validate_directory(source_dir, create_if_not_exists=False)
306
-
346
+
347
+ # Print current working directory
348
+ cwd = Path.cwd().resolve()
349
+ logger.info(f"当前工作目录: {cwd}")
350
+
351
+ # Prepare environment
307
352
  env = environment.copy() if environment else {}
308
-
353
+
354
+ # Ensure GOMODCACHE is set
355
+ if "GOMODCACHE" not in env and "GOPATH" not in env:
356
+ default_cache = Path.home() / "go" / "pkg" / "mod"
357
+ env["GOMODCACHE"] = str(default_cache)
358
+ logger.info(f"Go模块缓存: {default_cache}")
359
+
309
360
  if mirror_enabled:
310
361
  mirror_key = self._mirror or "go"
311
362
  env = apply_mirror_environment(mirror_key, env)
312
-
363
+
313
364
  test_args = [go_executable, "test"]
314
365
 
315
366
  if verbose:
@@ -345,12 +396,25 @@ class GoCompiler(CompilerBase):
345
396
  Returns:
346
397
  BuildResult containing success status and output information.
347
398
  """
399
+ from loguru import logger
400
+
348
401
  go_executable = self._get_executable_path()
349
402
 
350
403
  source_dir = self._validate_directory(source_dir, create_if_not_exists=False)
351
404
 
405
+ # Print current working directory
406
+ cwd = Path.cwd().resolve()
407
+ logger.info(f"当前工作目录: {cwd}")
408
+
409
+ # Prepare environment
352
410
  env = environment.copy() if environment else {}
353
411
 
412
+ # Ensure GOMODCACHE is set
413
+ if "GOMODCACHE" not in env and "GOPATH" not in env:
414
+ default_cache = Path.home() / "go" / "pkg" / "mod"
415
+ env["GOMODCACHE"] = str(default_cache)
416
+ logger.info(f"Go模块缓存: {default_cache}")
417
+
354
418
  if mirror_enabled:
355
419
  mirror_key = self._mirror or "go"
356
420
  env = apply_mirror_environment(mirror_key, env)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: multi-lang-build
3
- Version: 0.2.5
3
+ Version: 0.2.7
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
@@ -98,6 +98,9 @@ Description-Content-Type: text/markdown
98
98
  ```bash
99
99
  pip install multi-lang-build
100
100
 
101
+ # 升级到最新版本
102
+ pip install --upgrade multi-lang-build
103
+
101
104
  # 配置国内镜像(可选)
102
105
  multi-lang-build mirror set pip # pip 使用清华镜像
103
106
  multi-lang-build mirror set go # Go 使用 goproxy.cn
@@ -1,18 +1,18 @@
1
- multi_lang_build/__init__.py,sha256=kePB6uFzZCR95M3Ox5qX91gUP2yXBaWS9C7Gh8LZTnY,1777
1
+ multi_lang_build/__init__.py,sha256=GMokWIk7DhWy0xnmfKcNSeRBQ0_iH4KbIIM9PP5i0jg,1777
2
2
  multi_lang_build/cli.py,sha256=cOlXyJKdb6sReBPyCLZgQhCkJOA_lbkY67Xfk-hGbPc,12949
3
3
  multi_lang_build/py.typed,sha256=c8jtFarMovqA5DdwhEzKPH4WrX85xaoiWilIlvuc6KU,84
4
4
  multi_lang_build/register.py,sha256=dbNXNTnxtbh3r3Giej3trHQmI2VO5ydbkkExvCdYm8w,14501
5
5
  multi_lang_build/types.py,sha256=iCyz_6KmEBU4xwpCtfJnpzXoiSsmOcOKOhzHJVx8Z4Q,1043
6
6
  multi_lang_build/compiler/__init__.py,sha256=y5vvVN6HdSzq4W1kXBMy_vQq9G3-TtiVcNMOyBQHbCw,484
7
7
  multi_lang_build/compiler/base.py,sha256=crtDW9bthfV-FSpp96O2Hi0DrViNqcIt4TjAVK2lPXE,9391
8
- multi_lang_build/compiler/go.py,sha256=JV0GdHfhe-Lqyh7byMX_HguQ_XMwspW9RtHZIG1wyAo,15273
8
+ multi_lang_build/compiler/go.py,sha256=zMQPYjka1jXkx0q00yCRHql7pRcp1Rwpsvh-mhNgtd8,17486
9
9
  multi_lang_build/compiler/pnpm.py,sha256=BDUVZCX5PuhqlFp_ARKUMbLqUDLraTlKp3tdom60hzk,15774
10
10
  multi_lang_build/compiler/python.py,sha256=8XqE_Jp_G-x6g5Qrux4tCV8Ag-zZqLLLXapSIzcSLJw,17662
11
11
  multi_lang_build/mirror/__init__.py,sha256=RrZOQ83bxImAR275zeAUKyyCgwqdGt5xH8tF_-UShJo,489
12
12
  multi_lang_build/mirror/cli.py,sha256=qv6RI6izxUIsfMCIDOtTK3avcNSJpAaUF3NPiK1W49A,9820
13
13
  multi_lang_build/mirror/config.py,sha256=d9KJoV80BUZOR9R3DpcT1r0nyxH1HK6hfLZU7IsUGcw,8552
14
- multi_lang_build-0.2.5.dist-info/METADATA,sha256=6o3vhDX8wpCItsDpsG4MvkXrmViJM2YO44ViQTWFCww,10009
15
- multi_lang_build-0.2.5.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
16
- multi_lang_build-0.2.5.dist-info/entry_points.txt,sha256=0vd5maQH5aZoqnpbr2Yr_IWB_-ncWX1rO3jGBCW3pHY,319
17
- multi_lang_build-0.2.5.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
18
- multi_lang_build-0.2.5.dist-info/RECORD,,
14
+ multi_lang_build-0.2.7.dist-info/METADATA,sha256=RviFo1dqlzx-VPyaH60KayKnzOH1PH3FRy1o-W4PB50,10073
15
+ multi_lang_build-0.2.7.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
16
+ multi_lang_build-0.2.7.dist-info/entry_points.txt,sha256=0vd5maQH5aZoqnpbr2Yr_IWB_-ncWX1rO3jGBCW3pHY,319
17
+ multi_lang_build-0.2.7.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
18
+ multi_lang_build-0.2.7.dist-info/RECORD,,