-
-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathbuild-pip.sh
More file actions
executable file
·45 lines (30 loc) · 765 Bytes
/
build-pip.sh
File metadata and controls
executable file
·45 lines (30 loc) · 765 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
42
43
44
#!/bin/bash
set -ex
# remove files not under git
#git clean -f -d
if [[ -d staging_dir ]]; then
rm -rf staging_dir
fi
mkdir -p staging_dir/src/pyasmtools
mkdir -p staging_dir/tests
cp pyasmtools/*.py staging_dir/src/pyasmtools
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 ***"