py2docfx 0.1.9.dev1862202__py3-none-any.whl → 0.1.9.dev1865926__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 +19 -14
- {py2docfx-0.1.9.dev1862202.dist-info → py2docfx-0.1.9.dev1865926.dist-info}/METADATA +1 -1
- {py2docfx-0.1.9.dev1862202.dist-info → py2docfx-0.1.9.dev1865926.dist-info}/RECORD +5 -5
- {py2docfx-0.1.9.dev1862202.dist-info → py2docfx-0.1.9.dev1865926.dist-info}/WHEEL +0 -0
- {py2docfx-0.1.9.dev1862202.dist-info → py2docfx-0.1.9.dev1865926.dist-info}/top_level.txt +0 -0
py2docfx/__main__.py
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
from __future__ import annotations # Avoid A | B annotation break under <= py3.9
|
2
|
+
import asyncio
|
2
3
|
import argparse
|
3
4
|
import os
|
4
5
|
import subprocess
|
@@ -223,6 +224,20 @@ def install_required_packages(
|
|
223
224
|
get_source(package, idx, vststoken=ado_token, githubtoken=github_token)
|
224
225
|
install_package(package)
|
225
226
|
|
227
|
+
async def create_venv_async(venv_dir: os.PathLike, package: PackageInfo) -> None:
|
228
|
+
subprocess.run([sys.executable, "-m", "venv", venv_dir], check=True)
|
229
|
+
venv_exe = os.path.join(venv_dir, "Scripts", "python.exe")
|
230
|
+
subprocess.run([venv_exe, "-m", "pip", "install", "sphinx==6.1.3"], check=True)
|
231
|
+
subprocess.run([venv_exe, "-m", "pip", "install", "setuptools"], check=True)
|
232
|
+
subprocess.run([venv_exe, "-m", "pip", "install", "pyyaml"], check=True)
|
233
|
+
subprocess.run([venv_exe, "-m", "pip", "install", "jinja2==3.0.3"], check=True)
|
234
|
+
if package.version:
|
235
|
+
pkg_install_str = package.name + "==" + package.version
|
236
|
+
else:
|
237
|
+
pkg_install_str = package.name
|
238
|
+
subprocess.run([venv_exe, "-m", "pip", "install", pkg_install_str], check=True)
|
239
|
+
return venv_exe
|
240
|
+
|
226
241
|
def donwload_package_generate_documents(
|
227
242
|
package_info_list: list[PackageInfo],
|
228
243
|
output_root: str | os.PathLike | None,
|
@@ -236,23 +251,13 @@ def donwload_package_generate_documents(
|
|
236
251
|
end_time = time.time()
|
237
252
|
print(f"<get_source>{package.name},{end_time-start_time}<get_source/>")
|
238
253
|
|
239
|
-
start_time = time.time()
|
240
|
-
install_package(package)
|
241
|
-
end_time = time.time()
|
254
|
+
# start_time = time.time()
|
255
|
+
# install_package(package)
|
256
|
+
# end_time = time.time()
|
242
257
|
print(f"<install_package>{package.name},{end_time-start_time}<install_package/>")
|
243
258
|
|
244
259
|
venv_dir = os.path.join(PACKAGE_ROOT, "venv", "0")
|
245
|
-
|
246
|
-
venv_exe = os.path.join(venv_dir, "Scripts", "python.exe")
|
247
|
-
subprocess.run([venv_exe, "-m", "pip", "install", "sphinx==6.1.3"], check=True)
|
248
|
-
subprocess.run([venv_exe, "-m", "pip", "install", "setuptools"], check=True)
|
249
|
-
subprocess.run([venv_exe, "-m", "pip", "install", "pyyaml"], check=True)
|
250
|
-
subprocess.run([venv_exe, "-m", "pip", "install", "jinja2==3.0.3"], check=True)
|
251
|
-
if package.version:
|
252
|
-
pkg_install_str = package.name + "==" + package.version
|
253
|
-
else:
|
254
|
-
pkg_install_str = package.name
|
255
|
-
subprocess.run([venv_exe, "-m", "pip", "install", pkg_install_str], check=True)
|
260
|
+
venv_exe = asyncio.run(create_venv_async(venv_dir, package))
|
256
261
|
|
257
262
|
start_time = time.time()
|
258
263
|
generate_document(package, output_root, venv_exe)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: py2docfx
|
3
|
-
Version: 0.1.9.
|
3
|
+
Version: 0.1.9.dev1865926
|
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,5 +1,5 @@
|
|
1
1
|
py2docfx/__init__.py,sha256=kPRhPGPC1JknDotkksG428c1iIgfFr_4_7Jm-llrowY,72
|
2
|
-
py2docfx/__main__.py,sha256=
|
2
|
+
py2docfx/__main__.py,sha256=E9u8YQ3W4eMm7xg6ELrzih2sfcn0YqxTbxBFP2euhR8,13065
|
3
3
|
py2docfx/convert_prepare/__init__.py,sha256=XxtxrP0kmW3ZBHIAoxsPDEHzcgeC0WSnole8Lk6CjKs,11
|
4
4
|
py2docfx/convert_prepare/environment.py,sha256=AwS4c4OSwVdxlExBLVo310HrVhFMhWQ2Wh9RJPJKH1c,894
|
5
5
|
py2docfx/convert_prepare/generate_conf.py,sha256=wqs6iyElzJarH-20_qEL9zvZvt5xfBMsGXSXPSZy6wg,2295
|
@@ -5331,7 +5331,7 @@ py2docfx/venv/0/Scripts/rst2s5.py,sha256=qup0-LMkBGLuh6Bj-1n8ucEVc5T8ANpqL0Pscmp
|
|
5331
5331
|
py2docfx/venv/0/Scripts/rst2xetex.py,sha256=FNBX2UuBN3vqJQss_DdqjMBSU5BQmOFGLOZV8DSNAuk,905
|
5332
5332
|
py2docfx/venv/0/Scripts/rst2xml.py,sha256=7uyNsZb5QOV243R-EQqdsyUKX7t5_9sQd6LYtw1ZyPA,634
|
5333
5333
|
py2docfx/venv/0/Scripts/rstpep2html.py,sha256=p-PYRUWuvD1LWAzofxrQu_Go3SMfIS8q0pmy6HT2Y5E,702
|
5334
|
-
py2docfx-0.1.9.
|
5335
|
-
py2docfx-0.1.9.
|
5336
|
-
py2docfx-0.1.9.
|
5337
|
-
py2docfx-0.1.9.
|
5334
|
+
py2docfx-0.1.9.dev1865926.dist-info/METADATA,sha256=kY1kthhnWMguDb-mKMpM8MoJV-rjLljUyyH51hAtyRc,600
|
5335
|
+
py2docfx-0.1.9.dev1865926.dist-info/WHEEL,sha256=eOLhNAGa2EW3wWl_TU484h7q1UNgy0JXjjoqKoxAAQc,92
|
5336
|
+
py2docfx-0.1.9.dev1865926.dist-info/top_level.txt,sha256=5dH2uP81dczt_qQJ38wiZ-gzoVWasfiJALWRSjdbnYU,9
|
5337
|
+
py2docfx-0.1.9.dev1865926.dist-info/RECORD,,
|
File without changes
|
File without changes
|