py2docfx 0.1.11.dev1899135__py3-none-any.whl → 0.1.11.dev1902551__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/convert_prepare/environment.py +25 -6
- {py2docfx-0.1.11.dev1899135.dist-info → py2docfx-0.1.11.dev1902551.dist-info}/METADATA +1 -1
- {py2docfx-0.1.11.dev1899135.dist-info → py2docfx-0.1.11.dev1902551.dist-info}/RECORD +5 -5
- {py2docfx-0.1.11.dev1899135.dist-info → py2docfx-0.1.11.dev1902551.dist-info}/WHEEL +0 -0
- {py2docfx-0.1.11.dev1899135.dist-info → py2docfx-0.1.11.dev1902551.dist-info}/top_level.txt +0 -0
@@ -1,6 +1,7 @@
|
|
1
1
|
import subprocess
|
2
2
|
import asyncio
|
3
3
|
import os
|
4
|
+
import sys
|
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,7 +12,7 @@ VENV_REQUIREMENT_MODULES = ["setuptools", "wheel"] # to support running setup.py
|
|
11
12
|
VENV_DIR = "venv"
|
12
13
|
VENV_BUFFER = 10
|
13
14
|
VENV_DELETE_BUFFER = 10
|
14
|
-
PIP_INSTALL_COMMAND = ["-m", "pip", "install", "--upgrade"]
|
15
|
+
PIP_INSTALL_COMMAND = ["-m", "pip", "install", "--upgrade"]
|
15
16
|
|
16
17
|
PIP_INSTALL_VENV_COMMON_OPTIONS = [
|
17
18
|
"--quiet",
|
@@ -53,16 +54,31 @@ def get_base_venv_path() -> str:
|
|
53
54
|
return os.path.join(PACKAGE_ROOT, VENV_DIR, "basevenv")
|
54
55
|
|
55
56
|
def get_venv_exe(venv_num: int) -> str:
|
56
|
-
|
57
|
+
if os.name == 'nt':
|
58
|
+
return os.path.join(get_venv_path(venv_num), "Scripts", "python.exe")
|
59
|
+
else:
|
60
|
+
return os.path.join(get_venv_path(venv_num), "bin", "python3")
|
57
61
|
|
58
62
|
def get_base_venv_exe() -> str:
|
59
|
-
|
63
|
+
if os.name == 'nt':
|
64
|
+
return os.path.join(get_base_venv_path(), "Scripts", "python.exe")
|
65
|
+
else:
|
66
|
+
return os.path.join(get_base_venv_path(), "bin", "python3")
|
60
67
|
|
61
68
|
def get_venv_package_path(venv_num: int) -> str:
|
62
|
-
|
69
|
+
if os.name == 'nt': # Windows
|
70
|
+
return os.path.join(get_venv_path(venv_num), "Lib", "site-packages")
|
71
|
+
else: # Linux and other Unix-like systems
|
72
|
+
python_version = f"python{sys.version_info.major}.{sys.version_info.minor}" # venv version should be same as native
|
73
|
+
return os.path.join(get_venv_path(venv_num), "lib", python_version, "site-packages")
|
63
74
|
|
64
75
|
def get_base_venv_sphinx_build_path() -> str:
|
65
|
-
|
76
|
+
if os.name == 'nt': # Windows
|
77
|
+
return os.path.join(get_base_venv_path(), "Lib", "site-packages", "sphinx", "cmd", "build.py")
|
78
|
+
else: # Linux and other Unix-like systems
|
79
|
+
python_version = f"python{sys.version_info.major}.{sys.version_info.minor}" # venv version should be same as native
|
80
|
+
return os.path.join(get_base_venv_path(), "lib", python_version, "site-packages", "sphinx", "cmd", "build.py")
|
81
|
+
|
66
82
|
|
67
83
|
async def install_converter_requirement_async(executable: str):
|
68
84
|
pip_cmd = PIP_INSTALL_COMMAND + PIP_INSTALL_VENV_COMMON_OPTIONS + REQUIREMENT_MODULES
|
@@ -79,7 +95,10 @@ async def install_required_packages(
|
|
79
95
|
await(await asyncio.create_subprocess_exec(executable, *pip_cmd)).wait()
|
80
96
|
|
81
97
|
async def create_environment(venv_path: int):
|
82
|
-
|
98
|
+
if os.name == 'nt':
|
99
|
+
await (await asyncio.create_subprocess_exec("python", "-m", "venv", venv_path)).wait()
|
100
|
+
else: # On linux the default command name is
|
101
|
+
await (await asyncio.create_subprocess_exec("python3", "-m", "venv", venv_path)).wait()
|
83
102
|
|
84
103
|
async def prepare_base_venv(required_package_list: list[PackageInfo], github_token: str, ado_token: str):
|
85
104
|
print(f"<CI INFO>: Creating basevenv...")
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: py2docfx
|
3
|
-
Version: 0.1.11.
|
3
|
+
Version: 0.1.11.dev1902551
|
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
|
@@ -2,7 +2,7 @@ py2docfx/__init__.py,sha256=kPRhPGPC1JknDotkksG428c1iIgfFr_4_7Jm-llrowY,72
|
|
2
2
|
py2docfx/__main__.py,sha256=O36ZLYcCTl6b4_Y6_JKcG8HCTLxD6pExi25yNocOQDk,12641
|
3
3
|
py2docfx/convert_prepare/__init__.py,sha256=XxtxrP0kmW3ZBHIAoxsPDEHzcgeC0WSnole8Lk6CjKs,11
|
4
4
|
py2docfx/convert_prepare/constants.py,sha256=9hj5Jn0PezeJ2FUGlIjJRtxMtZcgpRTtHnGlHNguWw0,81
|
5
|
-
py2docfx/convert_prepare/environment.py,sha256=
|
5
|
+
py2docfx/convert_prepare/environment.py,sha256=AEQPNaEFno3wuwKxNqLxQLipAxah8SpW5V5kO_GTgTo,6458
|
6
6
|
py2docfx/convert_prepare/generate_conf.py,sha256=wqs6iyElzJarH-20_qEL9zvZvt5xfBMsGXSXPSZy6wg,2295
|
7
7
|
py2docfx/convert_prepare/generate_document.py,sha256=NASy3I0thAkIMv1n6ECXBK8gVHORzfQrlPCNG8BAYaA,2646
|
8
8
|
py2docfx/convert_prepare/get_source.py,sha256=z3a3Uv6tnTKiJoh77-CZ2Xd6tWnpl_YwldKWI4u2Q98,5074
|
@@ -4235,7 +4235,7 @@ py2docfx/venv/venv1/Lib/site-packages/win32comext/taskscheduler/test/test_addtas
|
|
4235
4235
|
py2docfx/venv/venv1/Lib/site-packages/win32comext/taskscheduler/test/test_localsystem.py,sha256=08ojAS48W6RLsUbRD45j0SJhg_Y2NFHZT6qjT4Vrig0,75
|
4236
4236
|
py2docfx/venv/venv1/Scripts/pywin32_postinstall.py,sha256=u95n7QQUxpCjrZistYE-3gN451zXzopuJna8cXRQ4Jw,28115
|
4237
4237
|
py2docfx/venv/venv1/Scripts/pywin32_testall.py,sha256=-6yvZmd2lPQc4e8i6PgLsr_totF6mScvoq0Jqr0V2fM,3844
|
4238
|
-
py2docfx-0.1.11.
|
4239
|
-
py2docfx-0.1.11.
|
4240
|
-
py2docfx-0.1.11.
|
4241
|
-
py2docfx-0.1.11.
|
4238
|
+
py2docfx-0.1.11.dev1902551.dist-info/METADATA,sha256=214eEnS7XiCXv_h9m9HUGsCor6i26E9OyCJptwl7VfY,601
|
4239
|
+
py2docfx-0.1.11.dev1902551.dist-info/WHEEL,sha256=eOLhNAGa2EW3wWl_TU484h7q1UNgy0JXjjoqKoxAAQc,92
|
4240
|
+
py2docfx-0.1.11.dev1902551.dist-info/top_level.txt,sha256=5dH2uP81dczt_qQJ38wiZ-gzoVWasfiJALWRSjdbnYU,9
|
4241
|
+
py2docfx-0.1.11.dev1902551.dist-info/RECORD,,
|
File without changes
|
File without changes
|