-
Notifications
You must be signed in to change notification settings - Fork 30
Expand file tree
/
Copy pathpython3-clr-loader.bb
More file actions
62 lines (51 loc) · 2.12 KB
/
python3-clr-loader.bb
File metadata and controls
62 lines (51 loc) · 2.12 KB
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
SUMMARY = "Loader for different .NET runtimes"
DESCRIPTION = "Implements a generic interface for loading one of the CLR (.NET) runtime implementations and calling simple functions on them."
HOMEPAGE = "http://pythonnet.github.io"
SECTION = "devel/python"
LICENSE = "MIT"
LIC_FILES_CHKSUM = " \
file://LICENSE;md5=cdef1cb9133877183afac105849a771e \
"
inherit pypi python_flit_core
PV = "0.2.6"
SRC_URI[sha256sum] = "019348ae6b6a83c7a406d14537c277cecf7a3a53b263ec342c81ded5845a67ee"
PYPI_PACKAGE = "clr_loader"
DOTNET_MIN_REQ_VERSION ?= "6.0.0"
DEPENDS += " \
dotnet-native (>= ${DOTNET_MIN_REQ_VERSION}) \
python3-setuptools-scm-native \
python3-toml-native \
"
RDEPENDS:${PN} += " \
dotnet (>= ${DOTNET_MIN_REQ_VERSION}) \
python3-cffi \
"
# NuGet uses $HOME/.nuget/packages to store packages by default
# but we should not use anything outside the build root of packages.
# Use a separated folder for nuget downloads and cache in UNPACKDIR.
export NUGET_PACKAGES="${UNPACKDIR}/nuget-packages"
export NUGET_HTTP_CACHE_PATH="${UNPACKDIR}/nuget-http-cache"
# NuGet MigrationRunner.Run() in .NET 6 runs BEFORE the skip-first-time
# check, and hardcodes $HOME/.local/share/NuGet/Migrations. In CI
# containers $HOME is often read-only. Override HOME to a writable path
# so NuGet, dotnet CLI, and any other $HOME consumer all get a writable dir.
export HOME="${WORKDIR}/dotnet-home"
export DOTNET_CLI_HOME="${WORKDIR}/dotnet-home"
export DOTNET_SKIP_FIRST_TIME_EXPERIENCE="true"
export DOTNET_CLI_TELEMETRY_OPTOUT="1"
export DOTNET_NOLOGO="1"
# Workaround for dotnet restore issue, define custom proxy in a .bbappend
# and/or in layer.conf or local.conf if dotnet restore was failed.
# Override DOTNET_HTTP_PROXY and DOTNET_HTTPS_PROXY in layer.conf or local.conf if needed
DOTNET_HTTP_PROXY ?= ""
DOTNET_HTTPS_PROXY ?= ""
export http_proxy="${DOTNET_HTTP_PROXY}"
export https_proxy="${DOTNET_HTTPS_PROXY}"
do_configure:prepend() {
if ! grep -Fq __version__ ${S}/clr_loader/__init__.py
then
printf "\n__version__ = \"${PV}\"\n" >> ${S}/clr_loader/__init__.py
fi
}
do_compile[network] = "1"
BBCLASSEXTEND = "native"