diff --git a/.github/workflows/build-push-to-main.yaml b/.github/workflows/build-push-to-main.yaml deleted file mode 100644 index 1f3dbf628..000000000 --- a/.github/workflows/build-push-to-main.yaml +++ /dev/null @@ -1,122 +0,0 @@ -name: dapr-python-dev - -on: - push: - branches: - - main - workflow_dispatch: - -jobs: - lint: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v6 - - name: Set up Python 3.10 - uses: actions/setup-python@v6 - with: - python-version: '3.10' - - name: Install uv - uses: astral-sh/setup-uv@v7 - - name: Install dependencies - run: uv sync --frozen --all-packages --group dev - - name: Run Autoformatter - run: | - uv run ruff check --fix && uv run ruff format - statusResult=$(git status -u --porcelain) - if [ -z "$statusResult" ] - then - exit 0 - else - echo "Source files are not formatted correctly. Run 'uv run ruff check --fix && uv run ruff format'." - exit 1 - fi - - build: - needs: lint - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - python_ver: ["3.10", "3.11", "3.12", "3.13", "3.14"] - steps: - - uses: actions/checkout@v6 - - name: Set up Python ${{ matrix.python_ver }} - uses: actions/setup-python@v6 - with: - python-version: ${{ matrix.python_ver }} - - name: Install uv - uses: astral-sh/setup-uv@v7 - - name: Install dependencies - run: uv sync --frozen --all-packages --group dev - - name: Check Typing - run: uv run mypy - - name: Run unit-tests - run: | - uv run coverage run -m pytest tests ext -m "not e2e" --ignore=tests/integration --ignore=tests/examples --import-mode=importlib - uv run coverage xml - - name: Upload test coverage - uses: codecov/codecov-action@v6 - publish: - needs: build - if: github.event_name != 'pull_request' - runs-on: ubuntu-latest - env: - TWINE_USERNAME: "__token__" - steps: - - uses: actions/checkout@v6 - - name: Set up Python 3.10 - uses: actions/setup-python@v6 - with: - python-version: '3.10' - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install build twine - - name: Build and publish Dapr Python SDK - env: - TWINE_PASSWORD: ${{ secrets.PYPI_UPLOAD_PASS }} - run: | - python -m build - twine upload dist/* - - name: Build and publish dapr-ext-workflow - env: - TWINE_PASSWORD: ${{ secrets.PYPI_UPLOAD_PASS }} - run: | - cd ext/dapr-ext-workflow - python -m build - twine upload dist/* - - name: Build and publish Dapr Flask Extension - env: - TWINE_PASSWORD: ${{ secrets.PYPI_UPLOAD_PASS }} - run: | - cd ext/flask_dapr - python -m build - twine upload dist/* - - name: Build and publish dapr-ext-grpc - env: - TWINE_PASSWORD: ${{ secrets.PYPI_UPLOAD_PASS }} - run: | - cd ext/dapr-ext-grpc - python -m build - twine upload dist/* - - name: Build and publish dapr-ext-fastapi - env: - TWINE_PASSWORD: ${{ secrets.PYPI_UPLOAD_PASS }} - run: | - cd ext/dapr-ext-fastapi - python -m build - twine upload dist/* - - name: Build and publish dapr-ext-langgraph - env: - TWINE_PASSWORD: ${{ secrets.PYPI_UPLOAD_PASS }} - run: | - cd ext/dapr-ext-langgraph - python -m build - twine upload dist/* - - name: Build and publish dapr-ext-strands - env: - TWINE_PASSWORD: ${{ secrets.PYPI_UPLOAD_PASS }} - run: | - cd ext/dapr-ext-strands - python -m build - twine upload dist/* diff --git a/.github/workflows/build-tag.yaml b/.github/workflows/build-tag.yaml index a9132d12e..a3a3ef868 100644 --- a/.github/workflows/build-tag.yaml +++ b/.github/workflows/build-tag.yaml @@ -19,6 +19,27 @@ jobs: uses: astral-sh/setup-uv@v7 - name: Install dependencies run: uv sync --frozen --all-packages --group dev + - name: Verify version.py matches tag + if: startsWith(github.ref, 'refs/tags/v') + run: | + uv run python -c " + import os + from dapr.version import __version__ + tag_version = os.environ['GITHUB_REF'].removeprefix('refs/tags/v') + assert tag_version == __version__, ( + f'Tag {os.environ[\"GITHUB_REF\"]!r} expects __version__={tag_version!r}, ' + f'got {__version__!r}. Bump version files before tagging, see RELEASE.md' + ) + " + - name: Verify release version is not a .dev + if: startsWith(github.ref, 'refs/tags/v') + run: | + uv run python -c " + from dapr.version import __version__ + assert '.dev' not in __version__, ( + f'__version__ {__version__!r} contains ".dev". Release tags must point to a stable or rc version' + ) + " - name: Run Autoformatter run: | uv run ruff check --fix && uv run ruff format @@ -76,47 +97,47 @@ jobs: env: TWINE_PASSWORD: ${{ secrets.PYPI_UPLOAD_PASS }} run: | - python -m build + python -m build --wheel twine upload dist/* - name: Build and publish dapr-ext-workflow env: TWINE_PASSWORD: ${{ secrets.PYPI_UPLOAD_PASS }} run: | cd ext/dapr-ext-workflow - python -m build + python -m build --wheel twine upload dist/* - name: Build and publish Dapr Flask Extension env: TWINE_PASSWORD: ${{ secrets.PYPI_UPLOAD_PASS }} run: | cd ext/flask_dapr - python -m build + python -m build --wheel twine upload dist/* - name: Build and publish dapr-ext-grpc env: TWINE_PASSWORD: ${{ secrets.PYPI_UPLOAD_PASS }} run: | cd ext/dapr-ext-grpc - python -m build + python -m build --wheel twine upload dist/* - name: Build and publish dapr-ext-fastapi env: TWINE_PASSWORD: ${{ secrets.PYPI_UPLOAD_PASS }} run: | cd ext/dapr-ext-fastapi - python -m build + python -m build --wheel twine upload dist/* - name: Build and publish dapr-ext-langgraph env: TWINE_PASSWORD: ${{ secrets.PYPI_UPLOAD_PASS }} run: | cd ext/dapr-ext-langgraph - python -m build + python -m build --wheel twine upload dist/* - name: Build and publish dapr-ext-strands env: TWINE_PASSWORD: ${{ secrets.PYPI_UPLOAD_PASS }} run: | cd ext/dapr-ext-strands - python -m build + python -m build --wheel twine upload dist/* diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 6e10a39ad..808c94da2 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -3,6 +3,7 @@ name: dapr-python on: push: branches: + - main - feature/* pull_request: branches: @@ -36,6 +37,15 @@ jobs: echo "Source files are not formatted correctly. Run 'uv run ruff check --fix && uv run ruff format'." exit 1 fi + - name: Verify main is on a .dev version + if: github.ref == 'refs/heads/main' || github.base_ref == 'main' + run: | + uv run python -c " + from dapr.version import __version__ + assert __version__.endswith('.dev'), ( + f'main __version__ must end in .dev (got {__version__!r}); see RELEASE.md' + ) + " build: needs: lint diff --git a/README.md b/README.md index c2ae5d7f2..44bfa49e0 100644 --- a/README.md +++ b/README.md @@ -49,20 +49,24 @@ pip3 install dapr-ext-grpc pip3 install dapr-ext-fastapi ``` -* Development package +* In-development version + +Only tagged releases are published to PyPI. To install the in-development +version (the current state of `main`), point pip at the GitHub repository: ```sh -# Install Dapr client sdk -pip3 install dapr +# Install the latest dev build of the Dapr client sdk +pip3 install "dapr @ git+https://github.com/dapr/python-sdk.git@main" -# Install Dapr gRPC AppCallback service extension -pip3 install dapr-ext-grpc-dev +# Install the latest dev build of the gRPC AppCallback service extension +pip3 install "dapr-ext-grpc @ git+https://github.com/dapr/python-sdk.git@main#subdirectory=ext/dapr-ext-grpc" -# Install Dapr Fast Api extension for Actor -pip3 install dapr-ext-fastapi-dev +# Install the latest dev build of the FastAPI extension for Actor +pip3 install "dapr-ext-fastapi @ git+https://github.com/dapr/python-sdk.git@main#subdirectory=ext/dapr-ext-fastapi" ``` -> Note: Do not install both packages. +Replace `@main` with a commit SHA or release branch (e.g. `@release-1.17`) +to pin to a specific point in history. ### Try out examples diff --git a/RELEASE.md b/RELEASE.md index 49eac2335..d5922f7a6 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -34,44 +34,31 @@ release-X.Y ●──●────●───●───●───● │ first commit on release-X.Y: - versions (prev).dev → X.Y.0rc0 - - dapr deps >=(prev).dev → >=X.Y.0rc0 simultaneously on main: - versions (prev).dev → X.Y.0.dev - - dapr deps >=(prev).dev → >=X.Y.0.dev ``` -## Version files +Only tag pushes (`v*`) publish to PyPI. Pushes to `main` and release branches +do not publish anything. -Every package in this repository has one version file and, for extensions, one `setup.cfg` -dependency line that must be kept in sync during a release. +Users who need the development builds can install from git +(see the [README](./README.md#install-dapr-python-sdk)). -**Version files** (set `__version__`): -- `dapr/version/version.py` -- `ext/dapr-ext-workflow/dapr/ext/workflow/version.py` -- `ext/dapr-ext-grpc/dapr/ext/grpc/version.py` -- `ext/dapr-ext-fastapi/dapr/ext/fastapi/version.py` -- `ext/dapr-ext-langgraph/dapr/ext/langgraph/version.py` -- `ext/dapr-ext-strands/dapr/ext/strands/version.py` -- `ext/flask_dapr/flask_dapr/version.py` +## Version file -**Dependency lower bounds** in extension `setup.cfg` files (each has `dapr >= `): -- `ext/dapr-ext-workflow/setup.cfg` -- `ext/dapr-ext-grpc/setup.cfg` -- `ext/dapr-ext-fastapi/setup.cfg` -- `ext/dapr-ext-langgraph/setup.cfg` -- `ext/dapr-ext-strands/setup.cfg` -- `ext/flask_dapr/setup.cfg` +A single `VERSION` file at the repo root is the source of truth for all +the packages. Each package's `pyproject.toml` reads from it. ## Version string conventions -| Stage | `__version__` example | dep lower bound example | -|---|---|---| -| Development (always on `main`) | `1.17.0.dev` | `dapr >= 1.17.0.dev` | -| First RC (on `release-X.Y`) | `1.17.0rc0` | `dapr >= 1.17.0rc0` | -| Subsequent RCs (on `release-X.Y`) | `1.17.0rc1`, `1.17.0rc2`, … | `dapr >= 1.17.0rc1` | -| Stable release | `1.17.0` | `dapr >= 1.17.0` | -| Patch release candidate | `1.17.1rc1` | `dapr >= 1.17.1rc1` | -| Stable patch release | `1.17.1` | `dapr >= 1.17.1` | +| Stage | `VERSION` example | +| ---------------------------------- | ----------------------------- | +| Development (always on `main`) | `1.18.0.dev` | +| First RC (on `release-X.Y`) | `1.18.0rc0` | +| Subsequent RCs (on `release-X.Y`) | `1.18.0rc1`, `1.18.0rc2`, … | +| Stable release | `1.18.0` | +| Patch release candidate | `1.18.1rc1` | +| Stable patch release | `1.18.1` | ## Remote convention @@ -92,19 +79,15 @@ git checkout -b release-X.Y git push upstream release-X.Y ``` -### 2. Bump versions on the release branch (first commit) +### 2. Bump VERSION on the release branch (first commit) -On the newly created `release-X.Y` branch, open a PR **targeting `release-X.Y`** that does: +On the newly created `release-X.Y` branch, open a PR **targeting `release-X.Y`** that +changes the `VERSION` file from `X.Y.0.dev` → `X.Y.0rc0`. -- In all seven version files: change `X.Y.0.dev` → `X.Y.0rc0` -- In all six extension `setup.cfg` files: change `dapr >= X.Y.0.dev` → `dapr >= X.Y.0rc0` +### 3. Bump VERSION on `main` (second commit) -### 3. Bump versions on `main` (second commit) - -Open a PR targeting `main` to align it with the new release version: - -- In all seven version files: change the previous dev version to `X.Y.0.dev` -- In all six extension `setup.cfg` files: change the previous `dapr >= ...dev` to `dapr >= X.Y.0.dev` +Open a PR targeting `main` that changes `VERSION` from the previous dev version to +`X.Y.0.dev`. ### 4. Push the tag @@ -125,12 +108,9 @@ all packages to PyPI. Perform this when you want to publish `X.Y.0rcN` (N ≥ 1) from an existing `release-X.Y` branch. -### 1. Bump versions on the release branch +### 1. Bump VERSION on the release branch -Open a PR **targeting `release-X.Y`** that does: - -- In all seven version files: change `X.Y.0rc(N-1)` → `X.Y.0rcN` -- In all six extension `setup.cfg` files: change `dapr >= X.Y.0rc(N-1)` → `dapr >= X.Y.0rcN` +Open a PR **targeting `release-X.Y`** that changes `VERSION` from `X.Y.0rc(N-1)` → `X.Y.0rcN`. ### 2. Push the tag @@ -148,12 +128,10 @@ git tag vX.Y.0rcN && git push upstream vX.Y.0rcN Perform this when `release-X.Y` is ready to ship a stable version — whether that is the initial `X.Y.0` or a patch release (`X.Y.1`, `X.Y.2`, …). -### 1. Bump versions on the release branch - -Open a PR **targeting `release-X.Y`** that does: +### 1. Bump VERSION on the release branch -- In all seven version files: change `X.Y.ZrcN` → `X.Y.Z` (drop the `rcN` suffix) -- In all six extension `setup.cfg` files: change `dapr >= X.Y.ZrcN` → `dapr >= X.Y.Z` +Open a PR **targeting `release-X.Y`** that drops the `rcN` suffix in `VERSION`: +`X.Y.ZrcN` → `X.Y.Z`. ### 2. Push the tag diff --git a/VERSION b/VERSION new file mode 100644 index 000000000..4773ce833 --- /dev/null +++ b/VERSION @@ -0,0 +1 @@ +1.18.0.dev \ No newline at end of file diff --git a/dapr/clients/exceptions.py b/dapr/clients/exceptions.py index f6358cb85..02d0d020b 100644 --- a/dapr/clients/exceptions.py +++ b/dapr/clients/exceptions.py @@ -164,7 +164,7 @@ def __init__(self, err: RpcError): self._err_message = err.details() self._details = StatusDetails() - self._grpc_status = rpc_status.from_call(err) + self._grpc_status = rpc_status.from_call(err) # type: ignore[arg-type] self._parse_details() def _parse_details(self): diff --git a/dapr/clients/grpc/subscription.py b/dapr/clients/grpc/subscription.py index dfdc0b2f8..cd5798321 100644 --- a/dapr/clients/grpc/subscription.py +++ b/dapr/clients/grpc/subscription.py @@ -63,7 +63,7 @@ def outgoing_request_iterator(): self._stream = self._stub.SubscribeTopicEventsAlpha1(outgoing_request_iterator()) self._set_stream_active() try: - next(self._stream) # discard the initial message + next(self._stream) # type: ignore[arg-type] # discard the initial message except Exception as e: raise Exception(f'Error while initializing stream: {e}') @@ -84,7 +84,7 @@ def next_message(self): try: # Read the next message from the stream directly - message = next(self._stream) + message = next(self._stream) # type: ignore[call-overload] return SubscriptionMessage(message.event_message) except RpcError as e: # If Dapr can't be reached, wait until it's ready and reconnect the stream. diff --git a/dapr/version/__init__.py b/dapr/version/__init__.py index 3eb160812..af4518bb5 100644 --- a/dapr/version/__init__.py +++ b/dapr/version/__init__.py @@ -1,3 +1,4 @@ -from dapr.version.version import __version__ +from importlib.metadata import version +__version__ = version('dapr') __all__ = ['__version__'] diff --git a/dapr/version/version.py b/dapr/version/version.py deleted file mode 100644 index cd6ba3565..000000000 --- a/dapr/version/version.py +++ /dev/null @@ -1,16 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -Copyright 2023 The Dapr 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. -""" - -__version__ = '1.17.0.dev' diff --git a/ext/dapr-ext-fastapi/dapr/ext/fastapi/version.py b/ext/dapr-ext-fastapi/dapr/ext/fastapi/version.py deleted file mode 100644 index cd6ba3565..000000000 --- a/ext/dapr-ext-fastapi/dapr/ext/fastapi/version.py +++ /dev/null @@ -1,16 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -Copyright 2023 The Dapr 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. -""" - -__version__ = '1.17.0.dev' diff --git a/ext/dapr-ext-fastapi/pyproject.toml b/ext/dapr-ext-fastapi/pyproject.toml index fb78bad5b..2d272c329 100644 --- a/ext/dapr-ext-fastapi/pyproject.toml +++ b/ext/dapr-ext-fastapi/pyproject.toml @@ -29,19 +29,16 @@ Documentation = "https://github.com/dapr/docs" Source = "https://github.com/dapr/python-sdk" [build-system] -requires = ["setuptools>=61.0", "wheel", "packaging", "tomli; python_version < '3.11'"] -build-backend = "setuptools.build_meta" +requires = ["hatchling"] +build-backend = "hatchling.build" -[tool.setuptools.packages.find] -namespaces = true -include = ["dapr.*"] -exclude = ["tests*"] +[tool.hatch.version] +source = "regex" +path = "../../VERSION" +pattern = '(?P\S+)' -[tool.setuptools.package-data] -"dapr.ext.fastapi" = ["py.typed"] - -[tool.setuptools.dynamic] -version = {attr = "dapr.ext.fastapi.version.__version__"} +[tool.hatch.build.targets.wheel] +only-include = ["dapr/ext/fastapi"] [tool.uv.sources] dapr = { workspace = true } diff --git a/ext/dapr-ext-fastapi/setup.py b/ext/dapr-ext-fastapi/setup.py deleted file mode 100644 index 0668df856..000000000 --- a/ext/dapr-ext-fastapi/setup.py +++ /dev/null @@ -1,83 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -Copyright 2023 The Dapr 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. -""" - -import os -import sys - -if sys.version_info >= (3, 11): - import tomllib -else: - import tomli as tomllib - -from packaging.requirements import Requirement -from setuptools import setup - -# Load version in dapr package. -version_info = {} -with open('dapr/ext/fastapi/version.py') as fp: - exec(fp.read(), version_info) -__version__ = version_info['__version__'] - - -def is_release(): - return '.dev' not in __version__ - - -name = 'dapr-ext-fastapi' -version = __version__ -description = 'The official release of Dapr FastAPI extension.' -long_description = """ -This is the FastAPI extension for Dapr. - -Dapr is a portable, serverless, event-driven runtime that makes it easy for developers to -build resilient, stateless and stateful microservices that run on the cloud and edge and -embraces the diversity of languages and developer frameworks. - -Dapr codifies the best practices for building microservice applications into open, -independent, building blocks that enable you to build portable applications with the language -and framework of your choice. Each building block is independent and you can use one, some, -or all of them in your application. -""".lstrip() - -# Get build number from GITHUB_RUN_NUMBER environment variable -build_number = os.environ.get('GITHUB_RUN_NUMBER', '0') - -# Read dependencies from pyproject.toml (single source of truth) -with open('pyproject.toml', 'rb') as f: - stable_requires = list(tomllib.load(f)['project']['dependencies']) - -setup_kwargs = dict( - name=name, - version=version, - description=description, - long_description=long_description, - install_requires=stable_requires, -) - -if not is_release(): - dev_version = f'{__version__}{build_number}' - setup_kwargs['name'] += '-dev' - setup_kwargs['version'] = dev_version - setup_kwargs['description'] = 'The developmental release for Dapr FastAPI extension.' - setup_kwargs['long_description'] = ( - 'This is the developmental release for Dapr FastAPI extension.' - ) - setup_kwargs['install_requires'] = [ - f'dapr-dev=={dev_version}' if Requirement(r).name == 'dapr' else r for r in stable_requires - ] - -print(f'package name: {setup_kwargs["name"]}, version: {setup_kwargs["version"]}', flush=True) - -setup(**setup_kwargs) diff --git a/ext/dapr-ext-grpc/dapr/ext/grpc/version.py b/ext/dapr-ext-grpc/dapr/ext/grpc/version.py deleted file mode 100644 index cd6ba3565..000000000 --- a/ext/dapr-ext-grpc/dapr/ext/grpc/version.py +++ /dev/null @@ -1,16 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -Copyright 2023 The Dapr 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. -""" - -__version__ = '1.17.0.dev' diff --git a/ext/dapr-ext-grpc/pyproject.toml b/ext/dapr-ext-grpc/pyproject.toml index 4eb6e5f77..393c99476 100644 --- a/ext/dapr-ext-grpc/pyproject.toml +++ b/ext/dapr-ext-grpc/pyproject.toml @@ -28,19 +28,16 @@ Documentation = "https://github.com/dapr/docs" Source = "https://github.com/dapr/python-sdk" [build-system] -requires = ["setuptools>=61.0", "wheel", "packaging", "tomli; python_version < '3.11'"] -build-backend = "setuptools.build_meta" +requires = ["hatchling"] +build-backend = "hatchling.build" -[tool.setuptools.packages.find] -namespaces = true -include = ["dapr.*"] -exclude = ["tests*"] +[tool.hatch.version] +source = "regex" +path = "../../VERSION" +pattern = '(?P\S+)' -[tool.setuptools.package-data] -"dapr.ext.grpc" = ["py.typed"] - -[tool.setuptools.dynamic] -version = {attr = "dapr.ext.grpc.version.__version__"} +[tool.hatch.build.targets.wheel] +only-include = ["dapr/ext/grpc"] [tool.uv.sources] dapr = { workspace = true } diff --git a/ext/dapr-ext-grpc/setup.py b/ext/dapr-ext-grpc/setup.py deleted file mode 100644 index 20c39510c..000000000 --- a/ext/dapr-ext-grpc/setup.py +++ /dev/null @@ -1,83 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -Copyright 2023 The Dapr 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. -""" - -import os -import sys - -if sys.version_info >= (3, 11): - import tomllib -else: - import tomli as tomllib - -from packaging.requirements import Requirement -from setuptools import setup - -# Load version in dapr package. -version_info = {} -with open('dapr/ext/grpc/version.py') as fp: - exec(fp.read(), version_info) -__version__ = version_info['__version__'] - - -def is_release(): - return '.dev' not in __version__ - - -name = 'dapr-ext-grpc' -version = __version__ -description = 'The official release of Dapr Python SDK gRPC Extension.' -long_description = """ -This is the gRPC extension for Dapr. - -Dapr is a portable, serverless, event-driven runtime that makes it easy for developers to -build resilient, stateless and stateful microservices that run on the cloud and edge and -embraces the diversity of languages and developer frameworks. - -Dapr codifies the best practices for building microservice applications into open, -independent, building blocks that enable you to build portable applications with the language -and framework of your choice. Each building block is independent and you can use one, some, -or all of them in your application. -""".lstrip() - -# Get build number from GITHUB_RUN_NUMBER environment variable -build_number = os.environ.get('GITHUB_RUN_NUMBER', '0') - -# Read dependencies from pyproject.toml (single source of truth) -with open('pyproject.toml', 'rb') as f: - stable_requires = list(tomllib.load(f)['project']['dependencies']) - -setup_kwargs = dict( - name=name, - version=version, - description=description, - long_description=long_description, - install_requires=stable_requires, -) - -if not is_release(): - dev_version = f'{__version__}{build_number}' - setup_kwargs['name'] += '-dev' - setup_kwargs['version'] = dev_version - setup_kwargs['description'] = 'The developmental release for Dapr gRPC AppCallback.' - setup_kwargs['long_description'] = ( - 'This is the developmental release for Dapr gRPC AppCallback.' - ) - setup_kwargs['install_requires'] = [ - f'dapr-dev=={dev_version}' if Requirement(r).name == 'dapr' else r for r in stable_requires - ] - -print(f'package name: {setup_kwargs["name"]}, version: {setup_kwargs["version"]}', flush=True) - -setup(**setup_kwargs) diff --git a/ext/dapr-ext-langgraph/dapr/ext/langgraph/version.py b/ext/dapr-ext-langgraph/dapr/ext/langgraph/version.py deleted file mode 100644 index b81f0d988..000000000 --- a/ext/dapr-ext-langgraph/dapr/ext/langgraph/version.py +++ /dev/null @@ -1,16 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -Copyright 2025 The Dapr 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. -""" - -__version__ = '1.17.0.dev' diff --git a/ext/dapr-ext-langgraph/pyproject.toml b/ext/dapr-ext-langgraph/pyproject.toml index 9c5b49908..acb7e0014 100644 --- a/ext/dapr-ext-langgraph/pyproject.toml +++ b/ext/dapr-ext-langgraph/pyproject.toml @@ -31,19 +31,16 @@ Documentation = "https://github.com/dapr/docs" Source = "https://github.com/dapr/python-sdk" [build-system] -requires = ["setuptools>=61.0", "wheel", "packaging", "tomli; python_version < '3.11'"] -build-backend = "setuptools.build_meta" +requires = ["hatchling"] +build-backend = "hatchling.build" -[tool.setuptools.packages.find] -namespaces = true -include = ["dapr.*"] -exclude = ["tests*"] +[tool.hatch.version] +source = "regex" +path = "../../VERSION" +pattern = '(?P\S+)' -[tool.setuptools.package-data] -"dapr.ext.langgraph" = ["py.typed"] - -[tool.setuptools.dynamic] -version = {attr = "dapr.ext.langgraph.version.__version__"} +[tool.hatch.build.targets.wheel] +only-include = ["dapr/ext/langgraph"] [tool.uv.sources] dapr = { workspace = true } diff --git a/ext/dapr-ext-langgraph/setup.py b/ext/dapr-ext-langgraph/setup.py deleted file mode 100644 index ce8a4edcb..000000000 --- a/ext/dapr-ext-langgraph/setup.py +++ /dev/null @@ -1,85 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -Copyright 2025 The Dapr 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. -""" - -import os -import sys - -if sys.version_info >= (3, 11): - import tomllib -else: - import tomli as tomllib - -from packaging.requirements import Requirement -from setuptools import setup - -# Load version in dapr package. -version_info = {} -with open('dapr/ext/langgraph/version.py') as fp: - exec(fp.read(), version_info) -__version__ = version_info['__version__'] - - -def is_release(): - return '.dev' not in __version__ - - -name = 'dapr-ext-langgraph' -version = __version__ -description = 'The official release of Dapr Python SDK LangGraph Extension.' -long_description = """ -This is the Dapr Checkpointer extension for LangGraph. - -Dapr is a portable, serverless, event-driven runtime that makes it easy for developers to -build resilient, stateless and stateful microservices that run on the cloud and edge and -embraces the diversity of languages and developer frameworks. - -Dapr codifies the best practices for building microservice applications into open, -independent, building blocks that enable you to build portable applications with the language -and framework of your choice. Each building block is independent and you can use one, some, -or all of them in your application. -""".lstrip() - -# Get build number from GITHUB_RUN_NUMBER environment variable -build_number = os.environ.get('GITHUB_RUN_NUMBER', '0') - -# Read dependencies from pyproject.toml (single source of truth) -with open('pyproject.toml', 'rb') as f: - stable_requires = list(tomllib.load(f)['project']['dependencies']) - -setup_kwargs = dict( - name=name, - version=version, - description=description, - long_description=long_description, - install_requires=stable_requires, -) - -if not is_release(): - dev_version = f'{__version__}{build_number}' - setup_kwargs['name'] += '-dev' - setup_kwargs['version'] = dev_version - setup_kwargs['description'] = ( - 'The developmental release for the Dapr Checkpointer extension for LangGraph' - ) - setup_kwargs['long_description'] = ( - 'This is the developmental release for the Dapr Checkpointer extension for LangGraph' - ) - setup_kwargs['install_requires'] = [ - f'dapr-dev=={dev_version}' if Requirement(r).name == 'dapr' else r for r in stable_requires - ] - -print(f'package name: {setup_kwargs["name"]}, version: {setup_kwargs["version"]}', flush=True) - -setup(**setup_kwargs) diff --git a/ext/dapr-ext-strands/dapr/ext/strands/version.py b/ext/dapr-ext-strands/dapr/ext/strands/version.py deleted file mode 100644 index b81f0d988..000000000 --- a/ext/dapr-ext-strands/dapr/ext/strands/version.py +++ /dev/null @@ -1,16 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -Copyright 2025 The Dapr 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. -""" - -__version__ = '1.17.0.dev' diff --git a/ext/dapr-ext-strands/pyproject.toml b/ext/dapr-ext-strands/pyproject.toml index 883348cac..1ff0de72b 100644 --- a/ext/dapr-ext-strands/pyproject.toml +++ b/ext/dapr-ext-strands/pyproject.toml @@ -31,19 +31,16 @@ Documentation = "https://github.com/dapr/docs" Source = "https://github.com/dapr/python-sdk" [build-system] -requires = ["setuptools>=61.0", "wheel", "packaging", "tomli; python_version < '3.11'"] -build-backend = "setuptools.build_meta" +requires = ["hatchling"] +build-backend = "hatchling.build" -[tool.setuptools.packages.find] -namespaces = true -include = ["dapr.*"] -exclude = ["tests*"] +[tool.hatch.version] +source = "regex" +path = "../../VERSION" +pattern = '(?P\S+)' -[tool.setuptools.package-data] -"dapr.ext.strands" = ["py.typed"] - -[tool.setuptools.dynamic] -version = {attr = "dapr.ext.strands.version.__version__"} +[tool.hatch.build.targets.wheel] +only-include = ["dapr/ext/strands"] [tool.uv.sources] dapr = { workspace = true } diff --git a/ext/dapr-ext-strands/setup.py b/ext/dapr-ext-strands/setup.py deleted file mode 100644 index c26d086e9..000000000 --- a/ext/dapr-ext-strands/setup.py +++ /dev/null @@ -1,85 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -Copyright 2025 The Dapr 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. -""" - -import os -import sys - -if sys.version_info >= (3, 11): - import tomllib -else: - import tomli as tomllib - -from packaging.requirements import Requirement -from setuptools import setup - -# Load version in dapr package. -version_info = {} -with open('dapr/ext/strands/version.py') as fp: - exec(fp.read(), version_info) -__version__ = version_info['__version__'] - - -def is_release(): - return '.dev' not in __version__ - - -name = 'dapr-ext-strands' -version = __version__ -description = 'The official release of Dapr Python SDK Strands Agents Extension.' -long_description = """ -This is the Dapr Session Manager extension for Strands Agents. - -Dapr is a portable, serverless, event-driven runtime that makes it easy for developers to -build resilient, stateless and stateful microservices that run on the cloud and edge and -embraces the diversity of languages and developer frameworks. - -Dapr codifies the best practices for building microservice applications into open, -independent, building blocks that enable you to build portable applications with the language -and framework of your choice. Each building block is independent and you can use one, some, -or all of them in your application. -""".lstrip() - -# Get build number from GITHUB_RUN_NUMBER environment variable -build_number = os.environ.get('GITHUB_RUN_NUMBER', '0') - -# Read dependencies from pyproject.toml (single source of truth) -with open('pyproject.toml', 'rb') as f: - stable_requires = list(tomllib.load(f)['project']['dependencies']) - -setup_kwargs = dict( - name=name, - version=version, - description=description, - long_description=long_description, - install_requires=stable_requires, -) - -if not is_release(): - dev_version = f'{__version__}{build_number}' - setup_kwargs['name'] += '-dev' - setup_kwargs['version'] = dev_version - setup_kwargs['description'] = ( - 'The developmental release for the Dapr Session Manager extension for Strands Agents' - ) - setup_kwargs['long_description'] = ( - 'This is the developmental release for the Dapr Session Manager extension for Strands Agents' - ) - setup_kwargs['install_requires'] = [ - f'dapr-dev=={dev_version}' if Requirement(r).name == 'dapr' else r for r in stable_requires - ] - -print(f'package name: {setup_kwargs["name"]}, version: {setup_kwargs["version"]}', flush=True) - -setup(**setup_kwargs) diff --git a/ext/dapr-ext-workflow/dapr/ext/workflow/version.py b/ext/dapr-ext-workflow/dapr/ext/workflow/version.py deleted file mode 100644 index cd6ba3565..000000000 --- a/ext/dapr-ext-workflow/dapr/ext/workflow/version.py +++ /dev/null @@ -1,16 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -Copyright 2023 The Dapr 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. -""" - -__version__ = '1.17.0.dev' diff --git a/ext/dapr-ext-workflow/pyproject.toml b/ext/dapr-ext-workflow/pyproject.toml index 6086ee7ad..93baaf554 100644 --- a/ext/dapr-ext-workflow/pyproject.toml +++ b/ext/dapr-ext-workflow/pyproject.toml @@ -27,19 +27,16 @@ Documentation = "https://github.com/dapr/docs" Source = "https://github.com/dapr/python-sdk" [build-system] -requires = ["setuptools>=61.0", "wheel", "packaging", "tomli; python_version < '3.11'"] -build-backend = "setuptools.build_meta" +requires = ["hatchling"] +build-backend = "hatchling.build" -[tool.setuptools.packages.find] -namespaces = true -include = ["dapr.*"] -exclude = ["tests*"] +[tool.hatch.version] +source = "regex" +path = "../../VERSION" +pattern = '(?P\S+)' -[tool.setuptools.package-data] -"dapr.ext.workflow" = ["py.typed"] - -[tool.setuptools.dynamic] -version = {attr = "dapr.ext.workflow.version.__version__"} +[tool.hatch.build.targets.wheel] +only-include = ["dapr/ext/workflow"] [tool.uv.sources] dapr = { workspace = true } diff --git a/ext/dapr-ext-workflow/setup.py b/ext/dapr-ext-workflow/setup.py deleted file mode 100644 index 7c542875d..000000000 --- a/ext/dapr-ext-workflow/setup.py +++ /dev/null @@ -1,83 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -Copyright 2023 The Dapr 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. -""" - -import os -import sys - -if sys.version_info >= (3, 11): - import tomllib -else: - import tomli as tomllib - -from packaging.requirements import Requirement -from setuptools import setup - -# Load version in dapr package. -version_info = {} -with open('dapr/ext/workflow/version.py') as fp: - exec(fp.read(), version_info) -__version__ = version_info['__version__'] - - -def is_release(): - return '.dev' not in __version__ - - -name = 'dapr-ext-workflow' -version = __version__ -description = 'The official release of Dapr Python SDK Workflow Authoring Extension.' -long_description = """ -This is the Workflow authoring extension for Dapr. - -Dapr is a portable, serverless, event-driven runtime that makes it easy for developers to -build resilient, stateless and stateful microservices that run on the cloud and edge and -embraces the diversity of languages and developer frameworks. - -Dapr codifies the best practices for building microservice applications into open, -independent, building blocks that enable you to build portable applications with the language -and framework of your choice. Each building block is independent and you can use one, some, -or all of them in your application. -""".lstrip() - -# Get build number from GITHUB_RUN_NUMBER environment variable -build_number = os.environ.get('GITHUB_RUN_NUMBER', '0') - -# Read dependencies from pyproject.toml (single source of truth) -with open('pyproject.toml', 'rb') as f: - stable_requires = list(tomllib.load(f)['project']['dependencies']) - -setup_kwargs = dict( - name=name, - version=version, - description=description, - long_description=long_description, - install_requires=stable_requires, -) - -if not is_release(): - dev_version = f'{__version__}{build_number}' - setup_kwargs['name'] += '-dev' - setup_kwargs['version'] = dev_version - setup_kwargs['description'] = 'The developmental release for Dapr Workflow Authoring.' - setup_kwargs['long_description'] = ( - 'This is the developmental release for Dapr Workflow Authoring.' - ) - setup_kwargs['install_requires'] = [ - f'dapr-dev=={dev_version}' if Requirement(r).name == 'dapr' else r for r in stable_requires - ] - -print(f'package name: {setup_kwargs["name"]}, version: {setup_kwargs["version"]}', flush=True) - -setup(**setup_kwargs) diff --git a/ext/flask_dapr/flask_dapr/version.py b/ext/flask_dapr/flask_dapr/version.py deleted file mode 100644 index cd6ba3565..000000000 --- a/ext/flask_dapr/flask_dapr/version.py +++ /dev/null @@ -1,16 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -Copyright 2023 The Dapr 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. -""" - -__version__ = '1.17.0.dev' diff --git a/ext/flask_dapr/pyproject.toml b/ext/flask_dapr/pyproject.toml index 988516ce5..66f86806c 100644 --- a/ext/flask_dapr/pyproject.toml +++ b/ext/flask_dapr/pyproject.toml @@ -28,17 +28,16 @@ Documentation = "https://github.com/dapr/docs" Source = "https://github.com/dapr/python-sdk" [build-system] -requires = ["setuptools>=61.0", "wheel", "packaging", "tomli; python_version < '3.11'"] -build-backend = "setuptools.build_meta" +requires = ["hatchling"] +build-backend = "hatchling.build" -[tool.setuptools.packages.find] -include = ["flask_dapr*"] +[tool.hatch.version] +source = "regex" +path = "../../VERSION" +pattern = '(?P\S+)' -[tool.setuptools.package-data] -"flask_dapr" = ["py.typed"] - -[tool.setuptools.dynamic] -version = {attr = "flask_dapr.version.__version__"} +[tool.hatch.build.targets.wheel] +only-include = ["flask_dapr"] [tool.uv.sources] dapr = { workspace = true } diff --git a/ext/flask_dapr/setup.py b/ext/flask_dapr/setup.py deleted file mode 100644 index e74874119..000000000 --- a/ext/flask_dapr/setup.py +++ /dev/null @@ -1,83 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -Copyright 2023 The Dapr 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. -""" - -import os -import sys - -if sys.version_info >= (3, 11): - import tomllib -else: - import tomli as tomllib - -from packaging.requirements import Requirement -from setuptools import setup - -# Load version in dapr package. -version_info = {} -with open('flask_dapr/version.py') as fp: - exec(fp.read(), version_info) -__version__ = version_info['__version__'] - - -def is_release(): - return '.dev' not in __version__ - - -name = 'flask-dapr' -version = __version__ -description = 'The official release of Dapr Python SDK Flask Extension.' -long_description = """ -This is the Flask extension for Dapr. - -Dapr is a portable, serverless, event-driven runtime that makes it easy for developers to -build resilient, stateless and stateful microservices that run on the cloud and edge and -embraces the diversity of languages and developer frameworks. - -Dapr codifies the best practices for building microservice applications into open, -independent, building blocks that enable you to build portable applications with the language -and framework of your choice. Each building block is independent and you can use one, some, -or all of them in your application. -""".lstrip() - -# Get build number from GITHUB_RUN_NUMBER environment variable -build_number = os.environ.get('GITHUB_RUN_NUMBER', '0') - -# Read dependencies from pyproject.toml (single source of truth) -with open('pyproject.toml', 'rb') as f: - stable_requires = list(tomllib.load(f)['project']['dependencies']) - -setup_kwargs = dict( - name=name, - version=version, - description=description, - long_description=long_description, - install_requires=stable_requires, -) - -if not is_release(): - dev_version = f'{__version__}{build_number}' - setup_kwargs['name'] += '-dev' - setup_kwargs['version'] = dev_version - setup_kwargs['description'] = 'The developmental release for Dapr Python SDK Flask.' - setup_kwargs['long_description'] = ( - 'This is the developmental release for Dapr Python SDK Flask.' - ) - setup_kwargs['install_requires'] = [ - f'dapr-dev=={dev_version}' if Requirement(r).name == 'dapr' else r for r in stable_requires - ] - -print(f'package name: {setup_kwargs["name"]}, version: {setup_kwargs["version"]}', flush=True) - -setup(**setup_kwargs) diff --git a/pyproject.toml b/pyproject.toml index 8c4e886ee..c726d1f71 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -32,19 +32,16 @@ Documentation = "https://github.com/dapr/docs" Source = "https://github.com/dapr/python-sdk" [build-system] -requires = ["setuptools>=61.0", "wheel"] -build-backend = "setuptools.build_meta" +requires = ["hatchling"] +build-backend = "hatchling.build" -[tool.setuptools.packages.find] -namespaces = true -include = ["dapr", "dapr.*"] -exclude = ["tests*", "ext*", "examples*"] +[tool.hatch.version] +source = "regex" +path = "VERSION" +pattern = '(?P\S+)' -[tool.setuptools.package-data] -"dapr" = ["py.typed"] - -[tool.setuptools.dynamic] -version = {attr = "dapr.version.version.__version__"} +[tool.hatch.build.targets.wheel] +packages = ["dapr"] [tool.uv.workspace] members = [ @@ -120,16 +117,10 @@ warn_unused_configs = true warn_redundant_casts = true show_error_codes = true check_untyped_defs = true -files = [ - "dapr/actor/**/*.py", - "dapr/aio/**/*.py", - "dapr/clients/**/*.py", - "dapr/conf/**/*.py", - "dapr/serializers/**/*.py", - "ext/dapr-ext-grpc/dapr/**/*.py", - "ext/dapr-ext-fastapi/dapr/**/*.py", - "ext/flask_dapr/flask_dapr/*.py", - "examples/demo_actor/**/*.py", +namespace_packages = true +packages = [ + "dapr", + "flask_dapr", ] [[tool.mypy.overrides]] diff --git a/setup.py b/setup.py deleted file mode 100644 index 123adc99a..000000000 --- a/setup.py +++ /dev/null @@ -1,62 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -Copyright 2021 The Dapr 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. -""" - -import os - -from setuptools import setup - -# Load version in dapr package. -version_info = {} -with open('dapr/version/version.py') as fp: - exec(fp.read(), version_info) -__version__ = version_info['__version__'] - - -def is_release(): - return '.dev' not in __version__ - - -name = 'dapr' -version = __version__ -description = 'The official release of Dapr Python SDK.' -long_description = """ -Dapr is a portable, serverless, event-driven runtime that makes it easy for developers to -build resilient, stateless and stateful microservices that run on the cloud and edge and -embraces the diversity of languages and developer frameworks. - -Dapr codifies the best practices for building microservice applications into open, -independent, building blocks that enable you to build portable applications with the language -and framework of your choice. Each building block is independent and you can use one, some, -or all of them in your application. -""".lstrip() - -# Get build number from GITHUB_RUN_NUMBER environment variable -build_number = os.environ.get('GITHUB_RUN_NUMBER', '0') - -if not is_release(): - version = f'{__version__}{build_number}' - name += '-dev' - description = 'The developmental release for Dapr Python SDK.' - long_description = 'This is the developmental release for Dapr Python SDK.' - -print(f'package name: {name}, version: {version}', flush=True) - - -setup( - name=name, - version=version, - description=description, - long_description=long_description, -)