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

Form wheel name#16

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/wheel
Jan 13, 2025
Merged
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
17 changes: 16 additions & 1 deletionhatch_cpp/plugin.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -2,6 +2,8 @@

import logging
import os
import platform as sysplatform
import sys
import typing as t

from hatchling.builders.hooks.plugin.interface import BuildHookInterface
Expand All@@ -18,7 +20,7 @@
PLUGIN_NAME = "hatch-cpp"
_logger = logging.getLogger(__name__)

def initialize(self, version: str,_: dict[str, t.Any]) -> None:
def initialize(self, version: str,build_data: dict[str, t.Any]) -> None:
"""Initialize the plugin."""
# Log some basic information
self._logger.info("Initializing hatch-cpp plugin version %s", version)
Expand All@@ -30,6 +32,19 @@
self._logger.info("ignoring target name %s", self.target_name)
return

build_data["pure_python"] = False
machine = sysplatform.machine()
version_major = sys.version_info.major
version_minor = sys.version_info.minor
# TODO abi3
if "darwin" in sys.platform:
os_name = "macosx_11_0"
elif "linux" in sys.platform:
os_name = "linux"
else:
os_name = "win"

Check warning on line 45 in hatch_cpp/plugin.py

View check run for this annotation

Codecov/ codecov/patch

hatch_cpp/plugin.py#L45

Added line #L45 was not covered by tests
build_data["tag"] = f"cp{version_major}{version_minor}-cp{version_major}{version_minor}-{os_name}_{machine}"

# Skip if SKIP_HATCH_CPP is set
# TODO: Support CLI once https://github.com/pypa/hatch/pull/1743
if os.getenv("SKIP_HATCH_CPP"):
Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp