Skip to content

Commit

Permalink
Try to solve issue with release
Browse files Browse the repository at this point in the history
Faced while running the following command in the CI (I was not able to reproduce this locally):
```
Run python -m build
```

Resulted in the stacktrace:
```
    val = self.func(instance)
  File "/tmp/build-env-o83v4k67/lib/python3.10/site-packages/hatchling/builders/wheel.py", line 247, in default_file_selection_options
    raise ValueError(message)
ValueError: Unable to determine which files to ship inside the wheel using the following heuristics: https://hatch.pypa.io/latest/plugins/builder/wheel/#default-file-selection

The most likely cause of this is that there is no directory that matches the name of your project (astronomer_cosmos).

At least one file selection option must be defined in the `tool.hatch.build.targets.wheel` table, see: https://hatch.pypa.io/latest/config/build/

As an example, if you intend to ship a directory named `foo` that resides within a `src` directory located at the root of your project, you can define the following:

[tool.hatch.build.targets.wheel]
packages = ["src/foo"]

ERROR Backend subprocess exited when trying to invoke build_wheel
```

As seen in:
https://github.com/astronomer/astronomer-cosmos/actions/runs/8986616060/job/24683237685
  • Loading branch information
tatiana committed May 7, 2024
1 parent c7a4599 commit ebbc50c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Install build dependencies
run: python -m pip install --upgrade build
Expand Down
2 changes: 1 addition & 1 deletion cosmos/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Contains dags, task groups, and operators.
"""
__version__ = "1.4.0a3"
__version__ = "1.4.0a4"


from cosmos.airflow.dag import DbtDag
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ path = "cosmos/__init__.py"
include = ["/cosmos"]

[tool.hatch.build.targets.wheel]
packages = ["cosmos"]
packages = ["/cosmos"]

######################################
# TESTING
Expand Down

0 comments on commit ebbc50c

Please sign in to comment.