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

[Minios-devel] [UNIKRAFT/PYTHON3 PATCH v2 10/13] Makefile.uk: Add rule for creating root filesystem


  • To: minios-devel@xxxxxxxxxxxxx
  • From: Costin Lupu <costin.lupu@xxxxxxxxx>
  • Date: Mon, 23 Sep 2019 12:47:11 +0300
  • Cc: felipe.huici@xxxxxxxxx, vlad_andrei.badoiu@xxxxxxxxxxxxxxx
  • Delivery-date: Mon, 23 Sep 2019 09:47:59 +0000
  • Ironport-phdr: 9a23:PqlhMxyOfHGu1qjXCy+O+j09IxM/srCxBDY+r6Qd2ukVIJqq85mqBkHD//Il1AaPAdyAragUwLOG++C4ACpcuMzH6ChDOLV3FDY9wf0MmAIhBMPXQWbaF9XNKxIAIcJZSVV+9Gu6O0UGUOz3ZlnVv2HgpWVKQka3OgV6PPn6FZDPhMqrye+y54fTYwJVjzahfL9+Nhq7oRjfu8UMn4dvKak9xgbKr3BVf+ha2X5kKUickhrh+Mu85oJv/zhVt/k868NOTKL2crgiQ7dFFjomKWc15MPqtRnHUwSC42YXX3sVnBRVHQXL9Qn2UZjtvCT0sOp9wzSaMtbtTb8oQzSi7rxkRwHuhSwaKjM26mDXish3jKJGvBKsogF0zoDIbI2JMvd1Y6XQds4YS2VcRMZcTyxPDJ2hYYUBDOQPOuRXr4fmqlcSsRezHxWgCfnzxjNUgHL9wK000/4mEQHDxAEtAdUOsG/IrNX0MqcZTOa7zLTQzTXecvhb3ivy6I/TchA9oPGMW6h8cc7MyUk3CgPIlUmfqZf/MzONy+QCqHKX7/BnVe+2jWMstgJ/oiC3y8sxhYTFm5gZx1PE+Clj3oo5O9+1RFR1bNK8DZdduDyWO5F1T84iWW1kpig3x7MctZKmcyUG1pIqzAPFZfOdaYiH+BfjWf6UITd/mX1qZqqyhw238Ui80u38UdS00EpSoipFjNbMsncN2gTN6siCUPR9/0Oh1SyT2ADI8O1EOV00mrHBJ547xb48jpsTsULdES/qgEj6kaCbelg+9uWr6+nreKvqqoGeOoNuhAzyKqEulda+AeQ8PAgORW+b+eGk2bL/+k35W6lKjvwwkqXDtJDaONwbprOiDgBJyYYv8Q6/Dyq939gCh3kHK0pJeAibgIjxJ1HOPPf4AO+6g1StljdrxvfGPqb4DprQMHfDjqnufbJm5k5YyQoz1sxf54lOBrAOPv3zXFX9tNvCDh82Kwa02froCM1h1oMCXmKCGqGZP73WsV+J/uIgPfOAZI8IuDb8N/cl5uXjjXknllABeammx4AYZGqmEfR7O0+Ze2bjgs8dEWcWuQozVPLqiFmYXjFOf3m9RaQ86SwhCI24DIfPXJuij6ac0ye8H51We3tLCkuQEXf1aoqIQe0DZz6JIsN7jzwETaOuR5U71RGp50fGzO9iL+zV/TZduZ/92dxd4+zIiQp05TFyScOH3DKjVWZxy0gPXCM32uhbvFRgggOI1rNkgvoeEcFL+ttCSUEiKJSa1essWIO6YR7IYtrcEAXued6hGzxkFt8=
  • Ironport-sdr: KnXsHixe3AIU5qXUv6QOzswOr8WKBl/x9fTUDexB3BBFjq1mMxMjahdmasrsqKe4qgzo2obPTQ b9BEcU0TTEmQ==
  • 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®.