Skip to content

Commit e913c1b

Browse files
authored
meta-opentrons: fix some python handling (#119)
* fix: new deps for hatch builds * one more dep * and cython * handle explict pardir relative paths in packages
1 parent 9eef29d commit e913c1b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

layers/meta-opentrons/classes/pipenv_app_bundle.bbclass

+4-4
Original file line numberDiff line numberDiff line change
@@ -97,19 +97,19 @@ python do_rewrite_requirements() {
9797
bb.debug(1, 'Checking ' + plainname)
9898

9999
if line.startswith('--index-url'): pypi.append(line)
100-
elif line.startswith('--editable') or line.startswith('./'):
100+
elif line.startswith('--editable') or (line.startswith('./') or line.startswith('../')):
101101
# an editable probably-local package
102102
if line.startswith('--editable'):
103103
working = line.split('--editable')[-1].strip()
104104
else:
105105
working = line.strip()
106-
if not working.startswith('./'):
106+
if not (working.startswith('./') or working.startswith('../')):
107107
bb.debug(1, 'Skipping {}'.format(line))
108108
continue
109109
working = d.getVar('PIPENV_APP_BUNDLE_PROJECT_ROOT') + '/' + working
110110
local.append(working)
111111
bb.debug(1, 'Rewrote local path to ' + working)
112-
elif not line.startswith('.') and not '://' in line:
112+
elif not (line.startswith('.') or line.startswith('../')) and not '://' in line:
113113
# This is a package from pypi; check if it's global
114114
first_nonalpha = [c for c in line if c in '=~^<>']
115115
pkgname = line.split(first_nonalpha[0])[0] if first_nonalpha else line
@@ -159,7 +159,7 @@ do_compile () {
159159

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

164164

165165
${PIP_ENVARGS} PYTHONPATH=${B}/pip-buildenv:${PYTHONPATH} ${PYTHON} -m pip install \

0 commit comments

Comments
 (0)