File: ci_ubuntu.sh

package info (click to toggle)
python-plyer 2.1.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,808 kB
  • sloc: python: 13,395; sh: 217; makefile: 177
file content (80 lines) | stat: -rw-r--r-- 1,215 bytes parent folder | download | duplicates (3)
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
#!/bin/sh
set -ex

dependencies()
{
  # install default packages
  sudo apt-get update && \
  sudo apt-get -y --force-yes install \
  build-essential \
  openjdk-8-jdk \
  lshw \
  wget \
  git \
  && apt-get -y autoremove \
  && apt-get -y clean

  # generate user folder locations (Pictures, Downloads, ...)
  xdg-user-dirs-update

  # install PIP
  python -V
  python -m pip install --upgrade pip

  # install dev packages
  python -m pip install \
  --upgrade \
  --requirement devrequirements.txt
  python -m pip install pyjnius

  python -m pip install .
}

deployment_dependencies()
{
  python -m pip install --upgrade pip

  pip install setuptools wheel twine
}

style_dependencies()
{
  python -m pip install --upgrade pip

  pip install flake8
}

style()
{
  python -m flake8 . --show-source
}

tests()
{
  # tests and coverage for plyer package
  python -m coverage run \
  --source plyer \
  -m unittest discover \
  --start-directory plyer/tests \
  --top-level-directory . \
  --failfast

  coverage report -m
}

upload_coverage()
{
  python -m coveralls
}

build()
{
  python setup.py sdist
  python setup.py bdist_wheel --universal
}

deploy()
{
  # deploy to PyPI
  python -m twine upload dist/*
}