10000 gh-109615: Look for 'Modules' as landmark for test_copy_python_src_ignore by zooba · Pull Request #110108 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-109615: Look for 'Modules' as landmark for test_copy_python_src_ignore #110108

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 3 commits into from
Sep 29, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
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
4 changes: 3 additions & 1 deletion Lib/test/test_support.py
Original file line number Diff line number Diff line change
Expand Up @@ -812,7 +812,9 @@ def test_copy_python_src_ignore(self):
if not os.path.exists(src_dir):
self.skipTest(f"cannot access Python source code directory:"
f" {src_dir!r}")
landmark = os.path.join(src_dir, 'Lib', 'os.py')
# Check that the landmark copy_python_src_ignore() expects is available
# (Previously we looked for 'Lib\os.py', which is always present on Windows.)
landmark = os.path.join(src_dir, 'Modules')
if not os.path.exists(landmark):
self.skipTest(f"cannot access Python source code directory:"
f" {landmark!r} landmark is missing")
Expand Down
12 changes: 12 additions & 0 deletions Modules/_ssl.c
Original file line number Diff line number Diff line change
Expand Up @@ -6222,7 +6222,19 @@ sslmodule_init_lock(PyObject *module)
return 0;
}

#ifdef MS_WINDOWS
static int
sslmodule_init_applink(PyObject *module)
{
OPENSSL_ProvideApplink();
return 0;
}
#endif

static PyModuleDef_Slot sslmodule_slots[] = {
#ifdef MS_WINDOWS
{Py_mod_exec, sslmodule_init_applink},
#endif
{Py_mod_exec, sslmodule_init_types},
{Py_mod_exec, sslmodule_init_exceptions},
{Py_mod_exec, sslmodule_init_socketapi},
Expand Down
2 changes: 1 addition & 1 deletion PCbuild/_ssl.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\Modules\_ssl.c" />
<ClCompile Include="$(opensslIncludeDir)\applink.c">
<ClCompile Include="$(opensslDir)\ms\applink.c">
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;$(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
</ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions PCbuild/openssl.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,14 @@
set VCINSTALLDIR=$(VCInstallDir)
if not exist "$(IntDir.TrimEnd('\'))" mkdir "$(IntDir.TrimEnd('\'))"
cd /D "$(IntDir.TrimEnd('\'))"
$(Perl) "$(opensslDir)\configure" $(OpenSSLPlatform) no-asm
rem $(Perl) "$(opensslDir)\configure" $(OpenSSLPlatform) no-asm
nmake
</NMakeBuildCommandLine>
</PropertyGroup>

<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />

<Target Name="_PatchUplink" BeforeTargets="Build">
<Target Name="_PatchUplink" BeforeTargets="Build" Condition="false">
<PropertyGroup>
<Uplink>$(opensslDir)\ms\uplink.c</Uplink>
<BeforePatch>((h = GetModuleHandle(NULL)) == NULL)</BeforePatch>
Expand Down
0