Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix library qualified name on windows#19

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
timkpaine merged 1 commit intomainfromtkp/hf
Jan 13, 2025
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletionshatch_cpp/plugin.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -83,8 +83,5 @@ def initialize(self, version: str, build_data: dict[str, t.Any]) -> None:

# force include libraries
for library in libraries:
if build_plan.platform.platform == "win32":
suffix = "dll"
else:
suffix = "so"
build_data["force_include"][f"{library.name}.{suffix}"] = f"{library.name}.{suffix}"
name = library.get_qualified_name(build_plan.platform.platform)
build_data["force_include"][name] = name
9 changes: 9 additions & 0 deletionshatch_cpp/structs.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -52,6 +52,15 @@
export_symbols: List[str] = Field(default_factory=list, alias="export-symbols")
depends: List[str] = Field(default_factory=list)

def get_qualified_name(self, platform):
if platform == "win32":
suffix = "dll" if self.binding == "none" else "pyd"
elif platform == "darwin" and self.binding == "none":
suffix = "dylib"

Check warning on line 59 in hatch_cpp/structs.py

View check run for this annotation

Codecov/ codecov/patch

hatch_cpp/structs.py#L59

Added line #L59 was not covered by tests
else:
suffix = "so"
return f"{self.name}.{suffix}"


class HatchCppPlatform(BaseModel):
cc: str
Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp