forked from vtraag/leidenalg
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrelease.sh
executable file
·46 lines (33 loc) · 1.17 KB
/
release.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
41
42
43
44
45
#!/bin/bash
PACKAGE=`python setup.py --fullname`
echo Building $PACKAGE
if [ "$1" = "release" ]; then
echo "Making release, uploading to PyPi and Anaconda..."
# Python 3 (source only needed once)
source ~/anaconda3/bin/activate root
~/anaconda3/bin/conda config --set anaconda_upload yes
python setup.py bdist_egg # Binary
python setup.py --no-pkg-config bdist_conda # Conda binary
# Upload using twine
twine upload dist/$PACKAGE-* --sign
# docs will be built automatically by readthedocs.org
else
echo "Dry run, not uploading anything..."
# Python 3 (source only needed once)
source ~/anaconda3/bin/activate root
~/anaconda3/bin/conda config --set anaconda_upload no
python setup.py bdist_egg # Binary
python setup.py --no-pkg-config bdist_conda # Conda binary
# Upload using twine
twine upload dist/$PACKAGE-* --sign -r pypitest
# List package
echo Created following packages
ls -1 dist/$PACKAGE-*
# Install & test
python setup.py check
python setup.py install
python setup.py test
# docs
python setup.py build_sphinx
sphinx-build -b doctest -d doc/build/doctrees/ doc/source/ doc/build/
fi