Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
103 changes: 103 additions & 0 deletions recipe/0019-Unvendor-openssl.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
From 98324c6bf0ce513fc54dbf4943832426d7cf4677 Mon Sep 17 00:00:00 2001
From: Nehal J Wani <nehaljw.kkd1@gmail.com>
Date: Sat, 24 Nov 2018 20:38:02 -0600
Subject: [PATCH 19/19] Unvendor openssl

---
PCbuild/_ssl.vcxproj | 3 ---
PCbuild/_ssl.vcxproj.filters | 3 ---
PCbuild/openssl.props | 2 +-
PCbuild/python.props | 6 +++---
PCbuild/python.vcxproj | 3 +++
PCbuild/pythonw.vcxproj | 3 +++
6 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/PCbuild/_ssl.vcxproj b/PCbuild/_ssl.vcxproj
index aaf95a3..b59f2d0 100644
--- a/PCbuild/_ssl.vcxproj
+++ b/PCbuild/_ssl.vcxproj
@@ -67,9 +67,6 @@
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\Modules\_ssl.c" />
- <ClCompile Include="$(opensslIncludeDir)\applink.c">
- <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;$(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="..\PC\python_nt.rc" />
diff --git a/PCbuild/_ssl.vcxproj.filters b/PCbuild/_ssl.vcxproj.filters
index bd46b60..1384aef 100644
--- a/PCbuild/_ssl.vcxproj.filters
+++ b/PCbuild/_ssl.vcxproj.filters
@@ -9,9 +9,6 @@
<ClCompile Include="..\Modules\_ssl.c">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="$(opensslIncludeDir)\applink.c">
- <Filter>Source Files</Filter>
- </ClCompile>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="..\PC\python_nt.rc" />
diff --git a/PCbuild/openssl.props b/PCbuild/openssl.props
index 257cc85..d5e7e8b 100644
--- a/PCbuild/openssl.props
+++ b/PCbuild/openssl.props
@@ -5,7 +5,7 @@
<AdditionalIncludeDirectories>$(opensslIncludeDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
- <AdditionalLibraryDirectories>$(opensslOutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalLibraryDirectories>$(opensslDir)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>ws2_32.lib;libcrypto.lib;libssl.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
diff --git a/PCbuild/python.props b/PCbuild/python.props
index 09f11d3..9a4606f 100644
--- a/PCbuild/python.props
+++ b/PCbuild/python.props
@@ -49,9 +49,9 @@
<sqlite3Dir>$(ExternalsDir)sqlite-3.21.0.0\</sqlite3Dir>
<bz2Dir>$(ExternalsDir)bzip2-1.0.6\</bz2Dir>
<lzmaDir>$(ExternalsDir)xz-5.2.2\</lzmaDir>
- <opensslDir>$(ExternalsDir)openssl-1.1.0i\</opensslDir>
- <opensslOutDir>$(ExternalsDir)openssl-bin-1.1.0i\$(ArchName)\</opensslOutDir>
- <opensslIncludeDir>$(opensslOutDir)include</opensslIncludeDir>
+ <opensslDir>$(OPENSSL_DIR)\</opensslDir>
+ <opensslOutDir>$(opensslDir)bin</opensslOutDir>
+ <opensslIncludeDir>$(opensslDir)include</opensslIncludeDir>
<nasmDir>$(ExternalsDir)\nasm-2.11.06\</nasmDir>
<zlibDir>$(ExternalsDir)\zlib-1.2.11\</zlibDir>

diff --git a/PCbuild/python.vcxproj b/PCbuild/python.vcxproj
index 8b64e36..5b0fa34 100644
--- a/PCbuild/python.vcxproj
+++ b/PCbuild/python.vcxproj
@@ -72,6 +72,9 @@
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\Programs\python.c" />
+ <ClCompile Include="$(opensslIncludeDir)\openssl\applink.c">
+ <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;$(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="pythoncore.vcxproj">
diff --git a/PCbuild/pythonw.vcxproj b/PCbuild/pythonw.vcxproj
index 19d64a3..d6d9b14 100644
--- a/PCbuild/pythonw.vcxproj
+++ b/PCbuild/pythonw.vcxproj
@@ -65,6 +65,9 @@
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\PC\WinMain.c" />
+ <ClCompile Include="$(opensslIncludeDir)\openssl\applink.c">
+ <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;$(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="pythoncore.vcxproj">
--
2.17.0

8 changes: 2 additions & 6 deletions recipe/bld.bat
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ if "%ARCH%"=="64" (
set BUILD_PATH=win32
)

set "OPENSSL_DIR=%LIBRARY_PREFIX%"

cd PCbuild
call build.bat --pgo -m -e -v -p %PLATFORM%
if errorlevel 1 exit 1
Expand Down Expand Up @@ -83,12 +85,6 @@ if errorlevel 1 exit 1
move /y %PREFIX%\Tools\scripts\pyvenv %PREFIX%\Tools\scripts\pyvenv.py
if errorlevel 1 exit 1

REM Copy OpenSLL DLLs
copy /Y %SRC_DIR%\PCbuild\%BUILD_PATH%\libcrypto*.dll %PREFIX%\DLLs\
if errorlevel 1 exit 1
copy /Y %SRC_DIR%\PCbuild\%BUILD_PATH%\libssl*.dll %PREFIX%\DLLs\
if errorlevel 1 exit 1

REM Populate the tcl directory
xcopy /s /y /i %SRC_DIR%\externals\tcltk-8.6.8.0\%BUILD_PATH%\lib %PREFIX%\tcl
if errorlevel 1 exit 1
Expand Down
12 changes: 4 additions & 8 deletions recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ source:
- 0014-Fix-find_library-so-that-it-looks-in-sys.prefix-lib-.patch
- 0015-Disable-new-dtags-in-unixccompiler.py.patch
- 0017-Fix-cross-compilation-on-Debian-based-distros.patch
- 0018-Disable-registry-lookup-unless-CONDA_PY_ALLOW_REG_PA.patch
- 0019-Unvendor-openssl.patch
# TODO :: Depend on our own packages for these:
- url: https://github.com/python/cpython-source-deps/archive/xz-5.2.2.zip # [win]
folder: externals/xz-5.2.2 # [win]
Expand All @@ -52,12 +54,6 @@ source:
- url: https://github.com/python/cpython-source-deps/archive/sqlite-3.21.0.0.zip # [win]
folder: externals/sqlite-3.21.0.0 # [win]
sha256: 95a4f2d76aeeb68b51239340e3de26e5714ecfb7c8ad82a67b17af82213a8c20 # [win]
# Not used as of 3.7b3 (openssl-bin is), but kept for archival and license reasons.
- url: https://github.com/python/cpython-source-deps/archive/openssl-1.1.0i.zip # [win]
folder: externals/openssl-1.1.0i # [win]
sha256: 2280b9b4cba4dfcffc96d41860c79bdfd2d35945f9dd5e5a545b467ef6f96603 # [win]
- url: https://github.com/python/cpython-bin-deps/archive/openssl-bin-1.1.0i.zip # [win]
folder: externals/openssl-bin-1.1.0i # [win]
- url: https://github.com/python/cpython-source-deps/archive/bzip2-1.0.6.zip # [win]
folder: externals/bzip2-1.0.6 # [win]
sha256: c42fd1432a2667b964a74bc423bb7485059c4a6d5dc92946d59dbf9a6bdb988d # [win]
Expand All @@ -70,7 +66,7 @@ source:


build:
number: 4
number: 5
# Windows has issues updating python if conda is using files itself.
# Copy rather than link.
no_link:
Expand Down Expand Up @@ -102,7 +98,7 @@ requirements:
- sqlite # [unix]
- xz # [unix]
- zlib # [unix]
- openssl # [unix]
- openssl
- readline # [unix]
- tk # [unix]
- ncurses # [unix]
Expand Down