Skip to content

Commit 84b09d0

Browse files
authored
Merge pull request #13251 from Shepard2154/add-docs-for-platform-and-python-version
doc: Explain how to query values for --platform and --python-version
2 parents 354e9d4 + dfd685a commit 84b09d0

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

docs/html/cli/pip_download.rst

+5
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,12 @@ constrained download requirement. If some of your dependencies are not
4747
available as binaries, you can build them manually for your target platform
4848
and let pip download know where to find them using ``--find-links``.
4949

50+
.. note::
5051

52+
To determine the appropriate values for ``--python-version`` and ``--platform``, you can query the target system using the following commands:
53+
54+
- For the Python version, use :func:`sysconfig.get_python_version() <sysconfig.get_python_version>`.
55+
- For the platform, use :func:`packaging.tags.platform_tags() <packaging.tags.platform_tags>`.
5156

5257
Options
5358
=======

docs/html/conf.py

+1
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@
7878
intersphinx_mapping = {
7979
"python": ("https://docs.python.org/3", None),
8080
"pypug": ("https://packaging.python.org", None),
81+
"packaging": ("https://packaging.pypa.io/en/stable/", None),
8182
}
8283

8384
# -- Options for towncrier_draft extension --------------------------------------------

0 commit comments

Comments
 (0)