Skip to content

Commit

Permalink
Merge pull request #70 from pulumiverse/build-fix
Browse files Browse the repository at this point in the history
Fix the failing build.
  • Loading branch information
ringods authored Aug 13, 2024
2 parents f62a7d0 + 11d1739 commit 022dba4
Show file tree
Hide file tree
Showing 10 changed files with 45 additions and 53 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,8 @@ provider/**/schema-embed.json
**/version.txt
**/nuget
**/dist

__pycache__
venv
sdk/python/build
sdk/python/*.egg-info
13 changes: 8 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,17 @@ build_nodejs:: install_plugins tfgen # build the node sdk

build_python:: PYPI_VERSION := $(shell pulumictl get version --language python)
build_python:: install_plugins tfgen # build the python sdk
rm -rf sdk/python/
$(WORKING_DIR)/bin/$(TFGEN) python --overlays provider/overlays/python --out sdk/python/
cd sdk/python/ && \
printf "module fake_python_module // Exclude this directory from Go tools\n\ngo 1.17\n" > go.mod && \
cp ../../README.md . && \
python3 setup.py clean --all 2>/dev/null && \
rm -rf ./bin/ ../python.bin/ && cp -R . ../python.bin && mv ../python.bin ./bin && \
sed -i.bak -e 's/^VERSION = .*/VERSION = "$(PYPI_VERSION)"/g' -e 's/^PLUGIN_VERSION = .*/PLUGIN_VERSION = "$(VERSION)"/g' ./bin/setup.py && \
rm ./bin/setup.py.bak && \
cd ./bin && python3 setup.py build sdist
rm -rf ./bin/ ../python.bin/ && cp -R . ../python.bin && mv ../python.bin ./bin && \
rm ./bin/go.mod && \
python3 -m venv venv && \
./venv/bin/python -m pip install build==1.2.1 && \
cd ./bin && \
../venv/bin/python -m build .

build_dotnet:: DOTNET_VERSION := $(shell pulumictl get version --language dotnet)
build_dotnet:: install_plugins tfgen # build the dotnet sdk
Expand Down
2 changes: 1 addition & 1 deletion examples/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/pulumiverse/pulumi-acme/examples

go 1.20
go 1.21

require github.com/pulumi/pulumi/pkg/v3 v3.126.0

Expand Down
4 changes: 3 additions & 1 deletion provider/cmd/pulumi-resource-acme/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@
},
"readme": "\u003e This provider is a derived work of the [Terraform Provider](https://github.com/vancluever/terraform-provider-acme)\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-acme` repo](https://github.com/pulumiverse/pulumi-acme/issues); however, if that doesn't turn up anything,\n\u003e please consult the source [`terraform-provider-acme` repo](https://github.com/vancluever/terraform-provider-acme/issues).",
"compatibility": "tfbridge20",
"pyproject": {}
"pyproject": {
"enabled": true
}
}
},
"config": {
Expand Down
2 changes: 1 addition & 1 deletion provider/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/pulumiverse/pulumi-acme/provider

go 1.21.12
go 1.21

replace github.com/hashicorp/terraform-plugin-sdk/v2 => github.com/pulumi/terraform-plugin-sdk/v2 v2.0.0-20240520223432-0c0bf0d65f10

Expand Down
1 change: 1 addition & 0 deletions provider/resources.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ func Provider() tfbridge.ProviderInfo {
Requires: map[string]string{
"pulumi": ">=3.0.0,<4.0.0",
},
PyProject: struct{ Enabled bool }{true},
},
Golang: &tfbridge.GolangInfo{
ImportBasePath: filepath.Join(
Expand Down
2 changes: 1 addition & 1 deletion sdk/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/pulumiverse/pulumi-acme/sdk

go 1.20
go 1.21

require (
github.com/blang/semver v3.5.1+incompatible
Expand Down
3 changes: 3 additions & 0 deletions sdk/python/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module fake_python_module // Exclude this directory from Go tools

go 1.17
22 changes: 22 additions & 0 deletions sdk/python/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
[project]
name = "pulumiverse_acme"
description = "A Pulumi package for creating and managing ACME cloud resources."
dependencies = ["parver>=0.2.1", "pulumi>=3.0.0,<4.0.0", "semver>=2.8.1"]
keywords = ["pulumi", "acme", "category/cloud"]
readme = "README.md"
requires-python = ">=3.8"
version = "0.0.0"
[project.license]
text = "Apache-2.0"
[project.urls]
Homepage = "https://www.pulumi.com"
Repository = "https://github.com/pulumiverse/pulumi-acme"

[build-system]
requires = ["setuptools>=61.0"]
build-backend = "setuptools.build_meta"

[tool]
[tool.setuptools]
[tool.setuptools.package-data]
pulumiverse_acme = ["py.typed", "pulumi-plugin.json"]
44 changes: 0 additions & 44 deletions sdk/python/setup.py

This file was deleted.

0 comments on commit 022dba4

Please sign in to comment.