Skip to content

Commit

Permalink
changes to enable build
Browse files Browse the repository at this point in the history
  • Loading branch information
vegano1 committed Sep 3, 2024
1 parent e14b649 commit 0674367
Show file tree
Hide file tree
Showing 5 changed files with 69 additions and 16 deletions.
43 changes: 34 additions & 9 deletions layers/meta-opentrons/classes/pipenv_app_bundle.bbclass
Original file line number Diff line number Diff line change
Expand Up @@ -97,19 +97,19 @@ python do_rewrite_requirements() {
bb.debug(1, 'Checking ' + plainname)

if line.startswith('--index-url'): pypi.append(line)
elif line.startswith('--editable') or line.startswith('./'):
elif line.startswith('--editable') or (line.startswith('./') or line.startswith('../')):
# an editable probably-local package
if line.startswith('--editable'):
working = line.split('--editable')[-1].strip()
else:
working = line.strip()
if not working.startswith('./'):
if not (working.startswith('./') or working.startswith('../')):
bb.debug(1, 'Skipping {}'.format(line))
continue
working = d.getVar('PIPENV_APP_BUNDLE_PROJECT_ROOT') + '/' + working
local.append(working)
bb.debug(1, 'Rewrote local path to ' + working)
elif not line.startswith('.') and not '://' in line:
elif not (line.startswith('.') or line.startswith('../')) and not '://' in line:
# This is a package from pypi; check if it's global
first_nonalpha = [c for c in line if c in '=~^<>']
pkgname = line.split(first_nonalpha[0])[0] if first_nonalpha else line
Expand Down Expand Up @@ -149,24 +149,49 @@ PIP_ARGS := "--no-compile \
--no-binary :all: \
--progress-bar off \
--force-reinstall \
--no-deps \
-t ${PIPENV_APP_BUNDLE_SOURCE_VENV}"

do_compile () {
${PIP_ENVARGS} ${PYTHON} -m pip install \
mkdir -p ${B}/pip-buildenv

bbnote "Installing pypi packages"

${PYTHON} -m pip install \
-t ${B}/pip-buildenv \
hatchling hatch-vcs hatch-fancy-pypi-readme \
flit flit-core flit_scm \
setuptools==65.6.3 setuptools-scm[toml]==7.1.0 \
wheel==0.38.4 \
expandvars \
cython \


${PIP_ENVARGS} PYTHONPATH=${B}/pip-buildenv:${PYTHONPATH} ${PYTHON} -m pip install \
${PIP_ARGS} \
--no-build-isolation \
-r ${B}/pypi.txt \
${PIP_ARGS}


bbnote "Building and installing local packages"

${PIP_ENVARGS} ${PYTHON} -m pip install \
-r ${B}/local.txt \
--no-use-pep517 \
${PIP_ARGS} \
--no-deps \
--use-feature=in-tree-build
--use-feature=in-tree-build \


bbnote "Building and installing true source packages"

${PIP_ENVARGS} ${PYTHON} -m pip install \
${PIPENV_APP_BUNDLE_PROJECT_ROOT} \
--no-use-pep517 \
--use-feature=in-tree-build \
--no-deps \
${PIP_ARGS}
${PIP_ARGS} \


bbnote "Done installing python packages"
}

do_compile[vardeps] += "PIPENV_APP_BUNDLE_EXTRA_PIP_ENVARGS"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
SRC_URI = "git://gitlab.gnome.org/GNOME/mobile-broadband-provider-info.git;protocol=https;branch=main"
SRC_URI[sha256sum] = "b4e086835f3ad360b39dd314bc58d26cc758d111a6afd8ed833020d1ac915167"
11 changes: 11 additions & 0 deletions meta-jupyter.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
diff --git a/conf/layer.conf b/conf/layer.conf
index b49b0e1..acdbd01 100644
--- a/conf/layer.conf
+++ b/conf/layer.conf
@@ -15,5 +15,5 @@ BBFILE_PRIORITY_jupyter-layer = "7"

LAYERDEPENDS_jupyter-layer = "core meta-python"

-LAYERSERIES_COMPAT_jupyter-layer = "gatesgarth"
+LAYERSERIES_COMPAT_jupyter-layer = "dunfell"

14 changes: 14 additions & 0 deletions mobile-broadband-provider-info.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
diff --git a/meta/recipes-connectivity/mobile-broadband-provider-info/mobile-broadband-provider-info_git.bb b/meta/recipes-connectivity/mobile-broadband-provider-info/mobile-broadband-provider-info_git.bb
index e802bcee18..1269e45349 100644
--- a/meta/recipes-connectivity/mobile-broadband-provider-info/mobile-broadband-provider-info_git.bb
+++ b/meta/recipes-connectivity/mobile-broadband-provider-info/mobile-broadband-provider-info_git.bb
@@ -9,7 +9,8 @@ SRCREV = "22a5de3ef637990ce03141f786fbdb327e9c5a3f"
PV = "20221107"
PE = "1"

-SRC_URI = "git://gitlab.gnome.org/GNOME/mobile-broadband-provider-info.git;protocol=https;branch=main"
+SRC_URI = "https://gitlab.gnome.org/GNOME/mobile-broadband-provider-info.git;protocol=https;branch=main"
+SRC_URI[sha256sum] = "15012f1f7ee2c6c78d048ac0582ad5437e12ba219a35b118183165ad216a94b3"
S = "${WORKDIR}/git"

inherit autotools
15 changes: 8 additions & 7 deletions start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,19 @@ trap cleanup EXIT
sudo chown -hR $USER_NAME:$USER_NAME /volumes && chmod -R ug+rw /volumes

pushd ${THISDIR}
patch -f ./layers/meta-jupyter/conf/layer.conf ./meta-jupyter-backport.patch

export BITBAKEDIR=${THISDIR}/tools/bitbake
. layers/openembedded-core/oe-init-build-env ${THISDIR}/build

# electron is ignoring the cache download set by the electron_config_cache env var
# so for now lets manually create a symlink and set its download location to /volumes/cache
mkdir -p /volumes/cache/electron
mkdir -p /volumes/cache/yarn
# Patches
sed -i 's/gatesgarth/dunfell/g' layers/meta-jupyter/conf/layer.conf

# Download locations are being ignored and we are running out of space, so
# for now just create a symlink from /volumes/cache to ~/.cache which is
# externally mounted to S3.
mkdir -p /volumes/cache/
mkdir -p ~/.cache/
ln -sf /volumes/cache/electron ~/.cache/electron
ln -sf /volumes/cache/yarn ~/.cache/yarn
ln -sf /volumes/cache ~/.cache

BB_NUMBER_THREADS=$(nproc) bitbake ${TARGET} "$@"
exit $?

0 comments on commit 0674367

Please sign in to comment.