Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit e73aefd

Browse filesBrowse files
authored
Merge branch 'main' into add-release-cycle
2 parents 3f918f0 + 86770f2 commit e73aefd
Copy full SHA for e73aefd

File tree

Expand file treeCollapse file tree

8 files changed

+86
-33
lines changed
Filter options
Expand file treeCollapse file tree

8 files changed

+86
-33
lines changed

‎_static/favicon.png

Copy file name to clipboard
11.2 KB
Loading

‎_static/og-image.png

Copy file name to clipboard
47.3 KB
Loading

‎conf.py

Copy file name to clipboardExpand all lines: conf.py
+12Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
'sphinx.ext.todo',
1212
'sphinx_copybutton',
1313
'sphinxcontrib.mermaid',
14+
'sphinxext.opengraph',
1415
'sphinxext.rediraffe',
1516
]
1617

@@ -38,6 +39,7 @@
3839
'devguide_overrides.css',
3940
]
4041
html_logo = "_static/python-logo.svg"
42+
html_favicon = "_static/favicon.png"
4143

4244
# Set to '' to prevent appending "documentation" to the site title
4345
html_title = ""
@@ -105,6 +107,16 @@
105107

106108
todo_include_todos = True
107109

110+
# sphinxext-opengraph config
111+
ogp_site_url = "https://devguide.python.org/"
112+
ogp_site_name = "Python Developer's Guide"
113+
ogp_image = "_static/og-image.png"
114+
ogp_custom_meta_tags = [
115+
'<meta property="og:image:width" content="1200">',
116+
'<meta property="og:image:height" content="630">',
117+
'<meta name="theme-color" content="#3776ab" />',
118+
]
119+
108120
# Strip the dollar prompt when copying code
109121
# https://sphinx-copybutton.readthedocs.io/en/latest/use.html#strip-and-configure-input-prompts-for-code-cells
110122
copybutton_prompt_text = "$"

‎core-developers/developers.csv

Copy file name to clipboardExpand all lines: core-developers/developers.csv
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
Kumar Aditya,kumaraditya303,2022-11-21,,
2+
Hugo van Kemenade,hugovk,2022-11-21,,
13
Alex Waygood,AlexWaygood,2022-10-18,,
24
Filipe Laíns,FFY00,2022-10-17,,
35
Erlend Egeberg Aasland,erlend-aasland,2022-05-05,,

‎core-developers/experts.rst

Copy file name to clipboardExpand all lines: core-developers/experts.rst
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -323,13 +323,13 @@ issue tracker ezio-melotti
323323
buildbots zware, pablogsal
324324
bytecode benjaminp, 1st1, markshannon, brandtbucher
325325
context managers ncoghlan
326-
core workflow Mariatta, ezio-melotti
326+
core workflow Mariatta, ezio-melotti, hugovk
327327
coverity scan tiran, brettcannon, Yhg1s
328328
cryptography gpshead, dstufft
329329
data formats mdickinson
330330
database malemburg
331-
devguide merwok, ezio-melotti, willingc, Mariatta
332-
documentation ezio-melotti, merwok, JulienPalard, willingc
331+
devguide merwok, ezio-melotti, willingc, Mariatta, hugovk
332+
documentation ezio-melotti, merwok, JulienPalard, willingc, hugovk
333333
emoji Mariatta
334334
extension modules encukou, ncoghlan
335335
filesystem giampaolo

‎developer-workflow/c-api.rst

