-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
opentrons-ot3-image: Add python3 pip module so users can install pyth…
…on packages. (#104)
- Loading branch information
Showing
5 changed files
with
28 additions
and
1 deletion.
There are no files selected for viewing
2 changes: 2 additions & 0 deletions
2
layers/meta-opentrons/recipes-devtools/python3-pip/files/pip.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[install] | ||
root = /var/user-packages |
2 changes: 2 additions & 0 deletions
2
layers/meta-opentrons/recipes-devtools/python3-pip/files/user-packages.pth
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Add the path to the rw package directory in /var | ||
/var/user-packages/usr/lib/python3.8/site-packages/ |
21 changes: 21 additions & 0 deletions
21
layers/meta-opentrons/recipes-devtools/python3-pip/python3-pip_%.bbappend
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
FILESEXTRAPATHS_prepend := "${THISDIR}/files:" | ||
|
||
SRC_URI_append += "\ | ||
file://pip.conf \ | ||
file://user-packages.pth \ | ||
" | ||
|
||
do_install_append() { | ||
# install pip config file to set the package install dir to a read/write part of the rootfs | ||
install -d ${D}/${sysconfdir} | ||
install -m 644 ${WORKDIR}/pip.conf ${D}/${sysconfdir}/pip.conf | ||
|
||
# install pth file so python knows where to find user installed packages | ||
install -d ${D}/${libdir} | ||
install -m 644 ${WORKDIR}/user-packages.pth ${D}/${libdir}/python3.8/site-packages/ | ||
} | ||
|
||
FILES_${PN} += "\ | ||
${sysconfdir}/pip.conf \ | ||
${libdir}/user-packages.pth \ | ||
" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters