Skip to content

Commit fa23bd2

Browse files
authored
bpo-37351: Removes libpython38.a from standard Windows distribution (GH-14276)
1 parent 9b32b44 commit fa23bd2

File tree

6 files changed

+21
-37
lines changed

6 files changed

+21
-37
lines changed

Doc/whatsnew/3.8.rst

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1458,6 +1458,25 @@ Changes in the C API
14581458
* The functions :c:func:`PyNode_AddChild` and :c:func:`PyParser_AddToken` now accept
14591459
two additional ``int`` arguments *end_lineno* and *end_col_offset*.
14601460

1461+
.. highlight:: shell
1462+
1463+
* The :file:`libpython38.a` file to allow MinGW tools to link directly against
1464+
:file:`python38.dll` is no longer included in the regular Windows distribution.
1465+
If you require this file, it may be generated with the ``gendef`` and
1466+
``dlltool`` tools, which are part of the MinGW binutils package::
1467+
1468+
gendef python38.dll > tmp.def
1469+
dlltool --dllname python38.dll --def tmp.def --output-lib libpython38.a
1470+
1471+
The location of an installed :file:`pythonXY.dll` will depend on the
1472+
installation options and the version and language of Windows. See
1473+
:ref:`using-on-windows` for more information. The resulting library should be
1474+
placed in the same directory as :file:`pythonXY.lib`, which is generally the
1475+
:file:`libs` directory under your Python installation.
1476+
1477+
.. highlight:: python3
1478+
1479+
14611480
CPython bytecode changes
14621481
------------------------
14631482

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Removes libpython38.a from standard Windows distribution.

Tools/msi/README.txt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -159,9 +159,7 @@ The following properties may be passed when building these projects.
159159

160160
/p:BuildForRelease=(true|false)
161161
When true, adds extra verification to ensure a complete installer is
162-
produced. For example, binutils is required when building for a release
163-
to generate MinGW-compatible libraries, and the build will be aborted if
164-
this fails. Defaults to false.
162+
produced. Defaults to false.
165163

166164
/p:ReleaseUri=(any URI)
167165
Used to generate unique IDs for the installers to allow side-by-side

Tools/msi/dev/dev.wixproj

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,6 @@
77
<OutputType>Package</OutputType>
88
</PropertyGroup>
99
<Import Project="..\msi.props" />
10-
<PropertyGroup>
11-
<DefineConstants Condition="$(BuildForRelease) and $(SuppressMinGWLib) == ''">
12-
$(DefineConstants);
13-
IncludeMinGWLib=1;
14-
</DefineConstants>
15-
</PropertyGroup>
1610
<ItemGroup>
1711
<Compile Include="dev.wxs" />
1812
<Compile Include="dev_files.wxs" />
@@ -31,20 +25,5 @@
3125
</InstallFiles>
3226
</ItemGroup>
3327

34-
<Target Name="BuildMinGWLib"
35-
Inputs="$(BuildPath)$(PyDllName).dll"
36-
Outputs="$(BuildPath)lib$(PyDllName).a"
37-
AfterTargets="PrepareForBuild"
38-
Condition="$(BuildForRelease) and $(SuppressMinGWLib) == ''">
39-
<!-- Build libpython##.a as part of this project. This requires gendef and dlltool on the path. -->
40-
<PropertyGroup>
41-
<_DllToolOpts>-m i386 --as-flags=--32</_DllToolOpts>
42-
<_DllToolOpts Condition="$(Platform) == 'x64'">-m i386:x86-64</_DllToolOpts>
43-
</PropertyGroup>
44-
45-
<Exec Command='gendef - "$(BuildPath)$(PyDllName).dll" &gt; "$(IntermediateOutputPath)mingwlib.def"' ContinueOnError="false" />
46-
<Exec Command='dlltool --dllname $(PyDllName).dll --def "$(IntermediateOutputPath)mingwlib.def" --output-lib "$(BuildPath)lib$(PyDllName).a" $(_DllToolOpts)' />
47-
</Target>
48-
4928
<Import Project="..\msi.targets" />
5029
</Project>

Tools/msi/dev/dev.wxs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@
1010
<ComponentGroupRef Id="dev_include" />
1111
<ComponentGroupRef Id="dev_pyconfig" />
1212
<ComponentGroupRef Id="dev_libs" />
13-
<?ifdef IncludeMinGWLib ?>
14-
<ComponentGroupRef Id="dev_mingw" />
15-
<?endif ?>
1613
<ComponentRef Id="OptionalFeature" />
1714
</Feature>
1815
</Product>

Tools/msi/dev/dev_files.wxs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,4 @@
2929
</Component>
3030
</ComponentGroup>
3131
</Fragment>
32-
33-
<?ifdef IncludeMinGWLib ?>
34-
<Fragment>
35-
<ComponentGroup Id="dev_mingw">
36-
<Component Id="libs_libpython.a" Directory="libs" Guid="*">
37-
<File Id="libs_libpython.a" Name="libpython$(var.MajorVersionNumber)$(var.MinorVersionNumber).a" KeyPath="yes" />
38-
</Component>
39-
</ComponentGroup>
40-
</Fragment>
41-
<?endif ?>
4232
</Wix>

0 commit comments

Comments
 (0)