Skip to content
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

CPython: Use shared by default on Windows #23648

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
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
3 changes: 3 additions & 0 deletions recipes/cpython/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@
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
Expand Down Expand Up @@ -475,7 +478,7 @@
def _solution_projects(self):
if self.options.shared:
solution_path = os.path.join(self.source_folder, "PCbuild", "pcbuild.sln")
projects = set(m.group(1) for m in re.finditer('"([^"]+)\\.vcxproj"', open(solution_path).read()))

Check warning on line 481 in recipes/cpython/all/conanfile.py

View workflow job for this annotation

GitHub Actions / Lint changed conanfile.py (v2 migration)

Using open without explicitly specifying an encoding

def project_build(name):
if os.path.basename(name) in self._msvc_discarded_projects:
Expand Down Expand Up @@ -636,7 +639,7 @@
name, version = get_name_version(fn)
add = True
if name in packages:
pname, pversion = get_name_version(packages[name])

Check warning on line 642 in recipes/cpython/all/conanfile.py

View workflow job for this annotation

GitHub Actions / Lint changed conanfile.py (v2 migration)

Unused variable 'pname'
add = Version(version) > Version(pversion)
if add:
packages[name] = fn
Expand Down
Loading