def get_kubernetes_compatibility(replicated_channel=None, app_slug=None, app_channel=None): replicated_channel = replicated_channel if replicated_channel else 'stable' current_replicated_version = helpers.get_arg('current_replicated_version', '') parsed = semver.parse(current_replicated_version, loose=False) if parsed is None: abort(400) current_kubernetes_version = helpers.get_pinned_kubernetes_version( current_replicated_version) scheduler = None # scheduler-less releases prior to 2.38.0 if semver.gte(current_replicated_version, '2.38.0', loose=False): scheduler = constant.SCHEDULER_KUBERNETES next_replicated_version = helpers.get_replicated_version( replicated_channel, app_slug, app_channel, scheduler=scheduler) next_replicated_version = helpers.get_arg('next_replicated_version', next_replicated_version) next_kubernetes_version = helpers.get_pinned_kubernetes_version( next_replicated_version) body = { 'compatible': current_kubernetes_version == next_kubernetes_version } return jsonify(body)
def test_gte(v0, v1, loose): from semver import gte assert (gte(v0, v1, loose)) is True
import os import conans import semver from conans import tools, CMake, ConanFile, AutoToolsBuildEnvironment from conans.tools import download, unzip, replace_in_file, check_sha256 # fail if using an old version of conan required_conan_version = '0.28.0' assert semver.gte(conans.__version__, required_conan_version, loose=True), 'Not compatible with Conan version {!s}. You must use Conan version {!s} or greater.'.format(conans.__version__, required_conan_version) class CurlConan(ConanFile): name = 'curl' version = '7.56.1' url = 'https://github.com/jjones646/conan-curl' license = 'https://curl.haxx.se/docs/copyright.html' settings = 'os', 'arch', 'compiler', 'build_type' options = { 'shared': [True, False], # SHARED IN LINUX IS HAVING PROBLEMS WITH LIBEFENCE 'with_openssl': [True, False], 'with_ldap': [True, False], 'custom_cacert': [True, False], 'darwin_ssl': [True, False], 'with_libssh2': [True, False], 'with_libidn': [True, False], 'with_librtmp': [True, False], 'with_libmetalink': [True, False] } default_options = 'shared=False', 'with_openssl=True', 'with_ldap=False', \ 'custom_cacert=False', 'darwin_ssl=True', 'with_libssh2=False', \
import semver from fnmatch import fnmatch from doit.tools import result_dep from doit import create_after, get_var from conans import __version__ as client_version from conans.client.conan_api import (Conan, default_manifest_folder) from conans.errors import ConanException from conans.model.ref import ConanFileReference from conans.client.tools import Git as ConanGit from conans.client.runner import ConanRunner import workspace.ubitrackWorkspace if not semver.gte(client_version, '1.20.0', True): raise RuntimeError("Please upgrade your conan to version >=1.20.0") BUILD_CONFIG_NAME = os.path.join(os.curdir, "build_config.yml") SKIP_PACKAGES = [ "cmake_installer", ] # this should be configurable in build_spec if platform.system().startswith("Darwin"): SKIP_PACKAGES.append("cuda_dev_config") SKIP_PACKAGES.append("nvpipe") # # These are commandline variables that are specified as follows: # doit varname=value varname=value ...