py2docfx 0.1.9.dev1929293__py3-none-any.whl → 0.1.9.dev1929828__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.
- py2docfx/__main__.py +4 -3
- py2docfx/convert_prepare/environment.py +0 -3
- py2docfx/convert_prepare/pack.py +13 -3
- py2docfx/convert_prepare/sphinx_caller.py +11 -22
- {py2docfx-0.1.9.dev1929293.dist-info → py2docfx-0.1.9.dev1929828.dist-info}/METADATA +1 -1
- {py2docfx-0.1.9.dev1929293.dist-info → py2docfx-0.1.9.dev1929828.dist-info}/RECORD +8 -8
- {py2docfx-0.1.9.dev1929293.dist-info → py2docfx-0.1.9.dev1929828.dist-info}/WHEEL +0 -0
- {py2docfx-0.1.9.dev1929293.dist-info → py2docfx-0.1.9.dev1929828.dist-info}/top_level.txt +0 -0
py2docfx/__main__.py
CHANGED
@@ -322,10 +322,11 @@ def on_rm_error( func, path, exc_info):
|
|
322
322
|
def remove_folder(folder: str | os.PathLike) -> None:
|
323
323
|
try:
|
324
324
|
shutil.rmtree(folder)
|
325
|
-
except PermissionError:
|
326
|
-
|
325
|
+
except PermissionError as e:
|
326
|
+
if '.git' and '.idx' in str(e):
|
327
|
+
shutil.rmtree(folder, ignore_errors=False, onerror=on_rm_error)
|
327
328
|
if os.path.exists(folder):
|
328
|
-
raise
|
329
|
+
raise RuntimeError(f"Failed to remove folder {folder}")
|
329
330
|
|
330
331
|
def temp_folder_clean_up(folder_list: list[str | os.PathLike]) -> None:
|
331
332
|
for folder in folder_list:
|
@@ -47,7 +47,6 @@ def install_converter_requirements(executable: str):
|
|
47
47
|
async def install_venv_requirements(venv_num: int):
|
48
48
|
venv_exe = get_venv_exe(venv_num)
|
49
49
|
pip_cmd = ["-m", "pip", "install", "--upgrade"]+ VENV_REQUIREMENT_MODULES
|
50
|
-
# await(await asyncio.create_subprocess_exec(venv_exe, *pip_cmd)).wait()
|
51
50
|
await pip_utils.run_async_subprocess(venv_exe, pip_cmd)
|
52
51
|
|
53
52
|
def get_venv_path(venv_num: int) -> str:
|
@@ -85,7 +84,6 @@ def get_base_venv_sphinx_build_path() -> str:
|
|
85
84
|
|
86
85
|
async def install_converter_requirement_async(executable: str):
|
87
86
|
pip_cmd = PIP_INSTALL_COMMAND + PIP_INSTALL_VENV_COMMON_OPTIONS + REQUIREMENT_MODULES
|
88
|
-
# await(await asyncio.create_subprocess_exec(executable, *pip_cmd)).wait()
|
89
87
|
await pip_utils.run_async_subprocess(executable, pip_cmd)
|
90
88
|
|
91
89
|
async def install_required_packages(
|
@@ -96,7 +94,6 @@ async def install_required_packages(
|
|
96
94
|
# get_source(package, idx, vststoken=ado_token, githubtoken=github_token)
|
97
95
|
package_name, options = package.get_install_command()
|
98
96
|
pip_cmd = PIP_INSTALL_COMMAND + PIP_INSTALL_VENV_COMMON_OPTIONS + options + [package_name]
|
99
|
-
# await(await asyncio.create_subprocess_exec(executable, *pip_cmd)).wait()
|
100
97
|
await pip_utils.run_async_subprocess(executable, pip_cmd)
|
101
98
|
|
102
99
|
async def create_environment(venv_path: int):
|
py2docfx/convert_prepare/pack.py
CHANGED
@@ -1,8 +1,10 @@
|
|
1
1
|
import shutil
|
2
2
|
from os import path
|
3
3
|
import os
|
4
|
-
import
|
4
|
+
import subprocess
|
5
|
+
import sys
|
5
6
|
|
7
|
+
from py2docfx.docfx_yaml.logger import get_package_logger, log_subprocess_ouput
|
6
8
|
|
7
9
|
def unpack_dist(dist_file):
|
8
10
|
if dist_file.endswith(".whl"):
|
@@ -22,8 +24,16 @@ def unpack_wheel(file_path):
|
|
22
24
|
"""
|
23
25
|
Transform a wheel file to a folder containing source code
|
24
26
|
"""
|
25
|
-
|
26
|
-
|
27
|
+
py2docfx_logger = get_package_logger(__name__)
|
28
|
+
command = [sys.executable,
|
29
|
+
'-m',
|
30
|
+
'wheel',
|
31
|
+
'unpack',
|
32
|
+
file_path,
|
33
|
+
'-d',
|
34
|
+
os.path.dirname(file_path)]
|
35
|
+
output = subprocess.run(command, check=True, capture_output=True, text=True)
|
36
|
+
log_subprocess_ouput(output, py2docfx_logger)
|
27
37
|
extract_folder = [file for file in os.listdir(path.dirname(file_path)) if path.isdir(path.join(path.dirname(file_path), file))][0]
|
28
38
|
data_folder = path.join(path.dirname(file_path), extract_folder, extract_folder + ".data")
|
29
39
|
if path.exists(data_folder):
|
@@ -32,29 +32,18 @@ def run_apidoc(rst_path, source_code_path, exclude_paths, package_info: PackageI
|
|
32
32
|
if os.path.isdir(subfolderPath):
|
33
33
|
msg = "<CI INFO>: Subfolder path {}.".format(subfolderPath)
|
34
34
|
py2docfx_logger.info(msg)
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
]
|
45
|
-
else:
|
46
|
-
args = [
|
47
|
-
"-q",
|
48
|
-
"--module-first",
|
49
|
-
"--no-headings",
|
50
|
-
"--no-toc",
|
51
|
-
"--implicit-namespaces",
|
52
|
-
"-o",
|
53
|
-
rst_path,
|
54
|
-
subfolderPath
|
55
|
-
]
|
35
|
+
args = [
|
36
|
+
"--module-first",
|
37
|
+
"--no-headings",
|
38
|
+
"--no-toc",
|
39
|
+
"--implicit-namespaces",
|
40
|
+
"-o",
|
41
|
+
rst_path,
|
42
|
+
subfolderPath,
|
43
|
+
]
|
56
44
|
args.extend(exclude_paths)
|
57
|
-
|
45
|
+
output = subprocess.run([sys.executable, "-m", "sphinx.ext.apidoc"] + args, capture_output=True, text=True)
|
46
|
+
log_subprocess_ouput(output, py2docfx_logger)
|
58
47
|
if package_info.build_in_subpackage and subfolder == "azure":
|
59
48
|
subpackages_rst_record = move_rst_files_to_subfolder(
|
60
49
|
package_paths.doc_folder, package_info.name,
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: py2docfx
|
3
|
-
Version: 0.1.9.
|
3
|
+
Version: 0.1.9.dev1929828
|
4
4
|
Summary: A package built based on Sphinx which download source code package and generate yaml files supported by docfx.
|
5
5
|
Author: Microsoft Corporation
|
6
6
|
License: MIT License
|
@@ -1,14 +1,14 @@
|
|
1
1
|
py2docfx/__init__.py,sha256=kPRhPGPC1JknDotkksG428c1iIgfFr_4_7Jm-llrowY,72
|
2
|
-
py2docfx/__main__.py,sha256=
|
2
|
+
py2docfx/__main__.py,sha256=EbG_3p6wOrbkMWg8OF83XK_5aPl00uuO4-1Le1TXjac,15056
|
3
3
|
py2docfx/convert_prepare/__init__.py,sha256=XxtxrP0kmW3ZBHIAoxsPDEHzcgeC0WSnole8Lk6CjKs,11
|
4
4
|
py2docfx/convert_prepare/constants.py,sha256=RC5DqNkqWvx4hb91FrajZ1R9dBFLxcPyoEJ43jdm36E,102
|
5
|
-
py2docfx/convert_prepare/environment.py,sha256=
|
5
|
+
py2docfx/convert_prepare/environment.py,sha256=X6818O3GFkkEvy_Ssj7HIxEgW8hOg0-p61_MZOs9E1c,6991
|
6
6
|
py2docfx/convert_prepare/generate_conf.py,sha256=wqs6iyElzJarH-20_qEL9zvZvt5xfBMsGXSXPSZy6wg,2295
|
7
7
|
py2docfx/convert_prepare/generate_document.py,sha256=mNfJpLViIfzwRnjVwXmg5H5lVWzKJkUHeXTiJouA39o,2879
|
8
8
|
py2docfx/convert_prepare/get_source.py,sha256=6EMSLiDOfid4d7SDxweV_-TGV4McxhSxKQPJju2Mi4Y,5221
|
9
9
|
py2docfx/convert_prepare/git.py,sha256=OIoaX_0LG5ueY8zmUwrbxl_YyMxwLzgTp6g0uSkC2Y0,6617
|
10
10
|
py2docfx/convert_prepare/install_package.py,sha256=hATmgazcSX7k2n4jQXh9sQMyNUc1k1YqHv5K5UMALq4,262
|
11
|
-
py2docfx/convert_prepare/pack.py,sha256=
|
11
|
+
py2docfx/convert_prepare/pack.py,sha256=k8eme75VRhdsZOc9ox0zNORXP4kFhAiPiP4mUdNBwwU,1614
|
12
12
|
py2docfx/convert_prepare/package_info.py,sha256=2fDyalHtxhZQICehDK4zv7k69HE427c1MLEuHVnPzBU,7624
|
13
13
|
py2docfx/convert_prepare/package_info_extra_settings.py,sha256=u5B5e8hc0m9PA_-0kJzq1LtKn-xzZlucwXHTFy49mDg,1475
|
14
14
|
py2docfx/convert_prepare/params.py,sha256=PXMB8pLtb4XbfI322avA47q0AO-TyBE6kZf7FU8I6v4,1771
|
@@ -16,7 +16,7 @@ py2docfx/convert_prepare/paths.py,sha256=964RX81Qf__rzXgEATfqBNFCKTYVjLt9J7WCz2T
|
|
16
16
|
py2docfx/convert_prepare/pip_utils.py,sha256=SGWS07Rn0sWlZsr_fdGIqLFHsgma4UvsghjzkNogFkc,2930
|
17
17
|
py2docfx/convert_prepare/repo_info.py,sha256=6ASJlhBwf6vZTSENgrWCVlJjlJVhuBxzdQyWEdWAC4c,117
|
18
18
|
py2docfx/convert_prepare/source.py,sha256=6-A7oof3-WAQcQZZVpT9pKiFLH4CCIZeYqq0MN0O3gw,1710
|
19
|
-
py2docfx/convert_prepare/sphinx_caller.py,sha256=
|
19
|
+
py2docfx/convert_prepare/sphinx_caller.py,sha256=P3iuTCGGZm4oHawBKpaXHPNg4Pdy6lzsMzo4A8WqKB0,4157
|
20
20
|
py2docfx/convert_prepare/subpackage.py,sha256=mXAi_07pXvnPkSLZfykDh_7VeFxfLy74pYlzhMO8N_Q,5183
|
21
21
|
py2docfx/convert_prepare/conf_templates/conf.py_t,sha256=8zxvY1WiG-z2aiSNDY0719C08QxZLXXEMwKfYSGN0ZE,3811
|
22
22
|
py2docfx/convert_prepare/conf_templates/root_doc.rst_t,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -4180,7 +4180,7 @@ py2docfx/venv/venv1/Lib/site-packages/win32comext/taskscheduler/test/test_addtas
|
|
4180
4180
|
py2docfx/venv/venv1/Lib/site-packages/win32comext/taskscheduler/test/test_localsystem.py,sha256=08ojAS48W6RLsUbRD45j0SJhg_Y2NFHZT6qjT4Vrig0,75
|
4181
4181
|
py2docfx/venv/venv1/Scripts/pywin32_postinstall.py,sha256=u95n7QQUxpCjrZistYE-3gN451zXzopuJna8cXRQ4Jw,28115
|
4182
4182
|
py2docfx/venv/venv1/Scripts/pywin32_testall.py,sha256=-6yvZmd2lPQc4e8i6PgLsr_totF6mScvoq0Jqr0V2fM,3844
|
4183
|
-
py2docfx-0.1.9.
|
4184
|
-
py2docfx-0.1.9.
|
4185
|
-
py2docfx-0.1.9.
|
4186
|
-
py2docfx-0.1.9.
|
4183
|
+
py2docfx-0.1.9.dev1929828.dist-info/METADATA,sha256=XwLCnksnsT2nMutJwEweteQkOiqAo4jN9I6-mvGFUL4,600
|
4184
|
+
py2docfx-0.1.9.dev1929828.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
|
4185
|
+
py2docfx-0.1.9.dev1929828.dist-info/top_level.txt,sha256=5dH2uP81dczt_qQJ38wiZ-gzoVWasfiJALWRSjdbnYU,9
|
4186
|
+
py2docfx-0.1.9.dev1929828.dist-info/RECORD,,
|
File without changes
|
File without changes
|