fix patching of hardcoded paths in Python's setup.py for older Python versions when EasyBuild is configured with --sysroot#2149
Merged
ocaisa merged 2 commits intoeasybuilders:developfrom Sep 1, 2020
Conversation
… versions when EasyBuild is configured with --sysroot
0e237c7 to
718387e
Compare
ocaisa
reviewed
Sep 1, 2020
Member
ocaisa
left a comment
There was a problem hiding this comment.
Not sure this is working with Python 3.5.1:
alanc@~/chicken$ diff ../.local/easybuild/build/Python/3.7.4/GCCcore-8.3.0/Python-3.7.4/setup.py Python-3.7.4/setup.py
641,642c641,642
< system_lib_dirs = ['/lib64', '/usr/lib64', '/lib', '/usr/lib']
< system_include_dirs = ['/usr/include']
---
> system_lib_dirs = ['/home/alanc/chicken/lib']
> system_include_dirs = ['/home/alanc/chicken/include']
alanc@~/chicken$ diff ../.local/easybuild/build/Python/3.8.2/GCCcore-9.3.0/Python-3.8.2/setup.py Python-3.8.2/setup.py
673,674c673,674
< system_lib_dirs = ['/lib64', '/usr/lib64', '/lib', '/usr/lib']
< system_include_dirs = ['/usr/include']
---
> system_lib_dirs = ['/home/alanc/chicken/lib']
> system_include_dirs = ['/home/alanc/chicken/include']
alanc@~/chicken$ diff ../.local/easybuild/build/Python/3.6.4/foss-2017a/Python-3.6.4/setup.py Python-3.6.4/setup.py
572,573c572,573
< system_lib_dirs = ['/lib64', '/usr/lib64', '/lib', '/usr/lib']
< system_include_dirs = ['/usr/include']
---
> system_lib_dirs = ['/home/alanc/chicken/lib']
> system_include_dirs = ['/home/alanc/chicken/include']
alanc@~/chicken$ diff ../.local/easybuild/build/Python/3.5.1/foss-2016a/Python-3.5.1/setup.py Python-3.5.1/setup.py
529,530c529,530
< '/lib64', '/usr/lib64',
< '/lib', '/usr/lib',
---
> '/home/alanc/chicken/lib',
>
…y for older Python 3.x versions when using --sysroot
Member
Author
|
@ocaisa fixed with extra regex in 53b9f13: $ diff -u Python-3.5.1/setup.py /tmp/easybuild_build/Python/3.5.1/foss-2016a/Python-3.5.1/setup.py
--- Python-3.5.1/setup.py 2015-12-07 02:39:11.000000000 +0100
+++ /tmp/easybuild_build/Python/3.5.1/foss-2016a/Python-3.5.1/setup.py 2020-09-01 15:12:08.627181937 +0200
@@ -526,10 +526,10 @@
# be assumed that no additional -I,-L directives are needed.
if not cross_compiling:
lib_dirs = self.compiler.library_dirs + [
- '/lib64', '/usr/lib64',
- '/lib', '/usr/lib',
+ '/tmp/lizard/lib64', '/tmp/lizard/lib',
+
]
- inc_dirs = self.compiler.include_dirs + ['/usr/include']
+ inc_dirs = self.compiler.include_dirs + ['/tmp/lizard/include']
else:
lib_dirs = self.compiler.library_dirs[:]
inc_dirs = self.compiler.include_dirs[:] |
ocaisa
approved these changes
Sep 1, 2020
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
(created using
eb --new-pr)#2148 was incomplete, a different approach is required for Python versions older than 3.6...