-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
executable file
·42 lines (39 loc) · 993 Bytes
/
install.sh
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
#!/usr/bin/env bash
# as venv is activated we must reset PATH
echo current python is: `which python`
export PATH=`echo $PATH | tr ":" "\n" | grep -v "venv/bin" | tr "\n" ":"`
echo switched to: `pyenv which python`
export PROJECT=yandex2lightroom
cd ~/Projekte/${PROJECT}-git || exit 1
if [ -d dist ]; then
rm -r dist
fi
if [ -d ${PROJECT}.egg-info ]; then
rm -r ${PROJECT}.egg-info
fi
if [ -d build ]; then
rm -r build
fi
#
# install from local
python setup.py sdist
pip install dist/${PROJECT}*.gz --force-reinstall
#
# upload to pypi
#
# wheel must be installed (.pyenv not venv) before:pip install wheel
##python setup.py bdist_wheel
# twine must be installed (.pyenv not venv) before:pip install twine
# user:__token__
##python3 -m twine upload --repository testpypi dist/*
##python3 -m twine upload --repository pypi dist/*
# cleanup
if [ -d dist ]; then
rm -r dist
fi
if [ -d ${PROJECT}.egg-info ]; then
rm -r ${PROJECT}.egg-info
fi
if [ -d build ]; then
rm -r build
fi