From 8b4ba7fa0fca592ef8aefd766255f18068b050e8 Mon Sep 17 00:00:00 2001 From: Alex Trotta Date: Thu, 18 Apr 2024 21:52:28 -0400 Subject: [PATCH 1/2] CPython: Use shared by default --- recipes/cpython/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/cpython/all/conanfile.py b/recipes/cpython/all/conanfile.py index 0a6a08312b3d5..b768453d09fc9 100644 --- a/recipes/cpython/all/conanfile.py +++ b/recipes/cpython/all/conanfile.py @@ -44,7 +44,7 @@ class CPythonConan(ConanFile): "env_vars": [True, False], # set environment variables } default_options = { - "shared": False, + "shared": True, "fPIC": True, "optimizations": False, "lto": False, From 2121706eb36044518ddc7ceeaf95d9cf4eb4f361 Mon Sep 17 00:00:00 2001 From: Ahajha Date: Sat, 20 Apr 2024 21:49:42 -0400 Subject: [PATCH 2/2] Only set static by default on Windows --- recipes/cpython/all/conanfile.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/recipes/cpython/all/conanfile.py b/recipes/cpython/all/conanfile.py index b768453d09fc9..dae41bf0c1078 100644 --- a/recipes/cpython/all/conanfile.py +++ b/recipes/cpython/all/conanfile.py @@ -44,7 +44,7 @@ class CPythonConan(ConanFile): "env_vars": [True, False], # set environment variables } default_options = { - "shared": True, + "shared": False, "fPIC": True, "optimizations": False, "lto": False, @@ -79,6 +79,9 @@ def export_sources(self): def config_options(self): if self.settings.os == "Windows": del self.options.fPIC + # Static mode does not work in 3.10+, and there are no + # extension modules in static mode in the versions that do work. + self.options.shared = True if is_msvc(self): del self.options.lto del self.options.docstrings