1
0
mirror of https://git.openwrt.org/feed/packages.git synced 2024-06-15 11:53:59 +02:00
openwrt-packages/lang/python/python/patches/010-do-not-add-rt-lib-dirs-when-cross-compiling.patch
Alexandru Ardelean 68312f49c0 python packages: move all things python under lang/python
I admit this may be be a bit aggressive, but the lang
folder is getting cluttered/filled up with Python, PHP, Perl,
Ruby, etc. packages.

Makes sense to try to group them into per-lang folders.

I took the Pythons.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2017-05-17 16:51:14 +03:00

16 lines
821 B
Diff

diff --git a/setup.py b/setup.py
index 7868b7b..544fa7e 100644
--- a/setup.py
+++ b/setup.py
@@ -452,8 +452,9 @@ class PyBuildExt(build_ext):
# directly since an inconsistently reproducible issue comes up where
# the environment variable is not set even though the value were passed
# into configure and stored in the Makefile (issue found on OS X 10.3).
+ rt_lib_dirs = [] if cross_compiling else self.compiler.runtime_library_dirs
for env_var, arg_name, dir_list in (
- ('LDFLAGS', '-R', self.compiler.runtime_library_dirs),
+ ('LDFLAGS', '-R', rt_lib_dirs),
('LDFLAGS', '-L', self.compiler.library_dirs),
('CPPFLAGS', '-I', self.compiler.include_dirs)):
env_val = sysconfig.get_config_var(env_var)