aboutsummaryrefslogtreecommitdiff
blob: 6d3afa4ceef6078710f6c7f16ae8a06ae9095463 (plain)
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
dist: bionic
language: python
python:
    - 2.7
    - 3.6
    - 3.7
    - 3.8
    - 3.9-dev
    - pypy3

# command to install dependencies
before_install:
    # Use "dist: bionic" to get a zstd with --long support.
    - sudo apt-get -y install zstd
install:
    - pip install tox

script:
    - printf "[build_ext]\nportage-ext-modules=true" >> setup.cfg
    - find . -type f -exec
          sed -e "s|@PORTAGE_EPREFIX@||"
              -e "s|@PORTAGE_BASE@|${PWD}|"
              -e "s|@PORTAGE_MV@|$(type -P mv)|"
              -e "s|@PORTAGE_BASH@|$(type -P bash)|"
              -e "s|@PREFIX_PORTAGE_PYTHON@|$(type -P python)|"
              -e "s|@EXTRA_PATH@|/usr/sbin:/sbin|"
              -e "s|@portagegroup@|$(id -gn)|"
              -e "s|@portageuser@|$(id -un)|"
              -e "s|@rootuser@|$(id -un)|"
              -e "s|@rootuid@|$(id -u)|"
              -e "s|@rootgid@|$(id -g)|"
              -e "s|@sysconfdir@|/etc|"
              -i '{}' +
    - ./setup.py test
    - ./setup.py install --root=/tmp/install-root
    - if [[ ${TRAVIS_PYTHON_VERSION/-dev/} == ?.? ]]; then
        TOX_PYTHON_VERSION=${TRAVIS_PYTHON_VERSION/-dev/};
        tox -e py${TOX_PYTHON_VERSION/./};
      else
        tox -e ${TRAVIS_PYTHON_VERSION};
      fi