Skip to content

Commit

Permalink
patches: Remove native code from setup.py
Browse files Browse the repository at this point in the history
This patch to setup.py prevents pip from trying to compile the C/C++
shapely sources when building the Unikraft Python rootfs, since we never
make use of these compiled files.
This prevents build failures when the host system lacks dev files for
shapely dependencies.

Signed-off-by: Andrei Tatar <andrei@unikraft.io>
Reviewed-by: Stefan Jumarea <stefanjumarea02@gmail.com>
Reviewed-by: Maria Sfiraiala <maria.sfiraiala@gmail.com>
Reviewed-by: Radu Nichita <radunichita99@gmail.com>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
GitHub-Closes: #1
  • Loading branch information
andreittr authored and razvand committed Aug 17, 2023
1 parent ae3a45d commit 4d148c0
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions patches/0002-setup.py-Remove-natively-compiled-modules.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
From d977931bcff5ccbcd208835937830170c8d58870 Mon Sep 17 00:00:00 2001
From: Andrei Tatar <andrei@unikraft.io>
Date: Fri, 11 Aug 2023 21:39:26 +0200
Subject: [PATCH 2/2] setup.py: Remove natively-compiled modules

This change removes any reference to C/C++ modules as well as any
cythonized sources from setup.py, since Unikraft handles building these
modules. Thus, only python files will be installed by pip.

Signed-off-by: Andrei Tatar <andrei@unikraft.io>
---
setup.py | 1 -
1 file changed, 1 deletion(-)

diff --git a/setup.py b/setup.py
index 8253ff6..42b3aa9 100644
--- a/setup.py
+++ b/setup.py
@@ -211,6 +211,5 @@ cmdclass["build_ext"] = build_ext
# see pyproject.toml for static project metadata
setup(
version=versioneer.get_version(),
- ext_modules=ext_modules,
cmdclass=cmdclass,
)
--
2.41.0

0 comments on commit 4d148c0

Please sign in to comment.