Skip to content

Commit 272f487

Browse files
committed
Copy pyconfig.h into Windows package include
Ensure the generated Windows pyconfig.h (from the PC directory) is present and packaged. The script now checks for the header and throws if missing, then copies it to the package include directory (overwriting if necessary). This guarantees the platform-specific pyconfig.h is bundled for consumers building against the package.
1 parent 103ce80 commit 272f487

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

windows/package-for-dart.ps1

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,13 @@ New-Item -ItemType Directory -Force -Path "$packageRoot\DLLs", "$packageRoot\inc
4141
Copy-Item -Path "$srcDir\Include\*" -Destination "$packageRoot\include" -Recurse -Force
4242
Copy-Item -Path "$srcDir\Lib\*" -Destination "$packageRoot\Lib" -Recurse -Force
4343

44+
# pyconfig.h is generated/platform-specific and lives under PC on Windows builds.
45+
$pyconfigHeader = Join-Path $srcDir "PC\pyconfig.h"
46+
if (-not (Test-Path $pyconfigHeader)) {
47+
throw "Missing required header: $pyconfigHeader"
48+
}
49+
Copy-Item -Path $pyconfigHeader -Destination "$packageRoot\include\pyconfig.h" -Force
50+
4451
# Root binaries and symbols.
4552
foreach ($name in @("LICENSE.txt", "NEWS.txt")) {
4653
$src = Join-Path $srcDir $name

0 commit comments

Comments
 (0)