diff options
author | Victor Stinner <vstinner@python.org> | 2023-10-02 16:53:38 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-02 16:53:38 (GMT) |
commit | 6387b5313c60c1403785b2245db33372476ac304 (patch) | |
tree | 2d018951c747d9be4f40141c95c619836e736f31 | |
parent | 4d0d1c3866cc408ff3382a9a0220ac0e4f2b3b34 (diff) | |
download | cpython-6387b5313c60c1403785b2245db33372476ac304.zip cpython-6387b5313c60c1403785b2245db33372476ac304.tar.gz cpython-6387b5313c60c1403785b2245db33372476ac304.tar.bz2 |
gh-108494: Document how to add a project in PCbuild/readme.txt (#110077)
Add _testclinic_limited to Tools/msi/test/test_files.wxs.
-rw-r--r-- | PCbuild/readme.txt | 28 | ||||
-rw-r--r-- | Tools/msi/test/test_files.wxs | 18 |
2 files changed, 37 insertions, 9 deletions
diff --git a/PCbuild/readme.txt b/PCbuild/readme.txt index 199aacd..98b3701 100644 --- a/PCbuild/readme.txt +++ b/PCbuild/readme.txt @@ -293,3 +293,31 @@ project, with some projects overriding certain specific values. The GUI doesn't always reflect the correct settings and may confuse the user with false information, especially for settings that automatically adapt for different configurations. + +Add a new project +----------------- + +For example, add a new _testclinic_limited project to build a new +_testclinic_limited extension, the file Modules/_testclinic_limited.c: + +* In PCbuild/, copy _testclinic.vcxproj to _testclinic_limited.vcxproj, + replace RootNamespace value with `_testclinic_limited`, replace + `_asyncio.c` with `_testclinic_limited.c`. +* Open Visual Studio, open PCbuild\pcbuild.sln solution, add the + PCbuild\_testclinic_limited.vcxproj project to the solution ("add existing + project). +* Add a dependency on the python project to the new _testclinic_limited + project. +* Save and exit Visual Studio. +* Add `;_testclinic_limited` to `<TestModules Include="...">` in + PCbuild\pcbuild.proj. +* Update "exts" in Tools\msi\lib\lib_files.wxs file or in + Tools\msi\test\test_files.wxs file (for tests). +* PC\layout\main.py needs updating if you add a test-only extension whose name + doesn't start with "_test". +* Add the extension to PCbuild\readme.txt (this file). +* Build Python from scratch (clean the solution) to check that the new project + is built successfully. +* Ensure the new .vcxproj and .vcxproj.filters files are added to your commit, + as well as the changes to pcbuild.sln, pcbuild.proj and any other modified + files. diff --git a/Tools/msi/test/test_files.wxs b/Tools/msi/test/test_files.wxs index 87e164c..bb9b258 100644 --- a/Tools/msi/test/test_files.wxs +++ b/Tools/msi/test/test_files.wxs @@ -1,41 +1,41 @@ <?xml version="1.0" encoding="UTF-8"?> <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"> - <?define exts=_testcapi;_ctypes_test;_testbuffer;_testimportmultiple;_testmultiphase;_testsinglephase;_testconsole;_testinternalcapi;_testclinic ?> + <?define exts=_testcapi;_ctypes_test;_testbuffer;_testimportmultiple;_testmultiphase;_testsinglephase;_testconsole;_testinternalcapi;_testclinic;_testclinic_limited ?> <Fragment> <ComponentGroup Id="test_extensions"> <?foreach ext in $(var.exts)?> - + <Component Id="$(var.ext).pyd" Directory="DLLs" Guid="*"> <File Name="$(var.ext).pyd" KeyPath="yes" /> </Component> - + <?endforeach ?> </ComponentGroup> </Fragment> - + <Fragment> <ComponentGroup Id="test_extensions_symbols"> <?foreach ext in $(var.exts)?> - + <Component Id="$(var.ext).pdb" Directory="DLLs" Guid="*"> <File Name="$(var.ext).pdb" /> </Component> - + <?endforeach ?> </ComponentGroup> </Fragment> - + <Fragment> <ComponentGroup Id="test_extensions_d"> <?foreach ext in $(var.exts)?> - + <Component Id="$(var.ext)_d.pyd" Directory="DLLs" Guid="*"> <File Name="$(var.ext)_d.pyd" /> </Component> <Component Id="$(var.ext)_d.pdb" Directory="DLLs" Guid="*"> <File Name="$(var.ext)_d.pdb" /> </Component> - + <?endforeach ?> </ComponentGroup> </Fragment> |