File: install

package info (click to toggle)
awscli 2.31.35-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 156,692 kB
  • sloc: python: 213,816; xml: 14,082; makefile: 189; sh: 178; javascript: 8
file content (34 lines) | stat: -rwxr-xr-x 984 bytes parent folder | download
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
#!/usr/bin/env python
import glob
import os
import shutil
import sys
from subprocess import check_call

_dname = os.path.dirname

REPO_ROOT = _dname(_dname(_dname(os.path.abspath(__file__))))
os.chdir(REPO_ROOT)


def run(command):
    return check_call(command, shell=True)


if sys.version_info[:2] >= (3, 12):
    # Python 3.12+ no longer includes setuptools by default.

    # Setuptools 71+ now prefers already installed versions
    # of packaging _and_ broke the API for packaging<22.0.
    # We'll pin to match what's in requirements-dev.txt.
    run("pip install setuptools==78.1.1 packaging==24.1")

run("python -m pip install --no-build-isolation -r requirements-dev-lock.txt")
run(
    "python -m pip install --no-build-isolation -r requirements/download-deps/bootstrap-lock.txt"
)
if os.path.isdir("dist") and os.listdir("dist"):
    shutil.rmtree("dist")
run("python -m build")
wheel_dist = glob.glob(os.path.join("dist", "*.whl"))[0]
run("pip install %s" % wheel_dist)