Navigation Menu

Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.

python3 has wrong LINKFORSHARED in module sysconfig #37923

Closed
tnilanon opened this issue Mar 20, 2015 · 5 comments
Closed

python3 has wrong LINKFORSHARED in module sysconfig #37923

tnilanon opened this issue Mar 20, 2015 · 5 comments
Assignees

Comments

@tnilanon
Copy link
Contributor

I have python3 built by Homebrew with --with-quicktest.
When run:

import distutils.sysconfig
distutils.sysconfig.get_config_var('LINKFORSHARED')

it returns '-Wl,-stack_size,1000000 -framework CoreFoundation Python.framework/Versions/3.4/Python'

I have graph-tool's configure script that calls this method. Then it looks for Python.framework/Versions/3.4/Python in /System/Library/Frameworks. This directory does not exist since it is in #{HOMEBREW_PREFIX}/Cellar/python3/3.4.3/Frameworks instead.

Please advise. I think sysconfig is not supposed to return these settings.

@tnilanon
Copy link
Contributor Author

Nevermind. Seems to be an outdated method: http://bugs.python.org/issue3588

@mistydemeo
Copy link
Member

Closing based on the upstream report - thanks!

@tdsmith tdsmith reopened this Mar 20, 2015
@tdsmith
Copy link
Contributor

tdsmith commented Mar 20, 2015

We try to fix this in siteconfig; it looks like we're failing, so I'd like to fix it, even if other tools should know better.

@tdsmith
Copy link
Contributor

tdsmith commented Mar 20, 2015

I guess the mechanism changed:

>>> _sysconfigdata.build_time_vars["LINKFORSHARED"]
'-u _PyMac_Error /usr/local/opt/python3/Frameworks/Python.framework/Versions/3.5/Python'
>>> import distutils.sysconfig
>>> distutils.sysconfig.get_config_var("LINKFORSHARED")
'-Wl,-stack_size,1000000  -framework CoreFoundation Python.framework/Versions/3.5/Python'

It looks like we should inreplace /usr/local/opt/python3/Frameworks/Python.framework/Versions/3.5/lib/python3.5/config-3.5m/Makefile instead of doing tricks in siteconfig.

@tdsmith tdsmith self-assigned this Mar 20, 2015
@tnilanon
Copy link
Contributor Author

Thanks for taking care of this

tdsmith added a commit to tdsmith/homebrew that referenced this issue Mar 23, 2015
@Homebrew Homebrew locked and limited conversation to collaborators Jul 10, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants