Commit Graph

3 Commits

Author SHA1 Message Date
Justin Van Patten 87b611b1f4
[sdkgen/python] Use `importlib.metadata` instead of `pkg_resources` ()
This addresses two issues:

1. `pkg_resource` is deprecated in favor of `importlib.resources` and
`importlib.metadata`
(https://setuptools.pypa.io/en/latest/pkg_resources.html)

2. Generated provider SDKs don't indicate that they have a dependency on
`setuptools` (which includes `pkg_resources`), which can cause problems
when installing the package in environments that don't have `setuptools`
installed. That's not often common in Pulumi projects, as the virtual
environment created by the CLI will include `setuptools`, however, if
creating the virtual environment manually with `python -m venv`,
`setuptools` is no longer included in the created virtual environment as
of Python 3.12.

Fixes 

Based on , thanks @edgarrmondragon!

---------

Co-authored-by: Edgar Ramírez Mondragón <edgarrm358@gmail.com>
Co-authored-by: Fraser Waters <fraser@pulumi.com>
2024-01-27 02:13:37 +00:00
Robbie McKinstry 625a4f55d4
Set a minimum version of Python supported.
This commit sets the minimum version of Python supported by
the package for pyprojec.toml builds.
2023-05-28 14:08:56 -04:00
Robbie McKinstry c4cce025d0
Add a codegen test to check the pyproject.toml file.
This commit introduces a new codegen test that checks the contents
of the pyproject.toml file. This allows us to demonstrate the file
is generated and matches against an expected manifest.
2023-05-28 14:08:54 -04:00