[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Minios-devel] [UNIKRAFT/PYTHON3 PATCH v3 11/14] Makefile.uk: Add rule for creating root filesystem


  • To: minios-devel@xxxxxxxxxxxxx
  • From: Costin Lupu <costin.lupu@xxxxxxxxx>
  • Date: Mon, 23 Sep 2019 12:58:49 +0300
  • Cc: felipe.huici@xxxxxxxxx, vlad_andrei.badoiu@xxxxxxxxxxxxxxx
  • Delivery-date: Mon, 23 Sep 2019 09:59:15 +0000
  • Ironport-phdr: 9a23:bcAoCxOFaTl3QC9DA04l6mtUPXoX/o7sNwtQ0KIMzox0I//4rarrMEGX3/hxlliBBdydt6sfzbCG+Pq4ESxYuNDd6SpEKMQNHzY+yuwu1zQ6B8CEDUCpZNXLVAcdWPp4aVl+4nugOlJUEsutL3fbo3m18CJAUk6nbVk9Kev6AJPdgNqq3O6u5ZLTfx9IhD2gar9uMRm6twrcutQYjId4NKo8yRTFrmVUd+9LwW9kOU+fkwzz68ut4pJv6Thct+4k+8VdTaj0YqM0QKBCAj87KW41/srrtRfCTQuL+HQRV3gdnwRLDQbY8hz0R4/9vSTmuOVz3imaJtD2QqsvWTu+9adrSQTnhzkBOjUk7WzYkM1wjKZcoBK8uxxyxpPfbY+JOPZieK7WYNUXTndDUMlMTSxMGoOyYZUSAeQPPuhWqIvyp1UVoBeiGQWhHv/jxyVUinPq26AxzuQvERvB3AwlB98DrnPUrM7pNKcTV+C+0a/GzSjbb/NLxDzw75THchc6ofGQXLJwd9DdyU0yFwPdk1WdspDqPyiP2uQVrmiU9PBsVfioi2M+rQx6vzuhxt80h4XUiY8Z10rI+CZ5zYovO9G0Vkx2bcSqHZdIqi2XOJZ6TtkhTmxooio21LMLtJChcCQXx5kr2RjSYOGdfYeS+BLsTuORLC99hHJiZb2wmQ6/8VOlyu3gTsm010tKrjZdntnMqH8N0xvT59CZSvt45Eih2DKP2xrP5eFfO0w0jbfbJIU7zr4qkZofqUXDHinol0XqlKKaa0op9vWy5+nkYrjqvIGQO5F2hw3kPKkigsm/Dv45MggKUWib4+O81Lj78ELlR7VKleE2kqjfsJzAIcQbu7a5AxJO34k/8BazFS+m0MkDknUdNlJFfwqLj5L1NFHWPPD4EfC/jkypkDdqwfDGP7rhAo7UInfejrjhY6hy60pHxQo3zNBf/I5UCqobLPP8REDxssbUDhgjMwy72+znEsly1psCWWKTBa+UKK3SvkGM5uIuO+mDepUZuDbgK/gk+/HujGQ0mVkDcqa12ZsYcmu3Eu54LEWEeXDsmMsOEX8WvgoiS+znkEOCUTpJaHmvR60z/Dc7B5+8DYjdR4ChmqeO0z2mEZ1RZ2BGF0uBEWz0d4WZRvgAcjidLdN6kjAeSLihU5Qu2Qu0tA/9mPJbKb/R+ysZsomm2NVr6un7kRAp6ScyH8mblWaXQDJahGQNEhQxx7x+pwRZ10+emfxzhOdEFNoV4+5RTy8xLtjE0uY8EdekCVGJRcuAVFvzGobuOjo2VN9km9I=
  • Ironport-sdr: 22Uh2ygMaD8Xy4ma9sIb/1IBRmZOMaJYT7ugYSpK7Zl0yGVAWYTj7MK7M7wgw9JmCc38X+KTOk LJgwq3MNtMng==
  • List-id: Mini-os development list <minios-devel.lists.xenproject.org>

The Python interpreter needs a filesystem where to keep its libraries. This
patch creates a Python virtual environment and installs the Python 3 standard
library in /lib/python3.7 directory. For creating the filesystem the following
command has to be run:

$ make python-rootfs path=<directory>

Signed-off-by: Costin Lupu <costin.lupu@xxxxxxxxx>
---
 Makefile.uk | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/Makefile.uk b/Makefile.uk
index dc6e4ad..8bc3acd 100644
--- a/Makefile.uk
+++ b/Makefile.uk
@@ -464,3 +464,24 @@ LIBPYTHON3_PREPARED_DEPS = \
 $(LIBPYTHON3_BUILD)/.prepared: $(LIBPYTHON3_PREPARED_DEPS)
 
 UK_PREPARE += $(LIBPYTHON3_BUILD)/.prepared
+
+################################################################################
+# Root filesystem
+################################################################################
+
+# Build root filesystem for Python interpreter
+PYTHON_ROOTFS = $(APP_BASE)/$(path)
+
+# Create virtual environment
+$(PYTHON_ROOTFS)/.keep:
+       python3 -m venv $(PYTHON_ROOTFS) && touch $@
+
+# Configure origin
+$(LIBPYTHON3_SRC)/config.status:
+       cd $(LIBPYTHON3_SRC) && ./configure --prefix=$(shell realpath 
$(APP_BASE)/$(path))
+
+# Install Python standard library into virtual environment
+.PHONY: python-rootfs
+python-rootfs: $(PYTHON_ROOTFS)/.keep $(LIBPYTHON3_SRC)/config.status
+       cd $(LIBPYTHON3_SRC) && make libinstall
+       cp $(LIBPYTHON3_BASE)/_sysconfigdata.py $(PYTHON_ROOTFS)/lib/python3.7/
-- 
2.20.1


_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.