ezKit 1.1.2__tar.gz → 1.1.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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ezKit
3
- Version: 1.1.2
3
+ Version: 1.1.4
4
4
  Summary: Easy Kit
5
5
  Author: septvean
6
6
  Author-email: septvean@gmail.com
@@ -1,5 +1,11 @@
1
1
  # Python Easy Kit
2
2
 
3
+ 手动安装:
4
+
5
+ ```sh
6
+ pip install ezKit-1.1.3.tar.gz
7
+ ```
8
+
3
9
  版本号说明: [PEP 440 – Version Identification and Dependency Specification](https://peps.python.org/pep-0440/)
4
10
 
5
11
  代码规范:
@@ -1297,7 +1297,7 @@ def load_toml_file(file: str = None, debug: bool = False):
1297
1297
  return None
1298
1298
 
1299
1299
 
1300
- def git_clone(git_repository: str = None, local_repository: str = None, delete: bool = False, debug: bool = False) -> bool:
1300
+ def git_clone(git_repository: str = None, local_repository: str = None, timeout: int = 30, delete: bool = False, debug: bool = False) -> bool:
1301
1301
  try:
1302
1302
  info = 'Git克隆'
1303
1303
  # 获取应用程序Git仓库
@@ -1306,12 +1306,18 @@ def git_clone(git_repository: str = None, local_repository: str = None, delete:
1306
1306
  logger.info(f'[{info}]开始克隆')
1307
1307
  # 删除本地仓库
1308
1308
  delete_directory(local_repository) if v_true(delete, bool) else next
1309
- result = shell(f'git clone {git_repository} {local_repository}', universal_newlines=True, stderr=subprocess.PIPE, stdout=subprocess.PIPE)
1309
+ result = shell(
1310
+ command=f'timeout -s 9 {timeout} git clone {git_repository} {local_repository}',
1311
+ universal_newlines=True,
1312
+ stderr=subprocess.PIPE,
1313
+ stdout=subprocess.PIPE
1314
+ )
1310
1315
  if result.returncode == 0:
1311
1316
  logger.success(f'[{info}]克隆成功')
1312
1317
  return True
1313
1318
  else:
1314
1319
  logger.error(f'[{info}]克隆失败')
1320
+ logger.error(result.stdout.splitlines()) if v_true(debug, bool) else next
1315
1321
  return False
1316
1322
  except Exception as e:
1317
1323
  logger.error(f'[{info}]克隆失败')
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ezKit
3
- Version: 1.1.2
3
+ Version: 1.1.4
4
4
  Summary: Easy Kit
5
5
  Author: septvean
6
6
  Author-email: septvean@gmail.com
@@ -2,7 +2,7 @@ from setuptools import find_packages, setup
2
2
 
3
3
  setup(
4
4
  name='ezKit',
5
- version='1.1.2',
5
+ version='1.1.4',
6
6
  author='septvean',
7
7
  author_email='septvean@gmail.com',
8
8
  description='Easy Kit',
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
File without changes