From 0b7e08b1121d875bf0304b6d565ae8e838d7eb8d Mon Sep 17 00:00:00 2001 From: Denis Bilenko Date: Fri, 6 Jun 2025 15:09:51 +0200 Subject: [PATCH] Switcht to pyproject.toml + uv --- .../classic/out.compare-vs-serverless.diff | 11 ++++ .../output/my_default_python/databricks.yml | 9 +++ .../output/my_default_python/pyproject.toml | 15 +++++ .../classic/output/my_default_python/setup.py | 41 ------------- .../src/my_default_python/__init__.py | 1 - .../combinations/check_output.py | 21 +++---- .../integration_classic/out.validate.dev.json | 3 +- .../integration_classic/output.txt | 58 +++++++++++-------- .../output/my_default_python/databricks.yml | 5 ++ .../output/my_default_python/pyproject.toml | 15 +++++ .../output/my_default_python/setup.py | 41 ------------- .../src/my_default_python/__init__.py | 1 - .../default-python/out.databricks.yml | 9 +++ .../{{.project_name}}/databricks.yml.tmpl | 15 ++++- .../{{.project_name}}/pyproject.toml.tmpl | 15 +++++ .../template/{{.project_name}}/setup.py.tmpl | 41 ------------- .../src/{{.project_name}}/__init__.py | 1 - 17 files changed, 140 insertions(+), 162 deletions(-) create mode 100644 acceptance/bundle/templates/default-python/classic/output/my_default_python/pyproject.toml delete mode 100644 acceptance/bundle/templates/default-python/classic/output/my_default_python/setup.py create mode 100644 acceptance/bundle/templates/default-python/serverless/output/my_default_python/pyproject.toml delete mode 100644 acceptance/bundle/templates/default-python/serverless/output/my_default_python/setup.py create mode 100644 libs/template/templates/default-python/template/{{.project_name}}/pyproject.toml.tmpl delete mode 100644 libs/template/templates/default-python/template/{{.project_name}}/setup.py.tmpl diff --git a/acceptance/bundle/templates/default-python/classic/out.compare-vs-serverless.diff b/acceptance/bundle/templates/default-python/classic/out.compare-vs-serverless.diff index d05edefc70..05736506d6 100644 --- a/acceptance/bundle/templates/default-python/classic/out.compare-vs-serverless.diff +++ b/acceptance/bundle/templates/default-python/classic/out.compare-vs-serverless.diff @@ -1,3 +1,14 @@ +--- [TESTROOT]/bundle/templates/default-python/classic/../serverless/output/my_default_python/databricks.yml ++++ output/my_default_python/databricks.yml +@@ -25,4 +25,8 @@ + host: [DATABRICKS_URL] + ++ artifacts: ++ python_artifact: ++ dynamic_version: true ++ + prod: + mode: production --- [TESTROOT]/bundle/templates/default-python/classic/../serverless/output/my_default_python/resources/my_default_python.job.yml +++ output/my_default_python/resources/my_default_python.job.yml @@ -17,4 +17,5 @@ diff --git a/acceptance/bundle/templates/default-python/classic/output/my_default_python/databricks.yml b/acceptance/bundle/templates/default-python/classic/output/my_default_python/databricks.yml index 91c01f25da..846b0db028 100644 --- a/acceptance/bundle/templates/default-python/classic/output/my_default_python/databricks.yml +++ b/acceptance/bundle/templates/default-python/classic/output/my_default_python/databricks.yml @@ -4,6 +4,11 @@ bundle: name: my_default_python uuid: [UUID] +artifacts: + python_artifact: + type: whl + build: uv build --wheel + include: - resources/*.yml - resources/*/*.yml @@ -19,6 +24,10 @@ targets: workspace: host: [DATABRICKS_URL] + artifacts: + python_artifact: + dynamic_version: true + prod: mode: production workspace: diff --git a/acceptance/bundle/templates/default-python/classic/output/my_default_python/pyproject.toml b/acceptance/bundle/templates/default-python/classic/output/my_default_python/pyproject.toml new file mode 100644 index 0000000000..8dc683a7e6 --- /dev/null +++ b/acceptance/bundle/templates/default-python/classic/output/my_default_python/pyproject.toml @@ -0,0 +1,15 @@ +[build-system] +requires = ["uv_build>=0.7.11,<0.8.0"] +build-backend = "uv_build" + +[project] +name = "my_default_python" +version = "0.0.1" +authors = [{ name = "[USERNAME]" }] + +[project.scripts] +main = "my_default_python.main:main" + +[tool.uv.build-backend] +module-name = "my_default_python" +module-root = "src" diff --git a/acceptance/bundle/templates/default-python/classic/output/my_default_python/setup.py b/acceptance/bundle/templates/default-python/classic/output/my_default_python/setup.py deleted file mode 100644 index 548f1035eb..0000000000 --- a/acceptance/bundle/templates/default-python/classic/output/my_default_python/setup.py +++ /dev/null @@ -1,41 +0,0 @@ -""" -setup.py configuration script describing how to build and package this project. - -This file is primarily used by the setuptools library and typically should not -be executed directly. See README.md for how to deploy, test, and run -the my_default_python project. -""" - -from setuptools import setup, find_packages - -import sys - -sys.path.append("./src") - -import datetime -import my_default_python - -local_version = datetime.datetime.utcnow().strftime("%Y%m%d.%H%M%S") - -setup( - name="my_default_python", - # We use timestamp as Local version identifier (https://peps.python.org/pep-0440/#local-version-identifiers.) - # to ensure that changes to wheel package are picked up when used on all-purpose clusters - version=my_default_python.__version__ + "+" + local_version, - url="https://databricks.com", - author="[USERNAME]", - description="wheel file based on my_default_python/src", - packages=find_packages(where="./src"), - package_dir={"": "src"}, - entry_points={ - "packages": [ - "main=my_default_python.main:main", - ], - }, - install_requires=[ - # Dependencies in case the output wheel file is used as a library dependency. - # For defining dependencies, when this package is used in Databricks, see: - # https://docs.databricks.com/dev-tools/bundles/library-dependencies.html - "setuptools" - ], -) diff --git a/acceptance/bundle/templates/default-python/classic/output/my_default_python/src/my_default_python/__init__.py b/acceptance/bundle/templates/default-python/classic/output/my_default_python/src/my_default_python/__init__.py index f102a9cadf..e69de29bb2 100644 --- a/acceptance/bundle/templates/default-python/classic/output/my_default_python/src/my_default_python/__init__.py +++ b/acceptance/bundle/templates/default-python/classic/output/my_default_python/src/my_default_python/__init__.py @@ -1 +0,0 @@ -__version__ = "0.0.1" diff --git a/acceptance/bundle/templates/default-python/combinations/check_output.py b/acceptance/bundle/templates/default-python/combinations/check_output.py index 2df337f4d7..c0ade703ec 100755 --- a/acceptance/bundle/templates/default-python/combinations/check_output.py +++ b/acceptance/bundle/templates/default-python/combinations/check_output.py @@ -1,6 +1,7 @@ #!/usr/bin/env python3 import sys import os +import re import subprocess CLOUD_ENV = os.environ.get("CLOUD_ENV") @@ -8,7 +9,7 @@ sys.exit(f"SKIP_TEST SERVERLESS=yes but TEST_METASTORE_ID is empty in this env {CLOUD_ENV=}") BUILDING = "Building python_artifact" -UPLOADING = "Uploading dist/" +UPLOADING_WHL = re.compile("Uploading .*whl") STATE = "Updating deployment state" @@ -18,7 +19,7 @@ def is_printable_line(line): return False # only shown when include_python=yes - if line.startswith(UPLOADING): + if UPLOADING_WHL.match(line): return False # not shown when all settings are equal to "no" @@ -30,19 +31,19 @@ def is_printable_line(line): p = subprocess.run(sys.argv[1:], stdout=subprocess.PIPE, stderr=subprocess.PIPE, encoding="utf-8") try: - assert p.returncode == 0 + assert p.returncode == 0, p.returncode assert p.stdout == "" + if os.environ["INCLUDE_PYTHON"] == "yes": + assert BUILDING in p.stderr, BUILDING + assert UPLOADING_WHL.search(p.stderr), UPLOADING_WHL + else: + assert BUILDING not in p.stderr, BUILDING + assert not UPLOADING_WHL.search(p.stderr), UPLOADING_WHL + for line in p.stderr.strip().split("\n"): if is_printable_line(line): print(line.strip()) - if os.environ["INCLUDE_PYTHON"] == "yes": - assert BUILDING in p.stderr - assert UPLOADING in p.stderr - else: - assert BUILDING not in p.stderr - assert UPLOADING not in p.stderr - except: print(f"STDOUT: {len(p.stdout)} chars") if p.stdout: diff --git a/acceptance/bundle/templates/default-python/integration_classic/out.validate.dev.json b/acceptance/bundle/templates/default-python/integration_classic/out.validate.dev.json index b0f1a4b716..cc9c3f73fc 100644 --- a/acceptance/bundle/templates/default-python/integration_classic/out.validate.dev.json +++ b/acceptance/bundle/templates/default-python/integration_classic/out.validate.dev.json @@ -1,7 +1,8 @@ { "artifacts": { "python_artifact": { - "build": "python3 setup.py bdist_wheel", + "build": "uv build --wheel", + "dynamic_version": true, "files": [ { "source": "[TEST_TMP_DIR]/project_name_[UNIQUE_NAME]/dist/*.whl" diff --git a/acceptance/bundle/templates/default-python/integration_classic/output.txt b/acceptance/bundle/templates/default-python/integration_classic/output.txt index ca09812eb8..d32d86b869 100644 --- a/acceptance/bundle/templates/default-python/integration_classic/output.txt +++ b/acceptance/bundle/templates/default-python/integration_classic/output.txt @@ -26,7 +26,7 @@ Validation OK! >>> [CLI] bundle deploy -t dev Building python_artifact... -Uploading dist/project_name_[UNIQUE_NAME]-0.0.1+[NUMBER].[NUMBER]-py3-none-any.whl... +Uploading .databricks/bundle/dev/patched_wheels/python_artifact_project_name_[UNIQUE_NAME]/project_name_[UNIQUE_NAME]-0.0.1+[NUMBER]-py3-none-any.whl... Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/project_name_[UNIQUE_NAME]/dev/files... Deploying resources... Updating deployment state... @@ -54,13 +54,13 @@ Resources: >>> diff.py ../out.validate.dev.json ../out.summary.dev.json --- ../out.validate.dev.json +++ ../out.summary.dev.json -@@ -50,4 +50,5 @@ +@@ -51,4 +51,5 @@ "edit_mode": "UI_LOCKED", "format": "MULTI_TASK", + "id": "[NUMID]", "job_clusters": [ { -@@ -118,5 +119,6 @@ +@@ -119,5 +120,6 @@ "unit": "DAYS" } - } @@ -68,13 +68,13 @@ Resources: + "url": "[DATABRICKS_URL]/jobs/[NUMID]" } }, -@@ -133,4 +135,5 @@ +@@ -134,4 +136,5 @@ "development": true, "edition": "ADVANCED", + "id": "[UUID]", "libraries": [ { -@@ -142,5 +145,6 @@ +@@ -143,5 +146,6 @@ "name": "[dev [USERNAME]] project_name_[UNIQUE_NAME]_pipeline", "permissions": [], - "schema": "project_name_[UNIQUE_NAME]_dev" @@ -108,7 +108,13 @@ Validation OK! >>> diff.py ../out.validate.dev.json ../out.validate.prod.json --- ../out.validate.dev.json +++ ../out.validate.prod.json -@@ -13,16 +13,11 @@ +@@ -3,5 +3,4 @@ + "python_artifact": { + "build": "uv build --wheel", +- "dynamic_version": true, + "files": [ + { +@@ -14,16 +13,11 @@ }, "bundle": { - "deployment": { @@ -128,7 +134,7 @@ Validation OK! + "target": "prod", "terraform": {}, "uuid": "[UUID]" -@@ -32,13 +27,10 @@ +@@ -33,13 +27,10 @@ "resources/project_name_[UNIQUE_NAME].pipeline.yml" ], - "presets": { @@ -148,14 +154,14 @@ Validation OK! + ], "resources": { "jobs": { -@@ -46,5 +38,5 @@ +@@ -47,5 +38,5 @@ "deployment": { "kind": "BUNDLE", - "metadata_file_path": "/Workspace/Users/[USERNAME]/.bundle/project_name_[UNIQUE_NAME]/dev/state/metadata.json" + "metadata_file_path": "/Workspace/Users/[USERNAME]/.bundle/project_name_[UNIQUE_NAME]/prod/state/metadata.json" }, "edit_mode": "UI_LOCKED", -@@ -65,12 +57,9 @@ +@@ -66,12 +57,9 @@ } ], - "max_concurrent_runs": 4, @@ -170,21 +176,21 @@ Validation OK! - "dev": "[USERNAME]" }, "tasks": [ -@@ -78,5 +67,5 @@ +@@ -79,5 +67,5 @@ "job_cluster_key": "job_cluster", "notebook_task": { - "notebook_path": "/Workspace/Users/[USERNAME]/.bundle/project_name_[UNIQUE_NAME]/dev/files/src/notebook" + "notebook_path": "/Workspace/Users/[USERNAME]/.bundle/project_name_[UNIQUE_NAME]/prod/files/src/notebook" }, "task_key": "notebook_task" -@@ -113,5 +102,5 @@ +@@ -114,5 +102,5 @@ ], "trigger": { - "pause_status": "PAUSED", + "pause_status": "UNPAUSED", "periodic": { "interval": 1, -@@ -125,22 +114,21 @@ +@@ -126,22 +114,21 @@ "channel": "CURRENT", "configuration": { - "bundle.sourcePath": "/Workspace/Users/[USERNAME]/.bundle/project_name_[UNIQUE_NAME]/dev/files/src" @@ -212,7 +218,7 @@ Validation OK! + "schema": "project_name_[UNIQUE_NAME]_prod" } } -@@ -153,10 +141,10 @@ +@@ -154,10 +141,10 @@ "targets": null, "workspace": { - "artifact_path": "/Workspace/Users/[USERNAME]/.bundle/project_name_[UNIQUE_NAME]/dev/artifacts", @@ -231,7 +237,7 @@ Validation OK! >>> [CLI] bundle deploy -t prod Building python_artifact... -Uploading dist/project_name_[UNIQUE_NAME]-0.0.1+[NUMBER].[NUMBER]-py3-none-any.whl... +Uploading dist/project_name_[UNIQUE_NAME]-0.0.1-py3-none-any.whl... Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/project_name_[UNIQUE_NAME]/prod/files... Deploying resources... Updating deployment state... @@ -259,7 +265,13 @@ Resources: >>> diff.py ../out.summary.dev.json ../out.summary.prod.json --- ../out.summary.dev.json +++ ../out.summary.prod.json -@@ -13,16 +13,11 @@ +@@ -3,5 +3,4 @@ + "python_artifact": { + "build": "uv build --wheel", +- "dynamic_version": true, + "files": [ + { +@@ -14,16 +13,11 @@ }, "bundle": { - "deployment": { @@ -279,7 +291,7 @@ Resources: + "target": "prod", "terraform": {}, "uuid": "[UUID]" -@@ -32,13 +27,10 @@ +@@ -33,13 +27,10 @@ "resources/project_name_[UNIQUE_NAME].pipeline.yml" ], - "presets": { @@ -299,14 +311,14 @@ Resources: + ], "resources": { "jobs": { -@@ -46,5 +38,5 @@ +@@ -47,5 +38,5 @@ "deployment": { "kind": "BUNDLE", - "metadata_file_path": "/Workspace/Users/[USERNAME]/.bundle/project_name_[UNIQUE_NAME]/dev/state/metadata.json" + "metadata_file_path": "/Workspace/Users/[USERNAME]/.bundle/project_name_[UNIQUE_NAME]/prod/state/metadata.json" }, "edit_mode": "UI_LOCKED", -@@ -66,12 +58,9 @@ +@@ -67,12 +58,9 @@ } ], - "max_concurrent_runs": 4, @@ -321,21 +333,21 @@ Resources: - "dev": "[USERNAME]" }, "tasks": [ -@@ -79,5 +68,5 @@ +@@ -80,5 +68,5 @@ "job_cluster_key": "job_cluster", "notebook_task": { - "notebook_path": "/Workspace/Users/[USERNAME]/.bundle/project_name_[UNIQUE_NAME]/dev/files/src/notebook" + "notebook_path": "/Workspace/Users/[USERNAME]/.bundle/project_name_[UNIQUE_NAME]/prod/files/src/notebook" }, "task_key": "notebook_task" -@@ -114,5 +103,5 @@ +@@ -115,5 +103,5 @@ ], "trigger": { - "pause_status": "PAUSED", + "pause_status": "UNPAUSED", "periodic": { "interval": 1, -@@ -127,11 +116,10 @@ +@@ -128,11 +116,10 @@ "channel": "CURRENT", "configuration": { - "bundle.sourcePath": "/Workspace/Users/[USERNAME]/.bundle/project_name_[UNIQUE_NAME]/dev/files/src" @@ -349,7 +361,7 @@ Resources: - "development": true, "edition": "ADVANCED", "id": "[UUID]", -@@ -139,11 +127,11 @@ +@@ -140,11 +127,11 @@ { "notebook": { - "path": "/Workspace/Users/[USERNAME]/.bundle/project_name_[UNIQUE_NAME]/dev/files/src/dlt_pipeline" @@ -364,7 +376,7 @@ Resources: + "schema": "project_name_[UNIQUE_NAME]_prod", "url": "[DATABRICKS_URL]/pipelines/[UUID]" } -@@ -157,10 +145,10 @@ +@@ -158,10 +145,10 @@ "targets": null, "workspace": { - "artifact_path": "/Workspace/Users/[USERNAME]/.bundle/project_name_[UNIQUE_NAME]/dev/artifacts", diff --git a/acceptance/bundle/templates/default-python/serverless/output/my_default_python/databricks.yml b/acceptance/bundle/templates/default-python/serverless/output/my_default_python/databricks.yml index 91c01f25da..bdbe7080bc 100644 --- a/acceptance/bundle/templates/default-python/serverless/output/my_default_python/databricks.yml +++ b/acceptance/bundle/templates/default-python/serverless/output/my_default_python/databricks.yml @@ -4,6 +4,11 @@ bundle: name: my_default_python uuid: [UUID] +artifacts: + python_artifact: + type: whl + build: uv build --wheel + include: - resources/*.yml - resources/*/*.yml diff --git a/acceptance/bundle/templates/default-python/serverless/output/my_default_python/pyproject.toml b/acceptance/bundle/templates/default-python/serverless/output/my_default_python/pyproject.toml new file mode 100644 index 0000000000..8dc683a7e6 --- /dev/null +++ b/acceptance/bundle/templates/default-python/serverless/output/my_default_python/pyproject.toml @@ -0,0 +1,15 @@ +[build-system] +requires = ["uv_build>=0.7.11,<0.8.0"] +build-backend = "uv_build" + +[project] +name = "my_default_python" +version = "0.0.1" +authors = [{ name = "[USERNAME]" }] + +[project.scripts] +main = "my_default_python.main:main" + +[tool.uv.build-backend] +module-name = "my_default_python" +module-root = "src" diff --git a/acceptance/bundle/templates/default-python/serverless/output/my_default_python/setup.py b/acceptance/bundle/templates/default-python/serverless/output/my_default_python/setup.py deleted file mode 100644 index 548f1035eb..0000000000 --- a/acceptance/bundle/templates/default-python/serverless/output/my_default_python/setup.py +++ /dev/null @@ -1,41 +0,0 @@ -""" -setup.py configuration script describing how to build and package this project. - -This file is primarily used by the setuptools library and typically should not -be executed directly. See README.md for how to deploy, test, and run -the my_default_python project. -""" - -from setuptools import setup, find_packages - -import sys - -sys.path.append("./src") - -import datetime -import my_default_python - -local_version = datetime.datetime.utcnow().strftime("%Y%m%d.%H%M%S") - -setup( - name="my_default_python", - # We use timestamp as Local version identifier (https://peps.python.org/pep-0440/#local-version-identifiers.) - # to ensure that changes to wheel package are picked up when used on all-purpose clusters - version=my_default_python.__version__ + "+" + local_version, - url="https://databricks.com", - author="[USERNAME]", - description="wheel file based on my_default_python/src", - packages=find_packages(where="./src"), - package_dir={"": "src"}, - entry_points={ - "packages": [ - "main=my_default_python.main:main", - ], - }, - install_requires=[ - # Dependencies in case the output wheel file is used as a library dependency. - # For defining dependencies, when this package is used in Databricks, see: - # https://docs.databricks.com/dev-tools/bundles/library-dependencies.html - "setuptools" - ], -) diff --git a/acceptance/bundle/templates/default-python/serverless/output/my_default_python/src/my_default_python/__init__.py b/acceptance/bundle/templates/default-python/serverless/output/my_default_python/src/my_default_python/__init__.py index f102a9cadf..e69de29bb2 100644 --- a/acceptance/bundle/templates/default-python/serverless/output/my_default_python/src/my_default_python/__init__.py +++ b/acceptance/bundle/templates/default-python/serverless/output/my_default_python/src/my_default_python/__init__.py @@ -1 +0,0 @@ -__version__ = "0.0.1" diff --git a/acceptance/bundle/templates/telemetry/default-python/out.databricks.yml b/acceptance/bundle/templates/telemetry/default-python/out.databricks.yml index 5adba2b4d8..b65622724f 100644 --- a/acceptance/bundle/templates/telemetry/default-python/out.databricks.yml +++ b/acceptance/bundle/templates/telemetry/default-python/out.databricks.yml @@ -4,6 +4,11 @@ bundle: name: my_default_python uuid: [BUNDLE-UUID] +artifacts: + python_artifact: + type: whl + build: uv build --wheel + include: - resources/*.yml - resources/*/*.yml @@ -19,6 +24,10 @@ targets: workspace: host: [DATABRICKS_URL] + artifacts: + python_artifact: + dynamic_version: true + prod: mode: production workspace: diff --git a/libs/template/templates/default-python/template/{{.project_name}}/databricks.yml.tmpl b/libs/template/templates/default-python/template/{{.project_name}}/databricks.yml.tmpl index 3bbfd4c7f3..c02182931d 100644 --- a/libs/template/templates/default-python/template/{{.project_name}}/databricks.yml.tmpl +++ b/libs/template/templates/default-python/template/{{.project_name}}/databricks.yml.tmpl @@ -1,9 +1,16 @@ +{{$with_classic := (ne .serverless "yes") -}} +{{$with_python := (eq .include_python "yes") -}} # This is a Databricks asset bundle definition for {{.project_name}}. # See https://docs.databricks.com/dev-tools/bundles/index.html for documentation. bundle: name: {{.project_name}} uuid: {{bundle_uuid}} - +{{ if $with_python }} +artifacts: + python_artifact: + type: whl + build: uv build --wheel +{{ end }} include: - resources/*.yml - resources/*/*.yml @@ -18,7 +25,11 @@ targets: default: true workspace: host: {{workspace_host}} - +{{ if (and $with_python $with_classic) }} + artifacts: + python_artifact: + dynamic_version: true +{{ end }} prod: mode: production workspace: diff --git a/libs/template/templates/default-python/template/{{.project_name}}/pyproject.toml.tmpl b/libs/template/templates/default-python/template/{{.project_name}}/pyproject.toml.tmpl new file mode 100644 index 0000000000..d0c3165588 --- /dev/null +++ b/libs/template/templates/default-python/template/{{.project_name}}/pyproject.toml.tmpl @@ -0,0 +1,15 @@ +[build-system] +requires = ["uv_build>=0.7.11,<0.8.0"] +build-backend = "uv_build" + +[project] +name = "{{.project_name}}" +version = "0.0.1" +authors = [{ name = "{{user_name}}" }] + +[project.scripts] +main = "{{.project_name}}.main:main" + +[tool.uv.build-backend] +module-name = "{{.project_name}}" +module-root = "src" diff --git a/libs/template/templates/default-python/template/{{.project_name}}/setup.py.tmpl b/libs/template/templates/default-python/template/{{.project_name}}/setup.py.tmpl deleted file mode 100644 index e3b70c6055..0000000000 --- a/libs/template/templates/default-python/template/{{.project_name}}/setup.py.tmpl +++ /dev/null @@ -1,41 +0,0 @@ -""" -setup.py configuration script describing how to build and package this project. - -This file is primarily used by the setuptools library and typically should not -be executed directly. See README.md for how to deploy, test, and run -the {{.project_name}} project. -""" - -from setuptools import setup, find_packages - -import sys - -sys.path.append("./src") - -import datetime -import {{.project_name}} - -local_version = datetime.datetime.utcnow().strftime("%Y%m%d.%H%M%S") - -setup( - name="{{.project_name}}", - # We use timestamp as Local version identifier (https://peps.python.org/pep-0440/#local-version-identifiers.) - # to ensure that changes to wheel package are picked up when used on all-purpose clusters - version={{.project_name}}.__version__ + "+" + local_version, - url="https://databricks.com", - author="{{user_name}}", - description="wheel file based on {{.project_name}}/src", - packages=find_packages(where="./src"), - package_dir={"": "src"}, - entry_points={ - "packages": [ - "main={{.project_name}}.main:main", - ], - }, - install_requires=[ - # Dependencies in case the output wheel file is used as a library dependency. - # For defining dependencies, when this package is used in Databricks, see: - # https://docs.databricks.com/dev-tools/bundles/library-dependencies.html - "setuptools" - ], -) diff --git a/libs/template/templates/default-python/template/{{.project_name}}/src/{{.project_name}}/__init__.py b/libs/template/templates/default-python/template/{{.project_name}}/src/{{.project_name}}/__init__.py index f102a9cadf..e69de29bb2 100644 --- a/libs/template/templates/default-python/template/{{.project_name}}/src/{{.project_name}}/__init__.py +++ b/libs/template/templates/default-python/template/{{.project_name}}/src/{{.project_name}}/__init__.py @@ -1 +0,0 @@ -__version__ = "0.0.1"