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 4 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

-- 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
Copy link
Member

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

Copy link
Member

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


package:add("deps", "python 3.x", {configs = {
headeronly = python_headeronly,
}})
Copy link
Member

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
Copy link
Member

Choose a reason for hiding this comment

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

不支持返回 false,直接返回 return 就行了

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