8000 gh-108494: Document how to add a project in PCbuild/readme.txt by vstinner · Pull Request #110077 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-108494: Document how to add a project in PCbuild/readme.txt #110077

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 2, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Complete the doc
Add _testclinic_limited to Tools/msi/test/test_files.wxs
  • Loading branch information
vstinner committed Sep 30, 2023
commit c0a05b41cab77e454fe74fa868ec39290116b31b
10 changes: 9 additions & 1 deletion PCbuild/readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ 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 _asyncio.vcxproj to _testclinic_limited.vcxproj,
* 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
Expand All @@ -311,5 +311,13 @@ _testclinic_limited extension, the file Modules/_testclinic_limited.c:
* 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.
18 changes: 9 additions & 9 deletions Tools/msi/test/test_files.wxs
Original file line number Diff line number Diff line change
@@ -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>
Expand Down
0