-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathbuild.sh
More file actions
executable file
·34 lines (26 loc) · 815 Bytes
/
build.sh
File metadata and controls
executable file
·34 lines (26 loc) · 815 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/bash
set -o errexit
set -o nounset
cd "$(dirname "$0")"
source python.sh
echo "Deactivating any active virtual environment..."
deactivate 2>/dev/null || true
# Create and activate a clean build venv
rm -rf .venv-build dist
$PYTHON -m venv .venv-build
source .venv-build/bin/activate
$PYTHON -m pip install --upgrade pip
$PYTHON -m pip install --upgrade build
# And build. This recreates dist/*
rm -rf dist
$PYTHON -m build
deactivate
# Done. List the files in the tarball.
echo -e "\033[1mCreated:\033[0m"
find dist -mindepth 1 | sed 's/^/ /'
echo -e "\033[1mTarball contents:\033[0m"
tar tzf dist/*.tar.gz | sed 's/^/ /'
echo -e "\033[1mWheel contents:\033[0m"
unzip -Z1 dist/*.whl | sed 's/^/ /'
echo
echo "Done. You'll need to reactivate your previous virtual environment if you had one."