Merge pull request #18 from negz/pipsqueak
Use crossplane-function-sdk-python from PyPI, not git
This commit is contained in:
commit
137e88e402
|
@ -10,7 +10,7 @@ To learn how to use this template:
|
|||
If you just want to jump in and get started:
|
||||
|
||||
1. Replace `function-template-python` with your function's name in
|
||||
`pyproject.toml` and `package/crossplane.yaml`.
|
||||
`package/crossplane.yaml`.
|
||||
1. Add your logic to `RunFunction` in `function/fn.py`
|
||||
1. Add tests for your logic in `test/test_fn.py`
|
||||
1. Update this file, `README.md`, to be about your function!
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
# Copyright 2023 The Crossplane Authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
"""The version of the function."""
|
||||
|
||||
# This is set at build time, using "hatch version"
|
||||
__version__ = "0.0.0"
|
|
@ -1,9 +1,9 @@
|
|||
[build-system]
|
||||
requires = ["hatchling", "hatch-vcs"]
|
||||
requires = ["hatchling"]
|
||||
build-backend = "hatchling.build"
|
||||
|
||||
[project]
|
||||
name = "function-template-python"
|
||||
name = "function"
|
||||
description = 'A composition function'
|
||||
readme = "README.md"
|
||||
requires-python = ">=3.11"
|
||||
|
@ -17,17 +17,9 @@ classifiers = [
|
|||
]
|
||||
|
||||
dependencies = [
|
||||
# TODO(negz): Push to PyPI instead. We're currently waiting on our request
|
||||
# for a new PyPI org for Crossplane to be approved. Once we're using a PyPI
|
||||
# package (e.g. a wheel), confirm that run_function_pb2.pyi is installed. This
|
||||
# interface file makes working with RunFunctionRequest and RunFunctionResponse
|
||||
# a lot easier, since it contains all the type metadata.
|
||||
"function-sdk-python @ git+https://github.com/crossplane/function-sdk-python",
|
||||
|
||||
# Pin at least the things we import directly.
|
||||
"crossplane-function-sdk-python==0.1.0",
|
||||
"click==8.1.7",
|
||||
"grpcio==1.60.0",
|
||||
"protobuf==4.25.1",
|
||||
]
|
||||
|
||||
dynamic = ["version"]
|
||||
|
@ -44,10 +36,8 @@ function = "function.main:cli"
|
|||
packages = ["function"]
|
||||
|
||||
[tool.hatch.version]
|
||||
source = "vcs"
|
||||
|
||||
[tool.hatch.metadata]
|
||||
allow-direct-references = true
|
||||
path = "function/__version__.py"
|
||||
validate-bump = false # Allow going from 0.0.0.dev0+x to 0.0.0.dev0+y.
|
||||
|
||||
[tool.hatch.envs.default]
|
||||
type = "virtual"
|
||||
|
|
Loading…
Reference in New Issue