Files
dbt-core/scripts/build-dist.sh
Emily Rockman 7e10fc72d5 Move from setup.py to pyproject.toml (#12129)
* convert setup.py to pyproject.toml

* move dev requirements into pyproject.toml

* with setup.py gone we can install from root

* lint

cleanrly state intention to remove

* convert precommit to use dev deps

* consolidate version to pyproject.toml

* editable req

get rid of editable-req

* docs updates

* tweak configs for builds

* fix script

* changelog

* fixes to build

* revert unnecesary changes

more simplification

revert linting

more simplification

fix

don’t need it
2025-11-06 09:08:00 -05:00

32 lines
696 B
Bash
Executable File

#!/bin/bash
set -eo pipefail
DBT_PATH="$( cd "$(dirname "$0")/.." ; pwd -P )"
PYTHON_BIN=${PYTHON_BIN:-python}
echo "$PYTHON_BIN"
set -x
rm -rf "$DBT_PATH"/dist
rm -rf "$DBT_PATH"/build
rm -rf "$DBT_PATH"/core/dist
rm -rf "$DBT_PATH"/core/build
mkdir -p "$DBT_PATH"/dist
# Copy License.md to core/ for inclusion in distribution (required by Apache 2.0)
# The license-files in pyproject.toml references it relative to core/
cp "$DBT_PATH"/License.md "$DBT_PATH"/core/License.md
cd "$DBT_PATH"/core
$PYTHON_BIN -m pip install --upgrade build
$PYTHON_BIN -m build --outdir "$DBT_PATH/dist"
# Clean up License.md that was copied to core/ for build
rm -f "$DBT_PATH/core/License.md"
set +x