Skip to content

Wheel builderホイールビルダー


A wheel is a binary distribution of a Python package that can be installed directly into an environment.ホイールは、環境に直接インストールできるPythonパッケージのバイナリ配布です。

Configuration設定

The builder plugin name is wheel.ビルダープラグイン名はwheelです。

[tool.hatch.build.targets.wheel]
[build.targets.wheel]

Optionsオプション

Optionオプション Defaultデフォルト Description説明
core-metadata-versioncore-metadata-version "2.4""2.4" The version of core metadata to useコアメタデータのバージョンを使用
shared-datashared-data A mapping similar to the forced inclusion option corresponding to the data subdirectory within the standard data directory that will be installed globally in a given Python environment, usually under sys.prefix標準のデータディレクトリ内のdataサブディレクトリに対応する、強制的な含有オプションに似たマッピングで、特定のPython環境にグローバルにインストールされ、通常はsys.prefixの下に配置されます。
shared-scriptsshared-scripts A mapping similar to the forced inclusion option corresponding to the scripts subdirectory within the standard data directory that will be installed in a given Python environment, usually under Scripts on Windows or bin otherwise, and would normally be available on PATH標準のデータディレクトリ内のscriptsサブディレクトリに対応する、強制的な含有オプションに似たマッピングで、特定のPython環境にインストールされ、通常はWindowsではScriptsの下に、その他のOSではbinの下に配置され、通常はPATH上で利用可能です。
extra-metadataextra-metadata A mapping similar to the forced inclusion option corresponding to extra metadata that will be shipped in a directory named extra_metadataディレクトリ名extra_metadataに含まれる追加のメタデータに対応する、強制的な含有オプションに似たマッピングです。
strict-namingstrict-naming truetrue Whether or not file names should contain the normalized version of the project nameファイル名にプロジェクト名の正規化されたバージョンを含めるべきかどうか
macos-max-compatmacos-max-compat falsefalse Whether or not on macOS, when build hooks have set the infer_tag build data, the wheel name should signal broad support rather than specific versions for newer SDK versions.

Note: This option will eventually be removed.
macOSであるかどうかにかかわらず、ビルドフックがinfer_tag ビルドデータを設定している場合、ホイール名は新しいSDKバージョンに対する特定のバージョンではなく、広範なサポートを示すべきです。

注意: このオプションは最終的に削除される予定です。
bypass-selectionbypass-selection falsefalse Whether or not to suppress the error when one has not defined any file selection options and all heuristics have failed to determine what to shipファイル選択オプションを定義しておらず、すべてのヒューリスティックが出荷するものを決定できなかった場合にエラーを抑制するかどうか
sbom-filessbom-files A list of paths to Software Bill of Materials files that will be included in the .dist-info/sboms/ directory of the wheelソフトウェア部品表ファイルへのパスのリストで、ホイールの.dist-info/sboms/ディレクトリに含まれます。

Versionsバージョン

Versionバージョン Description説明
standard (default)standard (デフォルト) The latest standardized format最新の標準化されたフォーマット
editableeditable A wheel that only ships .pth files or import hooks for real-time development.pthファイルまたはリアルタイム開発用のインポートフックのみを出荷するホイール

Default file selectionデフォルトファイル選択

When the user has not set any file selection options, the project name will be used to determine the package to ship in the following heuristic order:ユーザーが< a href="../../../config/build/index.html#file-selection">ファイル選択オプションを設定していない場合、プロジェクト名が次のヒューリスティック順序で出荷するパッケージを決定するために使用されます:

  1. <NAME>/__init__.py<NAME>/__init__.py
  2. src/<NAME>/__init__.pysrc/<NAME>/__init__.py
  3. <NAME>.py<NAME>.py
  4. <NAMESPACE>/<NAME>/__init__.py<NAMESPACE>/<NAME>/__init__.py

If none of these heuristics are satisfied, an error will be raised.これらのヒューリスティックのいずれも満たされない場合、エラーが発生します。

Reproducibility再現性

Reproducible builds are supported.再現可能なビルドがサポートされています。

Build dataビルドデータ

This is data that can be modified by build hooks.これはビルドフックによって変更可能なデータです。

Dataデータ Defaultデフォルト Description説明
tagtag The full tag part of the filename (e.g. py3-none-any), defaulting to a cross-platform wheel with the supported major versions of Python based on project metadataファイル名の完全なtag部分(例:py3-none-any)で、プロジェクトメタデータに基づいてサポートされている主要バージョンのPythonを使用したクロスプラットフォームのホイールにデフォルト設定されています。
infer_taginfer_tag FalseFalse When tag is not set, this may be enabled to use the one most specific to the platform, Python interpreter, and ABItagが設定されていない場合、プラットフォーム、Pythonインタプリタ、およびABIに最も特化したものを使用するためにこれを有効にすることができます。
pure_pythonpure_python TrueTrue Whether or not to write metadata indicating that the package does not contain any platform-specific filesパッケージにプラットフォーム固有のファイルが含まれていないことを示すメタデータを書き込むかどうか
dependenciesdependencies Extra project dependencies追加のプロジェクト依存関係
shared_datashared_data Additional shared-data entries, which take precedence in case of conflicts競合が発生した場合に優先される追加の shared-data エントリ
shared_scriptsshared_scripts Additional shared-scripts entries, which take precedence in case of conflicts競合が発生した場合に優先される追加の shared-scripts エントリ
extra_metadataextra_metadata Additional extra-metadata entries, which take precedence in case of conflicts競合が発生した場合に優先される追加の extra-metadata エントリ
force_include_editableforce_include_editable Similar to the force_include option but specifically for the editable version and takes precedenceforce_include オプション に似ていますが、特に editable バージョン に対して適用され、優先されます
sbom_filessbom_files This is a list of the sbom files that should be included under .dist-info/sboms.これは、.dist-info/sbomsの下に含めるべきsbomファイルのリストです。