Skip to content

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
boegel:20200831200311_new_pr_vTYaLeLiwV
Sep 1, 2020
Merged

fix patching of hardcoded paths in Python's setup.py for older Python versions when EasyBuild is configured with --sysroot#2149
ocaisa merged 2 commits intoeasybuilders:developfrom
boegel:20200831200311_new_pr_vTYaLeLiwV

Conversation

@boegel
Copy link
Copy Markdown
Member

@boegel boegel commented Aug 31, 2020

(created using eb --new-pr)

#2148 was incomplete, a different approach is required for Python versions older than 3.6...

… versions when EasyBuild is configured with --sysroot
@boegel boegel force-pushed the 20200831200311_new_pr_vTYaLeLiwV branch from 0e237c7 to 718387e Compare August 31, 2020 18:23
@boegel boegel added this to the next release (4.3.0) milestone Aug 31, 2020
@boegel boegel added bug fix EESSI Related to EESSI project labels Aug 31, 2020
@boegel boegel requested a review from ocaisa August 31, 2020 18:32
Copy link
Copy Markdown
Member

@ocaisa ocaisa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
@boegel
Copy link
Copy Markdown
Member Author

boegel commented Sep 1, 2020

@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[:]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug fix EESSI Related to EESSI project

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants