Skip to content

Commit

Permalink
travis: build linux packages
Browse files Browse the repository at this point in the history
Signed-off-by: Ruslan Kuprieiev <[email protected]>
  • Loading branch information
efiop committed Jul 31, 2017
1 parent ee34fdf commit b1f19ce
Show file tree
Hide file tree
Showing 7 changed files with 196 additions and 183 deletions.
6 changes: 5 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
language: python
sudo: required
dist: trusty
python:
- "2.7"
- "3.4"
- "3.5"
- "3.6"
# - "3.6" Not supported by pyinstaller yet
install:
- pip install --upgrade pip
- pip install -r requirements.txt
Expand All @@ -13,5 +15,7 @@ install:
- mkdir -p ~/.aws && printf "[default]\naws_access_key_id = ABCDEFG\naws_secret_access_key = 123456789" > ~/.aws/credentials
script:
- ./unittests.sh
- ./build_linux.sh
- ./build_package.sh
after_sucess:
- CODECLIMATE_REPO_TOKEN=7350efa14a67c3911af96dadaabe811b43eead7b466309b47687499bf5d72287 codeclimate-test-reporter
15 changes: 9 additions & 6 deletions build_linux.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#!/bin/sh
#!/bin/bash

set -e

BUILD_DIR=build
INSTALL_DIR=usr
Expand All @@ -24,7 +26,7 @@ command_exists()
fpm_build()
{
print_info "Building $1..."
VERSION=$(python -c "import dvc; from dvc.main import VERSION; print(str(VERSION))")
VERSION=$(python -c "import dvc; from dvc import VERSION; print(str(VERSION))")
fpm -s dir -f -t $1 -n dvc -v $VERSION -C $BUILD_DIR $INSTALL_DIR
}

Expand All @@ -36,22 +38,23 @@ cleanup()

install_dependencies()
{
print_info "Installing requirements..."
pip install -r requirements.txt

print_info "Installing fpm..."
if command_exists dnf; then
sudo dnf install ruby-devel gcc make rpm-build
elif command_exists yum; then
sudo yum install ruby-devel gcc make rpm-build
elif command_exists apt-get; then
sudo apt-get install ruby ruby-dev rubygems build-essential rpm
sudo apt-get update -y
sudo apt-get install ruby-dev build-essential rpm python-pip python-dev
else
echo "Unable to install fpm dependencies" && exit 1
fi

gem install --no-ri --no-rdoc fpm

print_info "Installing requirements..."
pip install -r requirements.txt

print_info "Installing pyinstaller..."
pip install pyinstaller
}
Expand Down
2 changes: 1 addition & 1 deletion build_macos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ command_exists()
fpm_build()
{
print_info "Building $1..."
VERSION=$(python -c "import dvc; from dvc.main import VERSION; print(str(VERSION))")
VERSION=$(python -c "import dvc; from dvc import VERSION; print(str(VERSION))")
fpm -s dir -f -t $1 --osxpkg-identifier-prefix com.dataversioncontrol -n dvc -v $VERSION -C $BUILD_DIR $INSTALL_DIR
}

Expand Down
4 changes: 4 additions & 0 deletions build_package.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
#!/bin/bash

set -e

python setup.py sdist
python setup.py bdist_wheel --universal
2 changes: 1 addition & 1 deletion innosetup/config_gen.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This script generates config.ini for setup.iss script
from dvc.main import VERSION
from dvc import VERSION

try:
import configparser as ConfigParser
Expand Down
173 changes: 87 additions & 86 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,87 +1,88 @@
altgraph==0.13
appdirs==1.4.3
backports.shutil-get-terminal-size==1.0.0
boto==2.46.1
cachetools==2.0.0
configparser==3.5.0
decorator==4.0.11
dill==0.2.6
enum34==1.1.6
fasteners==0.14.1
funcsigs==1.0.2
future==0.16.0
futures==3.0.5
gapic-google-cloud-datastore-v1==0.15.3
gapic-google-cloud-error-reporting-v1beta1==0.15.3
gapic-google-cloud-logging-v2==0.91.3
gapic-google-cloud-pubsub-v1==0.15.3
gapic-google-cloud-spanner-admin-database-v1==0.15.3
gapic-google-cloud-spanner-admin-instance-v1==0.15.3
gapic-google-cloud-spanner-v1==0.15.3
gapic-google-cloud-speech-v1beta1==0.15.3
gapic-google-cloud-vision-v1==0.90.3
google-auth==0.10.0
google-auth-httplib2==0.0.2
google-cloud==0.24.0
google-cloud-bigquery==0.24.0
google-cloud-bigtable==0.24.0
google-cloud-core==0.24.0
google-cloud-datastore==1.0.0
google-cloud-dns==0.24.0
google-cloud-error-reporting==0.24.0
google-cloud-language==0.24.0
google-cloud-logging==0.24.0
google-cloud-monitoring==0.24.0
google-cloud-pubsub==0.24.0
google-cloud-resource-manager==0.24.0
google-cloud-runtimeconfig==0.24.0
google-cloud-spanner==0.24.0
google-cloud-speech==0.24.0
google-cloud-storage==1.0.0
google-cloud-translate==0.24.0
google-cloud-vision==0.24.0
google-gax==0.15.8
googleapis-common-protos==1.5.2
grpc-google-iam-v1==0.11.1
grpcio==1.2.1
httplib2==0.10.3
ipython==5.3.0
ipython-genutils==0.2.0
macholib==1.8
mock==2.0.0
modulegraph==0.14
monotonic==1.3
nose==1.3.7
oauth2client==3.0.0
packaging==16.8
pathlib==1.0.1
pathlib2==2.2.1
pbr==3.0.0
pexpect==4.2.1
pickleshare==0.7.4
ply==3.8
prompt-toolkit==1.0.14
proto-google-cloud-datastore-v1==0.90.3
proto-google-cloud-error-reporting-v1beta1==0.15.3
proto-google-cloud-logging-v2==0.91.3
proto-google-cloud-pubsub-v1==0.15.3
proto-google-cloud-spanner-admin-database-v1==0.15.3
proto-google-cloud-spanner-admin-instance-v1==0.15.3
proto-google-cloud-spanner-v1==0.15.3
proto-google-cloud-speech-v1beta1==0.15.3
proto-google-cloud-vision-v1==0.90.3
protobuf==3.2.0
ptyprocess==0.5.1
pyasn1==0.2.3
pyasn1-modules==0.0.8
Pygments==2.2.0
PyInstaller==3.2.1
pyparsing==2.2.0
requests==2.13.0
rsa==3.4.2
scandir==1.5
simplegeneric==0.8.1
six==1.10.0
traitlets==4.3.2
wcwidth==0.1.7
altgraph
appdirs
backports.shutil-get-terminal-size
boto
cachetools
configparser
decorator
dill
enum34
fasteners
funcsigs
future
futures
gapic-google-cloud-datastore-v1
gapic-google-cloud-error-reporting-v1beta1
gapic-google-cloud-logging-v2
gapic-google-cloud-pubsub-v1
gapic-google-cloud-spanner-admin-database-v1
gapic-google-cloud-spanner-admin-instance-v1
gapic-google-cloud-spanner-v1
gapic-google-cloud-speech-v1beta1
gapic-google-cloud-vision-v1
google-auth
google-auth-httplib2
google-cloud
google-cloud-bigquery
google-cloud-bigtable
google-cloud-core
google-cloud-datastore
google-cloud-dns
google-cloud-error-reporting
google-cloud-language
google-cloud-logging
google-cloud-monitoring
google-cloud-pubsub
google-cloud-resource-manager
google-cloud-runtimeconfig
google-cloud-spanner
google-cloud-speech
google-cloud-storage
google-cloud-translate
google-cloud-vision
google-gax
googleapis-common-protos
grpc-google-iam-v1
grpcio
httplib2
ipython
ipython-genutils
macholib
mock
modulegraph
monotonic
nose
oauth2client
packaging
pathlib
pathlib2
pbr
pexpect
pickleshare
ply
prompt-toolkit
proto-google-cloud-datastore-v1
proto-google-cloud-error-reporting-v1beta1
proto-google-cloud-logging-v2
proto-google-cloud-pubsub-v1
proto-google-cloud-spanner-admin-database-v1
proto-google-cloud-spanner-admin-instance-v1
proto-google-cloud-spanner-v1
proto-google-cloud-speech-v1beta1
proto-google-cloud-vision-v1
protobuf
ptyprocess
pyasn1
pyasn1-modules
Pygments
PyInstaller
pyparsing
requests
rsa
scandir
simplegeneric
six
traitlets
wcwidth
colorama
google-compute-engine
Loading

0 comments on commit b1f19ce

Please sign in to comment.