-
-
Notifications
You must be signed in to change notification settings - Fork 396
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Python: If headeronly is set, links is not needed #5403
base: dev
Are you sure you want to change the base?
Conversation
不要提交到 master,我默认分支都切到 dev 了,就是为了避免误提交,怎么还往 master 提 |
Don't submit to master. By default, I have switched branches to dev just to avoid mistaken submissions. Why do I still submit to master? |
因为那个 fork 是很早做的, 还在 master. 已经修改到了 dev |
Because that fork was done very early and is still on master |
不要带中文 commit |
Don’t bring Chinese commit |
-- Linking libpythonX.Y.so is not allowed on manylinux, which is the base image for distributing C extensions. | ||
|
||
-- see https://gitlab.kitware.com/cmake/cmake/-/issues/20425 and | ||
-- https://peps.python.org/pep-0513/#libpythonx-y-so-1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
还是太长,全删了,只需要保留一个 issue link
|
||
-- see https://gitlab.kitware.com/cmake/cmake/-/issues/20425 and | ||
-- https://peps.python.org/pep-0513/#libpythonx-y-so-1 | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
空行去了
local python_headeronly = package:config("python_headeronly") | ||
if is_host("windows") then | ||
wprint("Python headeronly is not supported on Windows") | ||
python_headeronly = false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
如果 windows 不支持,应该 add_configs 时候,直接设置为 readonly = true, default = false
锁定住,原本就会自动给 warning 。。不用额外检测
|
||
package:add("deps", "python 3.x", {configs = { | ||
headeronly = python_headeronly, | ||
}}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
改成一行
result.linkdirs = libpath.linkdir | ||
end | ||
if not includepath then | ||
return false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
不支持返回 false,直接返回 return
就行了
Linking libpythonX.Y.so is not allowed on manylinux. So I change the Python fetch logic to allow building without libdir on manylinux.
#5391