From f370a122007a617e5449fa9f6e2f97db75af9532 Mon Sep 17 00:00:00 2001 From: Ringo De Smet Date: Tue, 8 Oct 2024 11:38:07 +0200 Subject: [PATCH] Switch to PyProject setup. --- .../cmd/pulumi-resource-matchbox/schema.json | 4 +- provider/resources.go | 1 + sdk/python/pyproject.toml | 22 ++++++++++ sdk/python/setup.py | 44 ------------------- 4 files changed, 26 insertions(+), 45 deletions(-) create mode 100644 sdk/python/pyproject.toml delete mode 100644 sdk/python/setup.py diff --git a/provider/cmd/pulumi-resource-matchbox/schema.json b/provider/cmd/pulumi-resource-matchbox/schema.json index da2d6e3..5a8aecc 100644 --- a/provider/cmd/pulumi-resource-matchbox/schema.json +++ b/provider/cmd/pulumi-resource-matchbox/schema.json @@ -54,7 +54,9 @@ "readme": "\u003e This provider is a derived work of the [Terraform Provider](https://github.com/poseidon/terraform-provider-matchbox)\n\u003e distributed under [MPL 2.0](https://www.mozilla.org/en-US/MPL/2.0/). If you encounter a bug or missing feature,\n\u003e first check the [`pulumi-matchbox` repo](https://github.com/pulumiverse/pulumi-matchbox/issues); however, if that doesn't turn up anything,\n\u003e please consult the source [`terraform-provider-matchbox` repo](https://github.com/poseidon/terraform-provider-matchbox/issues).", "compatibility": "tfbridge20", "respectSchemaVersion": true, - "pyproject": {} + "pyproject": { + "enabled": true + } } }, "config": { diff --git a/provider/resources.go b/provider/resources.go index a072e74..994cca0 100644 --- a/provider/resources.go +++ b/provider/resources.go @@ -138,6 +138,7 @@ func Provider() tfbridge.ProviderInfo { "pulumi": ">=3.0.0,<4.0.0", }, PackageName: "pulumiverse_matchbox", + PyProject: struct{ Enabled bool }{true}, RespectSchemaVersion: true, }, Golang: &tfbridge.GolangInfo{ diff --git a/sdk/python/pyproject.toml b/sdk/python/pyproject.toml new file mode 100644 index 0000000..f2fc440 --- /dev/null +++ b/sdk/python/pyproject.toml @@ -0,0 +1,22 @@ +[project] + name = "pulumiverse_matchbox" + description = "A Pulumi package for creating and managing the Matchbox iPXE server." + dependencies = ["parver>=0.2.1", "pulumi>=3.0.0,<4.0.0", "semver>=2.8.1"] + keywords = ["pulumi", "matchbox", "category/network"] + readme = "README.md" + requires-python = ">=3.8" + version = "0.0.0a0+dev" + [project.license] + text = "Apache-2.0" + [project.urls] + Homepage = "https://www.pulumi.com" + Repository = "https://github.com/pulumiverse/pulumi-matchbox" + +[build-system] + requires = ["setuptools>=61.0"] + build-backend = "setuptools.build_meta" + +[tool] + [tool.setuptools] + [tool.setuptools.package-data] + pulumiverse_matchbox = ["py.typed", "pulumi-plugin.json"] diff --git a/sdk/python/setup.py b/sdk/python/setup.py deleted file mode 100644 index b3d7ae8..0000000 --- a/sdk/python/setup.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** -# *** Do not edit by hand unless you're certain you know what you are doing! *** - -import errno -from setuptools import setup, find_packages -from setuptools.command.install import install -from subprocess import check_call - - -VERSION = "0.0.0a0+dev" -def readme(): - try: - with open('README.md', encoding='utf-8') as f: - return f.read() - except FileNotFoundError: - return "matchbox Pulumi Package - Development Version" - - -setup(name='pulumiverse_matchbox', - python_requires='>=3.8', - version=VERSION, - description="A Pulumi package for creating and managing the Matchbox iPXE server.", - long_description=readme(), - long_description_content_type='text/markdown', - keywords='pulumi matchbox category/network', - url='https://www.pulumi.com', - project_urls={ - 'Repository': 'https://github.com/pulumiverse/pulumi-matchbox' - }, - license='Apache-2.0', - packages=find_packages(), - package_data={ - 'pulumiverse_matchbox': [ - 'py.typed', - 'pulumi-plugin.json', - ] - }, - install_requires=[ - 'parver>=0.2.1', - 'pulumi>=3.0.0,<4.0.0', - 'semver>=2.8.1' - ], - zip_safe=False)