-
-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathbuild-pip.sh
More file actions
executable file
·42 lines (27 loc) · 708 Bytes
/
build-pip.sh
File metadata and controls
executable file
·42 lines (27 loc) · 708 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
35
36
37
38
39
40
41
#!/bin/bash
set -ex
# remove files not under git
git clean -f -d
mkdir -p staging_dir/src/mdpyformat
mkdir -p staging_dir/tests
cp mdpyformat/*.py staging_dir/src/mdpyformat
cp requirements.txt staging_dir/
cp LICENSE.txt README.md staging_dir
cp pip-build/* staging_dir
if [[ -f build.zip ]]; then
rm build.zip
fi
pushd staging_dir
python3 setup.py sdist bdist_wheel
python3 -m pip install --user --upgrade twine
# twine is put here right now, so add it to path.
export PATH=$HOME/Library/Python/3.9/bin:$PATH
twine check dist/*
cat <<EOF
*** upload ***
enter user: __token__
for password: <pypi api token>
EOF
python3 -m twine upload --verbose dist/*
popd
echo "*** build completed ***"