-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.cue
49 lines (45 loc) · 1.02 KB
/
build.cue
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
package rentalsapi
import (
"dagger.io/dagger"
"universe.dagger.io/docker"
"universe.dagger.io/bash"
)
#PythonImageBuild: {
source: dagger.#FS
pyVersion: string
dockerfile: *{
path: string | *"Dockerfile"
} | {
contents: string
}
_build: docker.#Dockerfile & {
"source": source
"dockerfile": dockerfile
buildArg: "PYTHON_EXACT_VERSION": pyVersion
}
output: _build.output
}
#BuildWheels: {
input: docker.#Image
source: dagger.#FS
_run: bash.#Run & {
"input": input
mounts: project: {
dest: "/app/src"
contents: source
}
workdir: "/app/src"
script: contents: """
set -e
mkdir -p /app/build/wheels
pip wheel -w /app/build/wheels poetry wheel setuptools
pip install -f /app/build/wheels poetry wheel setuptools
poetry export --dev --without-hashes --format=requirements.txt > /app/build/requirements.txt
pip wheel -w /app/build/wheels -r /app/build/requirements.txt
"""
export: {
directories: "/app/build": _
}
}
output: _run.export.directories."/app/build"
}