py2docfx 0.1.10.dev1870743__py3-none-any.whl → 0.1.10.dev1870753__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 +1 -0
- py2docfx/convert_prepare/environment.py +16 -3
- {py2docfx-0.1.10.dev1870743.dist-info → py2docfx-0.1.10.dev1870753.dist-info}/METADATA +1 -1
- {py2docfx-0.1.10.dev1870743.dist-info → py2docfx-0.1.10.dev1870753.dist-info}/RECORD +6 -6
- {py2docfx-0.1.10.dev1870743.dist-info → py2docfx-0.1.10.dev1870753.dist-info}/WHEEL +0 -0
- {py2docfx-0.1.10.dev1870743.dist-info → py2docfx-0.1.10.dev1870753.dist-info}/top_level.txt +0 -0
py2docfx/__main__.py
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
import subprocess
|
2
2
|
import asyncio
|
3
3
|
import os
|
4
|
+
import shutil
|
4
5
|
from py2docfx import PACKAGE_ROOT
|
5
6
|
from py2docfx.convert_prepare.package_info import PackageInfo
|
6
7
|
from py2docfx.convert_prepare.get_source import get_source
|
@@ -11,6 +12,12 @@ VENV_DIR = "venv"
|
|
11
12
|
VENV_BUFFER = 10
|
12
13
|
PIP_INSTALL_COMMAND = ["-m", "pip", "install", "--upgrade"]
|
13
14
|
|
15
|
+
PIP_INSTALL_VENV_COMMON_OPTIONS = [
|
16
|
+
"--quiet",
|
17
|
+
"--no-warn-conflicts",
|
18
|
+
"--disable-pip-version-check",
|
19
|
+
]
|
20
|
+
|
14
21
|
def install_converter_requirements(executable: str):
|
15
22
|
"""
|
16
23
|
Install setuptools/sphinx/pyyaml/jinja2
|
@@ -40,7 +47,7 @@ def get_venv_exe(venv_num: int) -> str:
|
|
40
47
|
return os.path.join(get_venv_path(venv_num), "Scripts", "python.exe")
|
41
48
|
|
42
49
|
async def install_converter_requirement_async(executable: str):
|
43
|
-
pip_cmd = PIP_INSTALL_COMMAND + REQUIREMENT_MODULES
|
50
|
+
pip_cmd = PIP_INSTALL_COMMAND + PIP_INSTALL_VENV_COMMON_OPTIONS + REQUIREMENT_MODULES
|
44
51
|
await(await asyncio.create_subprocess_exec(executable, *pip_cmd)).wait()
|
45
52
|
|
46
53
|
async def install_required_packages(
|
@@ -50,7 +57,7 @@ async def install_required_packages(
|
|
50
57
|
# if package.install_type == package.InstallType.SOURCE_CODE:
|
51
58
|
# get_source(package, idx, vststoken=ado_token, githubtoken=github_token)
|
52
59
|
package_name, options = package.get_install_command()
|
53
|
-
pip_cmd = PIP_INSTALL_COMMAND +
|
60
|
+
pip_cmd = PIP_INSTALL_COMMAND + PIP_INSTALL_VENV_COMMON_OPTIONS + options + [package_name]
|
54
61
|
await(await asyncio.create_subprocess_exec(executable, *pip_cmd)).wait()
|
55
62
|
|
56
63
|
async def create_environment(venv_num: int):
|
@@ -63,4 +70,10 @@ async def prepare_venv(venv_num: int, required_package_list: list[PackageInfo],
|
|
63
70
|
await install_converter_requirement_async(get_venv_exe(venv_num))
|
64
71
|
print(f"<CI INFO>: Installing required packages in venv{venv_num}...")
|
65
72
|
await install_required_packages(get_venv_exe(venv_num), required_package_list, github_token, ado_token)
|
66
|
-
print(f"<CI INFO>: venv{venv_num} setup complete.")
|
73
|
+
print(f"<CI INFO>: venv{venv_num} setup complete.")
|
74
|
+
|
75
|
+
def remove_environment(venv_num: int):
|
76
|
+
if os.path.exists(get_venv_path(venv_num)):
|
77
|
+
print(f"<CI INFO>: Removing venv{venv_num}...")
|
78
|
+
shutil.rmtree(get_venv_path(venv_num))
|
79
|
+
print(f"<CI INFO>: venv{venv_num} removed.")
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: py2docfx
|
3
|
-
Version: 0.1.10.
|
3
|
+
Version: 0.1.10.dev1870753
|
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,7 +1,7 @@
|
|
1
1
|
py2docfx/__init__.py,sha256=kPRhPGPC1JknDotkksG428c1iIgfFr_4_7Jm-llrowY,72
|
2
|
-
py2docfx/__main__.py,sha256=
|
2
|
+
py2docfx/__main__.py,sha256=l0CbFZzaDitZHv84xL99FQ9YBNIRxapQ4MF3nu_7mEI,15137
|
3
3
|
py2docfx/convert_prepare/__init__.py,sha256=XxtxrP0kmW3ZBHIAoxsPDEHzcgeC0WSnole8Lk6CjKs,11
|
4
|
-
py2docfx/convert_prepare/environment.py,sha256=
|
4
|
+
py2docfx/convert_prepare/environment.py,sha256=gJTGV632VAbOiYbWbLLv47wP8ffjnKLa2yFPH3wBWiQ,3583
|
5
5
|
py2docfx/convert_prepare/generate_conf.py,sha256=wqs6iyElzJarH-20_qEL9zvZvt5xfBMsGXSXPSZy6wg,2295
|
6
6
|
py2docfx/convert_prepare/generate_document.py,sha256=cLfFr7od0RHADkXyh2gaPreXZGvKNBUlduBosYTuPbk,3118
|
7
7
|
py2docfx/convert_prepare/get_source.py,sha256=eEIbfLkGdBSOIJElMBTiXkKlkujb_hdFu5g6InNroTg,5851
|
@@ -1882,7 +1882,7 @@ py2docfx/venv/venv0/Scripts/rst2s5.py,sha256=lnv7lRNv1Oz3gjI5BOJlTqfCJQLJxgwJ9l3
|
|
1882
1882
|
py2docfx/venv/venv0/Scripts/rst2xetex.py,sha256=5_9VjwA5RKUMJG9L__1ZiS8DIeLHRdPWeWW7B4otM8M,909
|
1883
1883
|
py2docfx/venv/venv0/Scripts/rst2xml.py,sha256=hU2nzGVbXbQBnH_ydI5f2VDkGQyDMUdTgz3rfa45JMg,638
|
1884
1884
|
py2docfx/venv/venv0/Scripts/rstpep2html.py,sha256=uLmCJKfEKPeeWS0n76HharN9YEYIuCRQQXfPPBJaRso,706
|
1885
|
-
py2docfx-0.1.10.
|
1886
|
-
py2docfx-0.1.10.
|
1887
|
-
py2docfx-0.1.10.
|
1888
|
-
py2docfx-0.1.10.
|
1885
|
+
py2docfx-0.1.10.dev1870753.dist-info/METADATA,sha256=vWePDertTTMqAuxEcNX9IOfZ3sLfT68TEprsg62yYk0,601
|
1886
|
+
py2docfx-0.1.10.dev1870753.dist-info/WHEEL,sha256=eOLhNAGa2EW3wWl_TU484h7q1UNgy0JXjjoqKoxAAQc,92
|
1887
|
+
py2docfx-0.1.10.dev1870753.dist-info/top_level.txt,sha256=5dH2uP81dczt_qQJ38wiZ-gzoVWasfiJALWRSjdbnYU,9
|
1888
|
+
py2docfx-0.1.10.dev1870753.dist-info/RECORD,,
|
File without changes
|
File without changes
|