Skip to content
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

Open
wants to merge 7 commits into
base: dev
Choose a base branch
from

Conversation

myuanz
Copy link
Contributor

@myuanz myuanz commented Oct 2, 2024

Linking libpythonX.Y.so is not allowed on manylinux. So I change the Python fetch logic to allow building without libdir on manylinux.

#5391

@waruqi
Copy link
Member

waruqi commented Oct 2, 2024

不要提交到 master,我默认分支都切到 dev 了,就是为了避免误提交,怎么还往 master 提

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


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?

@myuanz myuanz changed the base branch from master to dev October 2, 2024 15:08
@myuanz
Copy link
Contributor Author

myuanz commented Oct 2, 2024

因为那个 fork 是很早做的, 还在 master. 已经修改到了 dev

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


Because that fork was done very early and is still on master

@waruqi waruqi closed this Oct 2, 2024
@waruqi waruqi reopened this Oct 2, 2024
@waruqi waruqi requested a review from xq114 October 2, 2024 15:12
packages/p/python/fetch.lua Outdated Show resolved Hide resolved
packages/p/python/fetch.lua Outdated Show resolved Hide resolved
@waruqi
Copy link
Member

waruqi commented Oct 3, 2024

不要带中文 commit

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


Don’t bring Chinese commit

local python_headeronly = package:config("python_headeronly")
if is_host("windows") then
wprint("Python headeronly is not supported on Windows")
python_headeronly = false
Copy link
Member

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 。。不用额外检测

Copy link
Contributor Author

Choose a reason for hiding this comment

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

这个我不太清楚怎么做到,add_configs能对不同的操作系统限制吗?Linux 下,如果想要嵌入,还是要 link Python 的

Copy link
Member

Choose a reason for hiding this comment

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

参考下。

    if is_plat("windows", "mingw") then
        -- Do not build static library for window.
        add_configs("shared", {description = "Build shared library.", default = true, type = "boolean", readonly = true})
        add_configs("vs_runtime", {description = "Set vs compiler runtime.", default = "MD", readonly = true})
    end

Copy link
Contributor Author

Choose a reason for hiding this comment

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

我改好了,请看以下这样可否

packages/p/python/fetch.lua Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants