mirror of https://github.com/databricks/cli.git
Fix uv in experimental-jobs-as-code template (#2476)
## Changes Fix a problem where the output wheel didn't contain any code, because it was assuming flat-layout. ## Tests Updated acceptance tests
This commit is contained in:
parent
f8f3d669bc
commit
55387a6014
|
@ -86,3 +86,12 @@ Warning: Ignoring Databricks CLI version constraint for development build. Requi
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
>>> unzip -Z1 dist/my_jobs_as_code-0.0.1-py3-none-any.whl
|
||||
my_jobs_as_code/__init__.py
|
||||
my_jobs_as_code/main.py
|
||||
my_jobs_as_code-0.0.1.dist-info/METADATA
|
||||
my_jobs_as_code-0.0.1.dist-info/WHEEL
|
||||
my_jobs_as_code-0.0.1.dist-info/entry_points.txt
|
||||
my_jobs_as_code-0.0.1.dist-info/top_level.txt
|
||||
my_jobs_as_code-0.0.1.dist-info/RECORD
|
||||
|
|
|
@ -24,8 +24,8 @@ dynamic = ["version"]
|
|||
[project.entry-points.packages]
|
||||
main = "my_jobs_as_code.main:main"
|
||||
|
||||
[tool.setuptools]
|
||||
py-modules = ["resources", "my_jobs_as_code"]
|
||||
[tool.setuptools.packages.find]
|
||||
where = ["src"]
|
||||
|
||||
[tool.uv]
|
||||
## Dependencies for local development
|
||||
|
|
|
@ -7,7 +7,10 @@ uv sync -q
|
|||
|
||||
trace $CLI bundle validate -t dev --output json | jq ".resources"
|
||||
|
||||
rm -fr .venv resources/__pycache__ uv.lock my_jobs_as_code.egg-info
|
||||
uv build -q
|
||||
trace unzip -Z1 dist/my_jobs_as_code-0.0.1-py3-none-any.whl
|
||||
|
||||
rm -fr .venv resources/__pycache__ uv.lock src/my_jobs_as_code.egg-info dist
|
||||
|
||||
# Do not affect this repository's git behaviour #2318
|
||||
mv .gitignore out.gitignore
|
||||
|
|
|
@ -21,18 +21,19 @@ dependencies = [
|
|||
# see setup.py
|
||||
dynamic = ["version"]
|
||||
|
||||
{{ if .include_python -}}
|
||||
{{ if eq .include_python "yes" -}}
|
||||
[project.entry-points.packages]
|
||||
main = "{{.project_name}}.main:main"
|
||||
|
||||
{{ end -}}
|
||||
|
||||
[tool.setuptools]
|
||||
{{ if .include_python -}}
|
||||
py-modules = ["resources", "{{.project_name}}"]
|
||||
{{ if eq .include_python "yes" -}}
|
||||
[tool.setuptools.packages.find]
|
||||
where = ["src"]
|
||||
|
||||
{{ else }}
|
||||
py-modules = ["resources"]
|
||||
{{ else -}}
|
||||
[tool.setuptools]
|
||||
py-modules = []
|
||||
|
||||
{{ end -}}
|
||||
[tool.uv]
|
||||
|
|
Loading…
Reference in New Issue