From f4628a5f9e4b37c987808840c66a72146b9b8188 Mon Sep 17 00:00:00 2001 From: Florian Schwab Date: Wed, 21 Feb 2024 10:15:53 +0100 Subject: [PATCH] fix ci release --- .github/workflows/release.yml | 4 ++-- sdk/python/pulumi_k0s/_utilities.py | 4 ++-- sdk/python/setup.py | 5 +++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 231d75a..7fb30bc 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -146,7 +146,7 @@ jobs: fail-fast: true matrix: dotnetversion: - - 3.1.301 + - "7.0.116" goversion: - 1.21.x language: @@ -155,6 +155,6 @@ jobs: - dotnet - go nodeversion: - - 18.x + - 20.x pythonversion: - "3.11" diff --git a/sdk/python/pulumi_k0s/_utilities.py b/sdk/python/pulumi_k0s/_utilities.py index 1df2d14..23af5f2 100644 --- a/sdk/python/pulumi_k0s/_utilities.py +++ b/sdk/python/pulumi_k0s/_utilities.py @@ -4,11 +4,11 @@ import asyncio +import importlib.metadata import importlib.util import inspect import json import os -import pkg_resources import sys import typing @@ -72,7 +72,7 @@ def _get_semver_version(): # to receive a valid semver string when receiving requests from the language host, so it's our # responsibility as the library to convert our own PEP440 version into a valid semver string. - pep440_version_string = pkg_resources.require(root_package)[0].version + pep440_version_string = importlib.metadata.version(root_package) pep440_version = PEP440Version.parse(pep440_version_string) (major, minor, patch) = pep440_version.release prerelease = None diff --git a/sdk/python/setup.py b/sdk/python/setup.py index 3645c40..318111a 100644 --- a/sdk/python/setup.py +++ b/sdk/python/setup.py @@ -3,12 +3,13 @@ # *** Do not edit by hand unless you're certain you know what you are doing! *** import errno +import os from setuptools import setup, find_packages from setuptools.command.install import install from subprocess import check_call -VERSION = "0.0.0" +VERSION = os.getenv("PULUMI_PYTHON_VERSION", "0.0.0") def readme(): try: with open('README.md', encoding='utf-8') as f: @@ -18,7 +19,7 @@ def readme(): setup(name='pulumi_k0s', - python_requires='>=3.7', + python_requires='>=3.8', version=VERSION, description="A Pulumi package for creating and managing k0s clusters.", long_description=readme(),