Skip to content

Commit 0948cda

Browse files
committed
pythongh-108494: Document how to add a project in PCbuild/readme.txt (python#110077)
(cherry picked from commit 6387b53)
1 parent 914ffb4 commit 0948cda

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

PCbuild/readme.txt

+28
Original file line numberDiff line numberDiff line change
@@ -291,3 +291,31 @@ project, with some projects overriding certain specific values. The GUI
291291
doesn't always reflect the correct settings and may confuse the user
292292
with false information, especially for settings that automatically adapt
293293
for different configurations.
294+
295+
Add a new project
296+
-----------------
297+
298+
For example, add a new _testclinic_limited project to build a new
299+
_testclinic_limited extension, the file Modules/_testclinic_limited.c:
300+
301+
* In PCbuild/, copy _testclinic.vcxproj to _testclinic_limited.vcxproj,
302+
replace RootNamespace value with `_testclinic_limited`, replace
303+
`_asyncio.c` with `_testclinic_limited.c`.
304+
* Open Visual Studio, open PCbuild\pcbuild.sln solution, add the
305+
PCbuild\_testclinic_limited.vcxproj project to the solution ("add existing
306+
project).
307+
* Add a dependency on the python project to the new _testclinic_limited
308+
project.
309+
* Save and exit Visual Studio.
310+
* Add `;_testclinic_limited` to `<TestModules Include="...">` in
311+
PCbuild\pcbuild.proj.
312+
* Update "exts" in Tools\msi\lib\lib_files.wxs file or in
313+
Tools\msi\test\test_files.wxs file (for tests).
314+
* PC\layout\main.py needs updating if you add a test-only extension whose name
315+
doesn't start with "_test".
316+
* Add the extension to PCbuild\readme.txt (this file).
317+
* Build Python from scratch (clean the solution) to check that the new project
318+
is built successfully.
319+
* Ensure the new .vcxproj and .vcxproj.filters files are added to your commit,
320+
as well as the changes to pcbuild.sln, pcbuild.proj and any other modified
321+
files.

0 commit comments

Comments
 (0)