Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 4be8690

Browse files
committed
Publish the pip package using Python 3
1 parent 5d5084f commit 4be8690

File tree

1 file changed

+7
-22
lines changed

1 file changed

+7
-22
lines changed

publish_package.sh

Lines changed: 7 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2,30 +2,15 @@
22

33
# Copyright (c) 2017-2022 Postgres Professional
44

5-
set -eux
5+
set -eu
66

7-
8-
# choose python version
9-
echo python version is $PYTHON_VERSION
10-
VIRTUALENV="virtualenv --python=/usr/bin/python$PYTHON_VERSION"
11-
PIP="pip$PYTHON_VERSION"
12-
13-
14-
# prepare environment
15-
VENV_PATH=/tmp/testgres_venv
16-
rm -rf $VENV_PATH
17-
$VIRTUALENV $VENV_PATH
7+
venv_path=.venv
8+
rm -rf "$venv_path"
9+
virtualenv "$venv_path"
1810
export VIRTUAL_ENV_DISABLE_PROMPT=1
19-
source $VENV_PATH/bin/activate
20-
21-
# install utilities
22-
$PIP install setuptools twine
23-
24-
# create distribution of the package
25-
alias python3='python'
26-
python setup.py sdist bdist_wheel
11+
. "$venv_path"/bin/activate
2712

28-
# upload dist
13+
pip3 install setuptools twine
14+
python3 setup.py sdist bdist_wheel
2915
twine upload dist/*
3016

31-
set +eux

0 commit comments

Comments
 (0)