Copy file name to clipboardExpand all lines: developer-workflow/c-api.rst
+5Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,11 @@ To add a new set of tests (or extract a set out of the monolithic
122122
- Call the ``_PyTestCapi_Init_*`` from ``PyInit__testcapi`` in
123123
``Modules/_testcapimodule.c``.
124124

125+
- Add the new C file to :cpy-file:`Modules/Setup.stdlib.in`,
126+
:cpy-file:`PCbuild/_testcapi.vcxproj` and
127+
:cpy-file:`PCbuild/_testcapi.vcxproj.filters`,
128+
alongside the other ``_testcapi/*.c`` entries.
129+
125130
Note that all ``Modules/_testcapi/*.c`` sources initialize the same module,
126131
so be careful about name collisions.
127132

‎getting-started/setup-building.rst

Copy file name to clipboardExpand all lines: getting-started/setup-building.rst
+63-30Lines changed: 63 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -245,47 +245,80 @@ still build properly).
245245
Windows
246246
-------
247247

248-
For a quick guide to building you can read `this documentation`_ from Victor
249-
Stinner.
250-
251-
All current versions of Python can be built using Microsoft Visual Studio 2017
252-
or later. You can download
253-
and use any of the free or paid versions of `Visual Studio 2017`_.
254-
255-
When installing Visual Studio 2017, select the **Python development** workload
256-
and the optional **Python native development tools** component to obtain all of
257-
the necessary build tools. If you do not already have git installed, you can
258-
find git for Windows on the **Individual components** tab of the installer.
248+
.. note:: If you are using the Windows Subsystem for Linux (WSL),
249+
:ref:`clone the repository <checkout>` from a native Windows shell program
250+
like PowerShell or the ``cmd.exe`` command prompt,
251+
and use a build of Git targeted for Windows,
252+
e.g. the `Git for Windows download from the official Git website`_.
253+
Otherwise, Visual Studio will not be able to find all the project's files
254+
and will fail the build.
255+
256+
For a concise step by step summary of building Python on Windows,
257+
you can read `Victor Stinner's guide`_.
258+
259+
All supported versions of Python can be built
260+
using Microsoft Visual Studio 2017 or later.
261+
You can download and use any of the free or paid versions of `Visual Studio`_.
262+
263+
When installing it, select the :guilabel:`Python development` workload
264+
and the optional :guilabel:`Python native development tools` component
265+
to obtain all of the necessary build tools.
266+
You can find Git for Windows on the :guilabel:`Individual components` tab
267+
if you don't already have it installed.
259268

260269
.. note:: If you want to build MSI installers, be aware that the build toolchain
261-
for them has a dependency on the Microsoft .NET Framework Version 3.5 (which
262-
may not be configured on recent versions of Windows, such as Windows 10). If
263-
you are building on a recent Windows version, use the Control Panel (Programs
264-
| Programs and Features | Turn Windows Features on or off) and ensure that the
265-
entry ".NET Framework 3.5 (includes .NET 2.0 and 3.0)" is enabled.
270+
for them has a dependency on the Microsoft .NET Framework Version 3.5
271+
(which may not be included on recent versions of Windows, such as Windows 10).
272+
If you are building on a recent Windows version, use the Control Panel
273+
(:menuselection:`Programs --> Programs and Features --> Turn Windows Features on or off`)
274+
and ensure that the entry
275+
:guilabel:`.NET Framework 3.5 (includes .NET 2.0 and 3.0)` is enabled.
266276

267277
Your first build should use the command line to ensure any external dependencies
268278
are downloaded:
269279

270-
.. code-block:: dosbatch
280+
.. code-block:: batch
281+
282+
PCbuild\build.bat -c Debug
283+
284+
The above command line build uses the ``-c Debug`` argument
285+
to build in the ``Debug`` configuration,
286+
which enables checks and assertions helpful for developing Python.
287+
By default, it builds in the ``Release`` configuration
288+
and for the 64-bit ``x64`` platform rather than 32-bit ``Win32``;
289+
use ``-c`` and ``-p`` to control build config and platform, respectively.
290+
291+
After this build succeeds, you can open the ``PCbuild\pcbuild.sln`` solution
292+
in the Visual Studio IDE to continue development, if you prefer.
293+
When building in Visual Studio,
294+
make sure to select build settings that match what you used with the script
295+
(the :guilabel:`Debug` configuration and the :guilabel:`x64` platform)
296+
from the dropdown menus in the toolbar.
297+
298+
.. note::
299+
300+
If you need to change the build configuration or platform,
301+
build once with the ``build.bat`` script set to those options first
302+
before building with them in VS to ensure all files are rebuilt properly,
303+
or you may encouter errors when loading modules that were not rebuilt.
304+
305+
Avoid selecting the ``PGInstrument`` and ``PGUpdate`` configurations,
306+
as these are intended for PGO builds and not for normal development.
307+
308+
You can run the build of Python you've compiled with:
271309

272-
PCbuild\build.bat
310+
.. code-block:: batch
273311
274-
After this build succeeds, you can open the ``PCbuild\pcbuild.sln`` solution in
275-
Visual Studio to continue development.
312+
PCbuild\amd64\python_d.exe
276313
277-
See the `readme`_ for more details on what other software is necessary and how
278-
to build.
314+
See the `PCBuild readme`_ for more details on what other software is necessary
315+
and how to build.
279316

280-
.. note:: If you are using the Windows Subsystem for Linux (WSL), clone the
281-
repository from a native Windows terminal program like cmd.exe command prompt
282-
or PowerShell as well as use a build of git targeted for Windows, e.g., the
283-
official one from `<https://git-scm.com>`_. Otherwise, Visual Studio will
284-
not be able to find all the project's files and will fail the build.
317+
.. _Victor Stinner's guide: https://cpython-core-tutorial.readthedocs.io/en/latest/build_cpython_windows.html
318+
.. _Visual Studio: https://visualstudio.microsoft.com/
319+
.. _PCBuild readme: https://github.com/python/cpython/blob/main/PCbuild/readme.txt
320+
.. _Git for Windows download from the official Git website: https://git-scm.com/download/win
285321

286-
.. _this documentation: https://cpython-core-tutorial.readthedocs.io/en/latest/build_cpython_windows.html
287-
.. _Visual Studio 2017: https://visualstudio.microsoft.com/
288-
.. _readme: https://github.com/python/cpython/blob/main/PCbuild/readme.txt
289322

290323
.. _build-dependencies:
291324

‎requirements.txt

Copy file name to clipboardExpand all lines: requirements.txt
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ furo>=2022.6.4
33
sphinx-lint==0.6.7
44
sphinx_copybutton>=0.3.3
55
sphinxcontrib-mermaid
6+
sphinxext-opengraph>=0.7.1
67
sphinxext-rediraffe

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.