Skip to content

Commit fc1f335

Browse files
authored
DOC Fix missing API reference in readthedocs build (#203)
* fix readthedocs * Add backslash to make sphinx happy
1 parent b5549f4 commit fc1f335

File tree

3 files changed

+32
-26
lines changed

3 files changed

+32
-26
lines changed

.readthedocs.yml

+6
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,15 @@ version: 2
22

33
sphinx:
44
configuration: docs/conf.py
5+
fail_on_warning: true
56

67
formats: all
78

9+
submodules:
10+
include:
11+
- micropip/_vendored/packaging
12+
recursive: true
13+
814
python:
915
install:
1016
- requirements: docs/requirements-doc.txt

docs/conf.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from pathlib import Path
55

66
project = "micropip"
7-
copyright = "2019-2022, Pyodide contributors and Mozilla"
7+
copyright = "2019-2025, Pyodide contributors and Mozilla"
88
# author = "Pyodide Authors"
99

1010
# -- General configuration ---------------------------------------------------
@@ -19,7 +19,7 @@
1919
]
2020

2121
intersphinx_mapping = {
22-
"python": ("https://docs.python.org/3.10", None),
22+
"python": ("https://docs.python.org/3.12", None),
2323
"pyodide": ("https://pyodide.org/en/stable/", None),
2424
}
2525

micropip/package_manager.py

+24-24
Original file line numberDiff line numberDiff line change
@@ -54,85 +54,85 @@ async def install(
5454
5555
Parameters
5656
----------
57-
requirements :
57+
requirements:
5858
5959
A requirement or list of requirements to install. Each requirement is a
6060
string, which should be either a package name or a wheel URI:
6161
62-
- If the requirement does not end in ``.whl``, it will be interpreted as
63-
a package name. A package with this name must either be present
62+
- If the requirement does not end in ``.whl``, it will be interpreted as \
63+
a package name. A package with this name must either be present \
6464
in the Pyodide lock file or on PyPI.
6565
66-
- If the requirement ends in ``.whl``, it is a wheel URI. The part of
67-
the requirement after the last ``/`` must be a valid wheel name in
68-
compliance with the `PEP 427 naming convention
66+
- If the requirement ends in ``.whl``, it is a wheel URI. The part of \
67+
the requirement after the last ``/`` must be a valid wheel name in \
68+
compliance with the `PEP 427 naming convention \
6969
<https://www.python.org/dev/peps/pep-0427/#file-format>`_.
7070
71-
- If a wheel URI starts with ``emfs:``, it will be interpreted as a path
72-
in the Emscripten file system (Pyodide's file system). E.g.,
73-
``emfs:../relative/path/wheel.whl`` or ``emfs:/absolute/path/wheel.whl``.
71+
- If a wheel URI starts with ``emfs:``, it will be interpreted as a path \
72+
in the Emscripten file system (Pyodide's file system). E.g., \
73+
``emfs:../relative/path/wheel.whl`` or ``emfs:/absolute/path/wheel.whl``. \
7474
In this case, only .whl files are supported.
7575
76-
- If a wheel URI requirement starts with ``http:`` or ``https:`` it will
76+
- If a wheel URI requirement starts with ``http:`` or ``https:`` it will \
7777
be interpreted as a URL.
7878
79-
- In node, you can access the native file system using a URI that starts
79+
- In node, you can access the native file system using a URI that starts \
8080
with ``file:``. In the browser this will not work.
8181
82-
keep_going :
82+
keep_going:
8383
8484
This parameter decides the behavior of the micropip when it encounters a
8585
Python package without a pure Python wheel while doing dependency
8686
resolution:
8787
88-
- If ``False``, an error will be raised on first package with a missing
88+
- If ``False``, an error will be raised on first package with a missing \
8989
wheel.
9090
91-
- If ``True``, the micropip will keep going after the first error, and
91+
- If ``True``, the micropip will keep going after the first error, and \
9292
report a list of errors at the end.
9393
94-
deps :
94+
deps:
9595
9696
If ``True``, install dependencies specified in METADATA file for each
9797
package. Otherwise do not install dependencies.
9898
99-
credentials :
99+
credentials:
100100
101101
This parameter specifies the value of ``credentials`` when calling the
102102
`fetch() <https://developer.mozilla.org/en-US/docs/Web/API/fetch>`__
103103
function which is used to download the package.
104104
105105
When not specified, ``fetch()`` is called without ``credentials``.
106106
107-
pre :
107+
pre:
108108
109109
If ``True``, include pre-release and development versions. By default,
110110
micropip only finds stable versions.
111111
112-
index_urls :
112+
index_urls:
113113
114114
A list of URLs or a single URL to use as the package index when looking
115115
up packages. If None, *https://pypi.org/pypi/{package_name}/json* is used.
116116
117-
- The index URL should support the
117+
- The index URL should support the \
118118
`JSON API <https://warehouse.pypa.io/api-reference/json/>`__ .
119119
120-
- The index URL may contain the placeholder {package_name} which will be
121-
replaced with the package name when looking up a package. If it does not
120+
- The index URL may contain the placeholder {package_name} which will be \
121+
replaced with the package name when looking up a package. If it does not \
122122
contain the placeholder, the package name will be appended to the URL.
123123
124-
- If a list of URLs is provided, micropip will try each URL in order until
124+
- If a list of URLs is provided, micropip will try each URL in order until \
125125
it finds a package. If no package is found, an error will be raised.
126126
127-
constraints :
127+
constraints:
128128
129129
A list of requirements with versions/URLs which will be used only if
130130
needed by any ``requirements``.
131131
132132
Unlike ``requirements``, the package name _must_ be provided in the
133133
PEP-508 format e.g. ``pkgname@https://...``.
134134
135-
verbose :
135+
verbose:
136136
Print more information about the process. By default, micropip does not
137137
change logger level. Setting ``verbose=True`` will print similar
138138
information as pip.

0 commit comments

Comments
 (0)