Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 24 additions & 3 deletions build.sh
Original file line number Diff line number Diff line change
@@ -1,19 +1,40 @@
#!/bin/bash

pyenv=$(which pyenv)
interpreters=(2.7 3.7 3.9 3.10)

read -p "Build dataplicity agent v$(python dataplicity/_version.py) from PyPi? " -n 1 -r
echo
if [[ ! "$REPLY" =~ ^[Yy]$ ]]
then
exit 1
fi

# check if pyenv is installed:
if [ ! -e ~/.pyenv/ ]
then
echo "Make sure you have pyenv installed"
exit 1
fi

pyenvRoot=$("$pyenv" root)

buildParams=""
for version in ${interpreters[@]}; do
fullVersion=$(pyenv install --list | grep "^ $version" | tail -1 | xargs)
echo "${version} => ${fullVersion}"
pyenv install -s $fullVersion
buildParams="$buildParams--python=$pyenvRoot/versions/$fullVersion/bin/python "
done

mkdir -p bin
rm -f bin/dataplicity
rm -rf .build
virtualenv -qq .build -p python3
python3 -m venv .build
source .build/bin/activate
pip -q install pex==2.1.21 subprocess32
pip -q install pex==2.1.112 subprocess32
echo building ./bin/dataplicity
pex dataplicity==$(python dataplicity/_version.py) --pre --python-shebang="#!/usr/bin/env python" --python=$(which python2) --python=$(which python3) -r requirements.txt -o bin/dataplicity -m dataplicity.app:main
echo "pex dataplicity==$(python dataplicity/_version.py) --pre --python-shebang='#!/usr/bin/env python' -r requirements.txt -o bin/dataplicity -m dataplicity.app:main $buildParams"
pex dataplicity==$(python dataplicity/_version.py) --pre --python-shebang='#!/usr/bin/env python' -r requirements.txt -o bin/dataplicity -m dataplicity.app:main $buildParams
deactivate
echo built dataplicity agent v$(./bin/dataplicity version)
2 changes: 1 addition & 1 deletion dataplicity/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "0.5.9"
__version__ = "0.5.9a10"

if __name__ == "__main__":
# The build script uses this to extract the current version
Expand Down
6 changes: 4 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"Programming Language :: Python",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 3",
]

# http://bit.ly/2alyerp
Expand All @@ -25,8 +26,9 @@
url="https://www.dataplicity.com",
platforms=["any"],
packages=find_packages(),
python_requires='>=2.7',
classifiers=classifiers,
entry_points={"console_scripts": ["dataplicity = dataplicity.app:main"]},
install_requires=["enum34==1.1.6", "six==1.10.0", "lomond==0.3.3"],
install_requires=["enum34==1.1.6", "six==1.10.0", "lomond==0.3.3", "distro==1.6.0"],
zip_safe=True,
)