Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Python wheel-based builds and publishing #981

Merged
merged 5 commits into from
Dec 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,13 @@ build_python:: schema
cd sdk/python/ && \
echo "module fake_python_module // Exclude this directory from Go tools\n\ngo 1.17" > 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
sed -i.bak -e 's/^ version = .*/ version = "$(PYPI_VERSION)"/g' ./bin/pyproject.toml && \
rm ./bin/pyproject.toml.bak && \
python3 -m venv venv && \
./venv/bin/python -m pip install build && \
cd ./bin && \
../venv/bin/python -m build .

build_go:: VERSION := $(shell pulumictl get version --language generic)
build_go:: schema
Expand Down
3 changes: 3 additions & 0 deletions provider/cmd/pulumi-gen-eks/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -1363,6 +1363,9 @@ func generateSchema() schema.PackageSpec {
// TODO: Embellish the readme
"readme": "Pulumi Amazon Web Services (AWS) EKS Components.",
"liftSingleValueMethodReturns": true,
"pyproject": map[string]any{
"enabled": true,
},
}),
"go": rawMessage(map[string]interface{}{
"generateResourceContainerTypes": true,
Expand Down
3 changes: 3 additions & 0 deletions provider/cmd/pulumi-resource-eks/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@
},
"python": {
"liftSingleValueMethodReturns": true,
"pyproject": {
"enabled": true
},
"readme": "Pulumi Amazon Web Services (AWS) EKS Components.",
"requires": {
"pulumi": "\u003e=3.0.0,\u003c4.0.0",
Expand Down
2 changes: 1 addition & 1 deletion scripts/publish_packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ publish() {
pushd ${ROOT}/sdk/python/bin
twine upload \
-u "pulumi" -p "${PYPI_PASSWORD}" \
"dist/*.tar.gz" \
"dist/*" \
--skip-existing \
--verbose
popd
Expand Down
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 = "pulumi_eks"
description = "Pulumi Amazon Web Services (AWS) EKS Components."
dependencies = ["parver>=0.2.1", "pulumi>=3.0.0,<4.0.0", "pulumi-aws>=6.0.0,<7.0.0", "pulumi-kubernetes>=4.0.0,<5.0.0", "semver>=2.8.1"]
keywords = ["pulumi", "aws", "eks"]
readme = "README.md"
requires-python = ">=3.7"
version = "0.0.0"
[project.license]
text = "Apache-2.0"
[project.urls]
Homepage = "https://pulumi.com"
Repository = "https://github.com/pulumi/pulumi-eks"

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

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

This file was deleted.

Loading