File: ubuntu-test

package info (click to toggle)
python-greenlet 3.2.4-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,096 kB
  • sloc: cpp: 5,078; python: 3,197; ansic: 1,129; makefile: 145; asm: 120; sh: 72
file content (47 lines) | stat: -rwxr-xr-x 1,321 bytes parent folder | download | duplicates (2)
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
#!/bin/bash

# This needs to be run from the root of the project.

set -e
export PYTHONUNBUFFERED=1
export PYTHONDONTWRITEBYTECODE=1
# Use a fixed hash seed for reproducibility
export PYTHONHASHSEED=8675309
export CI=1
export TRAVIS=true
export PIP_NO_WARN_SCRIPT_LOCATION=1


if [ -d /greenlet ]; then
    # Running inside docker
    export GREENLET_MANYLINUX=1
    # Our setup.py overrides this with -Os; be sure it does.
    export CFLAGS="-O3 -DNDEBUG -Wall"

    apt-get update
    apt-get install -y python3.12 python3.12-dev python3.12-venv gcc git g++
    update-alternatives --install /usr/bin/python python /usr/bin/python3.12 1

    # Build in an isolated directory
    mkdir /tmp/build
    cd /tmp/build
    git config --global --add safe.directory /greenlet/.git
    git clone /greenlet greenlet
    cd greenlet

    python -m venv /tmp/venv
    . /tmp/venv/bin/activate
    echo "Python"
    python --version

    python -mpip install -U pip
    python -mpip install -U setuptools wheel
    python -mpip wheel -v --wheel-dir ./dist .
    python -mpip install -U .[test]
    python -m unittest discover -v greenlet.tests

    exit 0
fi

# Mount the current directory as /greenlet
docker run --rm --platform linux/riscv64 -v "$(pwd):/greenlet"  ${DOCKER_IMAGE:-riscv64/ubuntu:latest} /greenlet/$(basename $0)