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

Bump cpython's zlib requirement to [>=1.2.11 <2] range (v1 only) #20678

Closed
Closed
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
2 changes: 1 addition & 1 deletion recipes/cpython/all/conanfile.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from conans import AutoToolsBuildEnvironment, ConanFile, MSBuild, tools

Check failure on line 1 in recipes/cpython/all/conanfile.py

View workflow job for this annotation

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

Import ConanFile from new module: `from conan import ConanFile`. Old import is deprecated in Conan v2.
from conans.errors import ConanInvalidConfiguration

Check failure on line 2 in recipes/cpython/all/conanfile.py

View workflow job for this annotation

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

Import ConanInvalidConfiguration from new module: `from conan.errors import ConanInvalidConfiguration`. Old import is deprecated in Conan v2.
from io import StringIO
import os
Expand Down Expand Up @@ -92,11 +92,11 @@

@property
def _is_py3(self):
return tools.Version(self._version_number_only).major == "3"

Check failure on line 95 in recipes/cpython/all/conanfile.py

View workflow job for this annotation

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

Module 'conans.tools' has no 'Version' member. Please, check https://github.com/conan-io/conan-center-index/blob/master/docs/v2_linter.md

@property
def _is_py2(self):
return tools.Version(self._version_number_only).major == "2"

Check failure on line 99 in recipes/cpython/all/conanfile.py

View workflow job for this annotation

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

Module 'conans.tools' has no 'Version' member. Please, check https://github.com/conan-io/conan-center-index/blob/master/docs/v2_linter.md

def config_options(self):
if self.settings.os == "Windows":
Expand All @@ -123,12 +123,12 @@
if self.options.shared:
del self.options.fPIC
if not self._supports_modules:
del self.options.with_bz2

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

View workflow job for this annotation

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

Bad indentation. Found 16 spaces, expected 12
del self.options.with_sqlite3

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

View workflow job for this annotation

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

Bad indentation. Found 16 spaces, expected 12
del self.options.with_tkinter

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

View workflow job for this annotation

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

Bad indentation. Found 16 spaces, expected 12

del self.options.with_bsddb

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

View workflow job for this annotation

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

Bad indentation. Found 16 spaces, expected 12
del self.options.with_lzma

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

View workflow job for this annotation

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

Bad indentation. Found 16 spaces, expected 12
if self.settings.compiler == "Visual Studio":
# The msbuild generator only works with Visual Studio
self.generators.append("MSBuildDeps")
Expand All @@ -148,12 +148,12 @@
if self.settings.build_type == "Debug" and "d" not in self.settings.compiler.runtime:
raise ConanInvalidConfiguration("Building debug cpython requires a debug runtime (Debug cpython requires _CrtReportMode symbol, which only debug runtimes define)")
if self._is_py2:
if self.settings.compiler.version >= tools.Version("14"):

Check failure on line 151 in recipes/cpython/all/conanfile.py

View workflow job for this annotation

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

Module 'conans.tools' has no 'Version' member. Please, check https://github.com/conan-io/conan-center-index/blob/master/docs/v2_linter.md
self.output.warn("Visual Studio versions 14 and higher were never officially supported by the CPython developers")
if str(self.settings.arch) not in self._msvc_archs:
raise ConanInvalidConfiguration("Visual Studio does not support this architecture")

if not self.options.shared and tools.Version(self._version_number_only) >= "3.10":

Check failure on line 156 in recipes/cpython/all/conanfile.py

View workflow job for this annotation

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

Module 'conans.tools' has no 'Version' member. Please, check https://github.com/conan-io/conan-center-index/blob/master/docs/v2_linter.md
raise ConanInvalidConfiguration("Static msvc build disabled (>=3.10) due to \"AttributeError: module 'sys' has no attribute 'winver'\"")

if self.options.get_safe("with_curses", False) and not self.options["ncurses"].with_widec:
Expand All @@ -163,25 +163,25 @@
del self.info.options.env_vars

def source(self):
tools.get(**self.conan_data["sources"][self.version],

Check failure on line 166 in recipes/cpython/all/conanfile.py

View workflow job for this annotation

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

destination=self._source_subfolder, strip_root=True)

@property
def _with_libffi(self):
# cpython 3.7.x on MSVC uses an ancient libffi 2.00-beta (which is not available at cci, and is API/ABI incompatible with current 3.2+)
return self._supports_modules \
and (self.settings.compiler != "Visual Studio" or tools.Version(self._version_number_only) >= "3.8")

Check failure on line 173 in recipes/cpython/all/conanfile.py

View workflow job for this annotation

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

Module 'conans.tools' has no 'Version' member. Please, check https://github.com/conan-io/conan-center-index/blob/master/docs/v2_linter.md

def requirements(self):
self.requires("zlib/1.2.11")
self.requires("zlib/[>=1.2.11 <2]")
if self._supports_modules:
self.requires("openssl/1.1.1l")
self.requires("expat/2.4.1")
if self._with_libffi:
self.requires("libffi/3.2.1")
if tools.Version(self._version_number_only) < "3.8":

Check failure on line 182 in recipes/cpython/all/conanfile.py

View workflow job for this annotation

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

Module 'conans.tools' has no 'Version' member. Please, check https://github.com/conan-io/conan-center-index/blob/master/docs/v2_linter.md
self.requires("mpdecimal/2.4.2")
elif tools.Version(self._version_number_only) < "3.10":

Check failure on line 184 in recipes/cpython/all/conanfile.py

View workflow job for this annotation

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

Module 'conans.tools' has no 'Version' member. Please, check https://github.com/conan-io/conan-center-index/blob/master/docs/v2_linter.md
self.requires("mpdecimal/2.5.0")
else:
self.requires("mpdecimal/2.5.0") # FIXME: no 2.5.1 to troubleshoot apple
Expand Down Expand Up @@ -332,7 +332,7 @@
def _solution_projects(self):
if self.options.shared:
solution_path = os.path.join(self._source_subfolder, "PCbuild", "pcbuild.sln")
projects = set(m.group(1) for m in re.finditer("\"([^\"]+)\\.vcxproj\"", open(solution_path).read()))

Check warning on line 335 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 @@ -514,7 +514,7 @@
name, version = get_name_version(fn)
add = True
if name in packages:
pname, pversion = get_name_version(packages[name])

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

View workflow job for this annotation

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

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