GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — python-docs-ja/using/ios.po at 3.12 · python/python-docs-ja Expand file tree/ Copy pathios.poMore file actions 828 lines (742 loc) · 41.1 KB / Copy pathios.poFile metadata and controls828 lines (742 loc) · 41.1 KB 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 # SOME DESCRIPTIVE TITLE. # Copyright (C) 2001 Python Software Foundation # This file is distributed under the same license as the Python package. # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. # # Translators: # tomo, 2024 # 石井明久, 2024 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2025-05-09 14:19+0000\n" "PO-Revision-Date: 2024-05-11 01:08+0000\n" "Last-Translator: 石井明久, 2024\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" "ja/)\n" "Language: ja\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" #: ../../using/ios.rst:5 msgid "Using Python on iOS" msgstr "iOS で Python を使う" #: ../../using/ios.rst:0 msgid "Authors" msgstr "著者" #: ../../using/ios.rst:8 msgid "Russell Keith-Magee (2024-03)" msgstr "Russell Keith-Magee (2024-03)" #: ../../using/ios.rst:10 msgid "" "Python on iOS is unlike Python on desktop platforms. On a desktop platform, " "Python is generally installed as a system resource that can be used by any " "user of that computer. Users then interact with Python by running a :program:" "`python` executable and entering commands at an interactive prompt, or by " "running a Python script." msgstr "" "iOS における Pythonは、デスクトッププラットフォームにおける Python とは異なり" "ます。 デスクトッププラットフォームでは、 Python は一般的にコンピューターのど" "のユーザーでも使えるシステムリソースとしてインストールされます。そして、ユー" "ザーは :program:`python` 実行可能ファイルを実行して対話型プロンプトにコマンド" "を入力したり、 Python スクリプトを実行したりして、 Python を使用することがで" "きるのです。" #: ../../using/ios.rst:16 msgid "" "On iOS, there is no concept of installing as a system resource. The only " "unit of software distribution is an \"app\". There is also no console where " "you could run a :program:`python` executable, or interact with a Python REPL." msgstr "" "iOS においては、システムリソースとしてのインストールという概念はありません。" "ソフトウェア配布が可能なのは、 \"アプリ\" だけです。また、 :program:`python` " "実行可能ファイルを実行したり、 Python の REPL を使用したりする、コンソールも" "存在しません。" #: ../../using/ios.rst:20 msgid "" "As a result, the only way you can use Python on iOS is in embedded mode - " "that is, by writing a native iOS application, and embedding a Python " "interpreter using ``libPython``, and invoking Python code using the :ref:" "`Python embedding API <embedding>`. The full Python interpreter, the " "standard library, and all your Python code is then packaged as a standalone " "bundle that can be distributed via the iOS App Store." msgstr "" "このため、 Python を iOS 上で使うただ一つの方法は、埋め込みモード、つまり、ネ" "イティブ iOS アプリケーションを書き、 ``libPython`` を使用して Python イン" "タープリタを埋め込み、そして :ref:`Python 埋め込み API <embedding>` を使用し" "て Python コードを呼び出すことです。 それにより、完全な Python インタープリ" "タ、標準ライブラリ、 及び Python のコードが、 iOS App Store を経由して配布可" "能なスタンドアローンなバンドルとしてパッケージ化されます。" #: ../../using/ios.rst:27 msgid "" "If you're looking to experiment for the first time with writing an iOS app " "in Python, projects such as `BeeWare <https://beeware.org>`__ and `Kivy " "<https://kivy.org>`__ will provide a much more approachable user experience. " "These projects manage the complexities associated with getting an iOS " "project running, so you only need to deal with the Python code itself." msgstr "" "もし、初めて iOS アプリを Python で書くことを試みているなら、 `BeeWare " "<https://beeware.org>`__ や `Kivy <https://kivy.org>`__ といったプロジェクト" "は、よりわかりやすいユーザー体験を提供するでしょう。これらのプロジェクトは " "iOS プロジェクトを実行することに関連する複雑なことを管理するので、あなたは " "Python のコードに集中するだけで良くなります。" #: ../../using/ios.rst:34 msgid "Python at runtime on iOS" msgstr "iOS ランタイムでの Python" #: ../../using/ios.rst:37 msgid "iOS version compatibility" msgstr "iOS のバージョン互換性" #: ../../using/ios.rst:39 msgid "" "The minimum supported iOS version is specified at compile time, using the :" "option:`--host` option to ``configure``. By default, when compiled for iOS, " "Python will be compiled with a minimum supported iOS version of 13.0. To use " "a different minimum iOS version, provide the version number as part of the :" "option:`!--host` argument - for example, ``--host=arm64-apple-ios15.4-" "simulator`` would compile an ARM64 simulator build with a deployment target " "of 15.4." msgstr "" "サポートされる最小の iOS バージョンは、コンパイル時に ``configure`` の :" "option:`--host` オプションを使用して指定できます。デフォルトでは、 iOS 用にコ" "ンパイルする場合、 Python は最小で 13.0 の iOS バージョンをサポートするように" "コンパイルされます。異なる最小 iOS バージョンを使用するには、 :option:`!--" "host` 引数の一部としてバージョン番号を提供します。例えば ``--host=arm64-" "apple-ios15.4-simulator`` とすると、 ARM64 シミュレーター用のビルドを " "Deployment Target 15.4 でコンパイルします。" #: ../../using/ios.rst:48 msgid "Platform identification" msgstr "プラットフォームの識別" #: ../../using/ios.rst:50 msgid "" "When executing on iOS, ``sys.platform`` will report as ``ios``. This value " "will be returned on an iPhone or iPad, regardless of whether the app is " "running on the simulator or a physical device." msgstr "" "iOS 上で実行している場合、 ``sys.platform`` は ``ios`` となります。アプリがシ" "ミュレーターで実行されているか、物理デバイスで実行されているかにかかわらず、 " "iPhone または iPad ではこの値となります。" #: ../../using/ios.rst:54 msgid "" "Information about the specific runtime environment, including the iOS " "version, device model, and whether the device is a simulator, can be " "obtained using :func:`platform.ios_ver`. :func:`platform.system` will report " "``iOS`` or ``iPadOS``, depending on the device." msgstr "" "iOS バージョンやデバイスのモデル、デバイスがシミュレーターであるかどうかを含" "めた、特定のランタイム環境についての情報は、 :func:`platform.ios_ver` を使用" "して取得できます。 :func:`platform.system` は、デバイスにより ``iOS`` または " "``iPadOS`` を報告します。" #: ../../using/ios.rst:59 msgid "" ":func:`os.uname` reports kernel-level details; it will report a name of " "``Darwin``." msgstr "" ":func:`os.uname` は、カーネルレベルの詳細を報告します。これは ``Darwin`` の名" "前を報告します。" #: ../../using/ios.rst:63 msgid "Standard library availability" msgstr "標準ライブラリの利用可能性" #: ../../using/ios.rst:65 msgid "" "The Python standard library has some notable omissions and restrictions on " "iOS. See the :ref:`API availability guide for iOS <mobile-availability>` for " "details." msgstr "" "Python の 標準ライブラリには、 iOS におけるいくつかの重要な省略や制限がありま" "す。詳細は :ref:`iOS 向けの API 利用可能性ガイド <mobile-availability>` を参" "照してください。" #: ../../using/ios.rst:70 msgid "Binary extension modules" msgstr "バイナリ拡張モジュール" #: ../../using/ios.rst:72 msgid "" "One notable difference about iOS as a platform is that App Store " "distribution imposes hard requirements on the packaging of an application. " "One of these requirements governs how binary extension modules are " "distributed." msgstr "" "プラットフォームとしての iOS についての重要な違いの一つは、 App Store での配" "布がアプリケーションのパッケージングに厳しい条件を課すということです。 これら" "の条件の一つは、バイナリ拡張モジュールの配布方法を規定します。" #: ../../using/ios.rst:76 msgid "" "The iOS App Store requires that *all* binary modules in an iOS app must be " "dynamic libraries, contained in a framework with appropriate metadata, " "stored in the ``Frameworks`` folder of the packaged app. There can be only a " "single binary per framework, and there can be no executable binary material " "outside the ``Frameworks`` folder." msgstr "" "iOS App Store では、 iOS アプリの全てのバイナリモジュールが、パッケージ化され" "たアプリの ``Frameworks`` フォルダに保存された、適切なメタデータ付きのフレー" "ムワークに含まれる動的ライブラリである必要があります。フレームワークごとにバ" "イナリは一つだけで、 ``Frameworks`` フォルダの外に実行可能バイナリデータを設" "置することはできません。" #: ../../using/ios.rst:82 msgid "" "This conflicts with the usual Python approach for distributing binaries, " "which allows a binary extension module to be loaded from any location on " "``sys.path``. To ensure compliance with App Store policies, an iOS project " "must post-process any Python packages, converting ``.so`` binary modules " "into individual standalone frameworks with appropriate metadata and signing. " "For details on how to perform this post-processing, see the guide for :ref:" "`adding Python to your project <adding-ios>`." msgstr "" "これは、バイナリ拡張モジュールが ``sys.path`` 上のどの場所からでも読み込み可" "能な、通常の Python のバイナリ配布のアプローチと衝突します。 確実に App " "Store ポリシーに従うために、 iOS プロジェクトはいずれの Python パッケージに" "も、 ``.so`` バイナリモジュールを、個別の、スタンドアローンで、適切なメタデー" "タと署名付きのフレームワークに変換する後処理を行わなければなりません。どのよ" "うに後処理を行うかの詳細は、 :ref:`プロジェクトに Python を追加する <adding-" "ios>` のガイドを参照してください。" #: ../../using/ios.rst:90 msgid "" "To help Python discover binaries in their new location, the original ``.so`` " "file on ``sys.path`` is replaced with a ``.fwork`` file. This file is a text " "file containing the location of the framework binary, relative to the app " "bundle. To allow the framework to resolve back to the original location, the " "framework must contain a ``.origin`` file that contains the location of the " "``.fwork`` file, relative to the app bundle." msgstr "" "Python が新しい場所にあるバイナリを見つけることを助けるために、 ``sys.path`` " "にある元の ``.so`` ファイルは ``.fwork`` ファイルに置き換えられます。 この" "ファイルは、アプリバンドルからのレームワークバイナリの相対パスを含むテキスト" "ファイルです。フレームワークが元の場所に解決できるようにするためには、フレー" "ムワークは、アプリバンドルからの ``.fwork`` ファイルの相対パスが含まれた、 " "``.origin`` ファイルを含む必要があります。" #: ../../using/ios.rst:97 msgid "" "For example, consider the case of an import ``from foo.bar import _whiz``, " "where ``_whiz`` is implemented with the binary module ``sources/foo/bar/" "_whiz.abi3.so``, with ``sources`` being the location registered on ``sys." "path``, relative to the application bundle. This module *must* be " "distributed as ``Frameworks/foo.bar._whiz.framework/foo.bar._whiz`` " "(creating the framework name from the full import path of the module), with " "an ``Info.plist`` file in the ``.framework`` directory identifying the " "binary as a framework. The ``foo.bar._whiz`` module would be represented in " "the original location with a ``sources/foo/bar/_whiz.abi3.fwork`` marker " "file, containing the path ``Frameworks/foo.bar._whiz/foo.bar._whiz``. The " "framework would also contain ``Frameworks/foo.bar._whiz.framework/foo.bar." "_whiz.origin``, containing the path to the ``.fwork`` file." msgstr "" "例えば、``from foo.bar import _whiz`` をインポートする場合を考えてみましょ" "う。 ``_whiz`` がバイナリモジュール ``sources/foo/bar/_whiz.abi3.so`` で実装" "されており、 ``sources`` のアプリケーションバンドルからの相対パスが ``sys." "path`` に登録されています。このモジュールは ``Frameworks/foo.bar._whiz." "framework/foo.bar._whiz`` (フレームワーク名はモジュールの完全なインポートパス" "から命名されています) として、バイナリをフレームワークとして識別する ``Info." "plist`` ファイルを ``.framework`` ディレクトリ内に設置して配布しなければなり" "ません。 ``foo.bar._whiz`` モジュールは、元の場所で、 ``Frameworks/foo.bar." "_whiz/foo.bar._whiz`` のパスを含む ``sources/foo/bar/_whiz.abi3.fwork`` マー" "カーファイルに記述されます。 また、フレームワークは、 ``.fwork`` へのパスを含" "む ``Frameworks/foo.bar._whiz.framework/foo.bar._whiz.origin`` も含まなければ" "なりません。" #: ../../using/ios.rst:110 msgid "" "When running on iOS, the Python interpreter will install an :class:" "`~importlib.machinery.AppleFrameworkLoader` that is able to read and import " "``.fwork`` files. Once imported, the ``__file__`` attribute of the binary " "module will report as the location of the ``.fwork`` file. However, the :" "class:`~importlib.machinery.ModuleSpec` for the loaded module will report " "the ``origin`` as the location of the binary in the framework folder." msgstr "" "iOS 上で実行している場合、 Python インタープリタは ``.fwork`` ファイルを読み" "込んでインポートすることができる :class:`~importlib.machinery." "AppleFrameworkLoader` をインストールします。インポートされると、バイナリモ" "ジュールの ``__file__`` 属性は ``.fwork`` ファイルの場所を返します。一方、読" "み込まれたモジュールの :class:`~importlib.machinery.ModuleSpec` はフレーム" "ワークフォルダのバイナリの場所として ``origin`` を返します。" #: ../../using/ios.rst:118 msgid "Compiler stub binaries" msgstr "コンパイラスタブバイナリ" #: ../../using/ios.rst:120 msgid "" "Xcode doesn't expose explicit compilers for iOS; instead, it uses an " "``xcrun`` script that resolves to a full compiler path (e.g., ``xcrun --sdk " "iphoneos clang`` to get the ``clang`` for an iPhone device). However, using " "this script poses two problems:" msgstr "" "Xcode は、 iOS 用の明示的なコンパイラを提供していません。代わりに、完全なコン" "パイラのパスを解決する ``xcrun`` スクリプトを使用します (たとえば ``xcrun --" "sdk iphoneos clang`` は iPhone デバイス用の ``clang`` を取得します) 。しか" "し、これは2つの問題を引き起こします: " #: ../../using/ios.rst:125 msgid "" "The output of ``xcrun`` includes paths that are machine specific, resulting " "in a sysconfig module that cannot be shared between users; and" msgstr "" "``xcrun`` の出力はマシン固有のパスを含み、ユーザー間で共有できない sysconfig " "モジュールにつながり、" #: ../../using/ios.rst:128 msgid "" "It results in ``CC``/``CPP``/``LD``/``AR`` definitions that include spaces. " "There is a lot of C ecosystem tooling that assumes that you can split a " "command line at the first space to get the path to the compiler executable; " "this isn't the case when using ``xcrun``." msgstr "" "これにより、 ``CC``/``CPP``/``LD``/``AR`` 定義にスペースが含まれることになり" "ます。多くの C エコシステムツールが、最初のスペースでコマンドラインを分割し、" "コンパイラ実行ファイルを取得できることを前提としています。しかし、 ``xcrun`` " "を使用する場合はそうではありません。" #: ../../using/ios.rst:133 msgid "" "To avoid these problems, Python provided stubs for these tools. These stubs " "are shell script wrappers around the underingly ``xcrun`` tools, distributed " "in a ``bin`` folder distributed alongside the compiled iOS framework. These " "scripts are relocatable, and will always resolve to the appropriate local " "system paths. By including these scripts in the bin folder that accompanies " "a framework, the contents of the ``sysconfig`` module becomes useful for end-" "users to compile their own modules. When compiling third-party Python " "modules for iOS, you should ensure these stub binaries are on your path." msgstr "" "これらの問題を避けるため、 Python はこれらのツール用のスタブを提供しました。" "これらのスタブは、コンパイルされた iOS フレームワークとともに配布される " "``bin`` フォルダで配布される、基礎の ``xcrun`` ツールのシェルスクリプトラッ" "パーです。これらのスクリプトは再配置可能で、常に適切なローカルシステムパスに" "解決されます。これらのスクリプトをフレームワークを伴う bin フォルダーに含める" "ことで、 ``sysconfig`` モジュールはエンドユーザーが自身のモジュールをコンパイ" "ルするのに有用になります。iOS 用の サードパーティの Python モジュールをコンパ" "イルするときは、これらのスタブバイナリがパス上にあることを確認するべきです。" #: ../../using/ios.rst:143 msgid "Installing Python on iOS" msgstr "iOS での Python のインストール" #: ../../using/ios.rst:146 msgid "Tools for building iOS apps" msgstr "iOS アプリビルド用のツール" #: ../../using/ios.rst:148 msgid "" "Building for iOS requires the use of Apple's Xcode tooling. It is strongly " "recommended that you use the most recent stable release of Xcode. This will " "require the use of the most (or second-most) recently released macOS " "version, as Apple does not maintain Xcode for older macOS versions. The " "Xcode Command Line Tools are not sufficient for iOS development; you need a " "*full* Xcode install." msgstr "" "iOS 向けのビルドには、 Apple の Xcode のツールを使用します。Xcode の最新の安" "定リリースを使用することを強く推奨します。Apple は古い macOS のバージョン向け" "には Xcode をメンテナンスしないため、これには最も (または二番目に) 最近にリ" "リースされた macOS のバージョンが必要です。 Xcode コマンドラインツールは iOS " "開発には不十分であり、完全な Xcode のインストールが必要です。" #: ../../using/ios.rst:155 msgid "" "If you want to run your code on the iOS simulator, you'll also need to " "install an iOS Simulator Platform. You should be prompted to select an iOS " "Simulator Platform when you first run Xcode. Alternatively, you can add an " "iOS Simulator Platform by selecting from the Platforms tab of the Xcode " "Settings panel." msgstr "" "iOS シミュレーター上でコードを実行したい場合は、 iOS Simulator プラットフォー" "ムもインストールする必要があります。 Xcode を初めて実行したとき、 iOS " "Simulator プラットフォームを選択するプロンプトが表示されるはずです。代わり" "に、 Xcode の Settings パネルの Platforms タブから iOS Simulator プラット" "フォームを選択して追加することもできます。" #: ../../using/ios.rst:163 msgid "Adding Python to an iOS project" msgstr "iOS プロジェクトに Python を追加する" #: ../../using/ios.rst:165 msgid "" "Python can be added to any iOS project, using either Swift or Objective C. " "The following examples will use Objective C; if you are using Swift, you may " "find a library like `PythonKit <https://github.com/pvieito/PythonKit>`__ to " "be helpful." msgstr "" "Python は、 Swift または Objective-C を使って、どの iOS プロジェクトにでも追" "加できます。以下の例では、 Objective-C を使用しています。 Swift を使う場合" "は、 `PythonKit <https://github.com/pvieito/PythonKit>`__ のようなライブラリ" "が役に立つかもしれません。" #: ../../using/ios.rst:170 msgid "To add Python to an iOS Xcode project:" msgstr "Python を iOS Xcode プロジェクトに追加するには:" #: ../../using/ios.rst:172 msgid "" "Build or obtain a Python ``XCFramework``. See the instructions in :source:" "`iOS/README.rst` (in the CPython source distribution) for details on how to " "build a Python ``XCFramework``. At a minimum, you will need a build that " "supports ``arm64-apple-ios``, plus one of either ``arm64-apple-ios-" "simulator`` or ``x86_64-apple-ios-simulator``." msgstr "" "Python の ``XCFramework`` をビルドまたは取得します。 Python の " "``XCFramework`` をビルドする方法の詳細は、 :source:`iOS/README.rst` (CPython " "のソースコードにあります) の説明を参照してください。最低でも、 ``arm64-apple-" "ios`` に加えて ``arm64-apple-ios-simulator`` または ``x86_64-apple-ios-" "simulator`` のどちらかをサポートするビルドが必要です。" #: ../../using/ios.rst:178 msgid "" "Drag the ``XCframework`` into your iOS project. In the following " "instructions, we'll assume you've dropped the ``XCframework`` into the root " "of your project; however, you can use any other location that you want by " "adjusting paths as needed." msgstr "" "``XCframework`` を iOS プロジェクトにドラッグします。以降の説明では、 プロ" "ジェクトのルートに ``XCframework`` を設置したものと仮定しますが、パスを必要に" "応じて調整することで、他の場所を使用することも出来ます。" #: ../../using/ios.rst:183 msgid "" "Drag the ``iOS/Resources/dylib-Info-template.plist`` file into your project, " "and ensure it is associated with the app target." msgstr "" "``iOS/Resources/dylib-Info-template.plist`` ファイルをプロジェクトにドラッグ" "し、それがアプリのターゲットに関連付けられていることを確認します。" #: ../../using/ios.rst:186 msgid "" "Add your application code as a folder in your Xcode project. In the " "following instructions, we'll assume that your user code is in a folder " "named ``app`` in the root of your project; you can use any other location by " "adjusting paths as needed. Ensure that this folder is associated with your " "app target." msgstr "" "アプリケーションのコードを、 Xcode プロジェクトにフォルダーとして追加します。" "以降の説明では、 プロジェクトのルートに ``app`` という名前のユーザーコードが" "入ったフォルダを設置したものと仮定しますが、パスを必要に応じて調整すること" "で、他の場所を使用することも出来ます。フォルダがアプリのターゲットに関連付け" "られていることを確認してください。" #: ../../using/ios.rst:192 msgid "" "Select the app target by selecting the root node of your Xcode project, then " "the target name in the sidebar that appears." msgstr "" "Xcode プロジェクトのルートノードを選択することで、アプリのターゲットを選択し" "てください。すると、ターゲット名がサイドバーに現れるはずです。" #: ../../using/ios.rst:195 msgid "" "In the \"General\" settings, under \"Frameworks, Libraries and Embedded " "Content\", add ``Python.xcframework``, with \"Embed & Sign\" selected." msgstr "" "\"General\" の設定の \"Frameworks, Libraries and Embedded Content\" に、 " "\"Embed & Sign\" を選択して ``Python.xcframework`` を追加してください。" #: ../../using/ios.rst:198 msgid "In the \"Build Settings\" tab, modify the following:" msgstr "\"Build Settings\" タブで、次の項目を修正してください:" #: ../../using/ios.rst:200 msgid "Build Options" msgstr "Build Options" #: ../../using/ios.rst:202 msgid "User Script Sandboxing: No" msgstr "User Script Sandboxing: No" #: ../../using/ios.rst:203 msgid "Enable Testability: Yes" msgstr "Enable Testability: Yes" #: ../../using/ios.rst:205 msgid "Search Paths" msgstr "Search Paths" #: ../../using/ios.rst:207 msgid "Framework Search Paths: ``$(PROJECT_DIR)``" msgstr "Framework Search Paths: ``$(PROJECT_DIR)``" #: ../../using/ios.rst:208 msgid "" "Header Search Paths: ``\"$(BUILT_PRODUCTS_DIR)/Python.framework/Headers\"``" msgstr "" "Header Search Paths: ``\"$(BUILT_PRODUCTS_DIR)/Python.framework/Headers\"``" #: ../../using/ios.rst:210 msgid "Apple Clang - Warnings - All languages" msgstr "Apple Clang - Warnings - All languages" #: ../../using/ios.rst:212 msgid "Quoted Include In Framework Header: No" msgstr "Quoted Include In Framework Header: No" #: ../../using/ios.rst:214 msgid "" "Add a build step that copies the Python standard library into your app. In " "the \"Build Phases\" tab, add a new \"Run Script\" build step *before* the " "\"Embed Frameworks\" step, but *after* the \"Copy Bundle Resources\" step. " "Name the step \"Install Target Specific Python Standard Library\", disable " "the \"Based on dependency analysis\" checkbox, and set the script content to:" msgstr "" "Python の標準ライブラリをアプリにコピーするビルドステップを追加します。 " "\"Build Phases\" タブで、新しい \"Run Script\" ビルドステップを、 \"Embed " "Frameworks\" ステップの前に追加してください。ステップの名前は、 \"Install " "Target Specific Python Standard Library\" にして、 \"Based on dependency " "analysis\" のチェックボックスを外し、スクリプトの内容を次のように設定してくだ" "さい:" #: ../../using/ios.rst:220 msgid "" "set -e\n" "\n" "mkdir -p \"$CODESIGNING_FOLDER_PATH/python/lib\"\n" "if [ \"$EFFECTIVE_PLATFORM_NAME\" = \"-iphonesimulator\" ]; then\n" " echo \"Installing Python modules for iOS Simulator\"\n" " rsync -au --delete \"$PROJECT_DIR/Python.xcframework/ios-arm64_x86_64-" "simulator/lib/\" \"$CODESIGNING_FOLDER_PATH/python/lib/\"\n" "else\n" " echo \"Installing Python modules for iOS Device\"\n" " rsync -au --delete \"$PROJECT_DIR/Python.xcframework/ios-arm64/lib/\" " "\"$CODESIGNING_FOLDER_PATH/python/lib/\"\n" "fi" msgstr "" #: ../../using/ios.rst:233 msgid "" "Note that the name of the simulator \"slice\" in the XCframework may be " "different, depending the CPU architectures your ``XCFramework`` supports." msgstr "" "XCframework のシミュレーター \"slice\" の名前は、 ``XCFramework`` がサポート" "する CPU アーキテクチャによって異なる可能性があることに注意してください。 " #: ../../using/ios.rst:236 msgid "" "Add a second build step that processes the binary extension modules in the " "standard library into \"Framework\" format. Add a \"Run Script\" build step " "*directly after* the one you added in step 8, named \"Prepare Python Binary " "Modules\". It should also have \"Based on dependency analysis\" unchecked, " "with the following script content:" msgstr "" "標準ライブラリのバイナリ拡張モジュールをフレームワーク形式に処理する、二つ目" "のビルドステップを追加します。手順 8 で追加したものの直後に、 \"Prepare " "Python Binary Modules\" という名前の \"Run Script\" ビルドステップを追加して" "ください。 \"Based on dependency analysis\" のチェックを外して、以下のスクリ" "プトの内容も追加する必要もあります。" #: ../../using/ios.rst:242 msgid "" "set -e\n" "\n" "install_dylib () {\n" " INSTALL_BASE=$1\n" " FULL_EXT=$2\n" "\n" " # The name of the extension file\n" " EXT=$(basename \"$FULL_EXT\")\n" " # The location of the extension file, relative to the bundle\n" " RELATIVE_EXT=${FULL_EXT#$CODESIGNING_FOLDER_PATH/}\n" " # The path to the extension file, relative to the install base\n" " PYTHON_EXT=${RELATIVE_EXT/$INSTALL_BASE/}\n" " # The full dotted name of the extension module, constructed from the " "file path.\n" " FULL_MODULE_NAME=$(echo $PYTHON_EXT | cut -d \".\" -f 1 | tr \"/\" \"." "\");\n" " # A bundle identifier; not actually used, but required by Xcode " "framework packaging\n" " FRAMEWORK_BUNDLE_ID=$(echo $PRODUCT_BUNDLE_IDENTIFIER.$FULL_MODULE_NAME " "| tr \"_\" \"-\")\n" " # The name of the framework folder.\n" " FRAMEWORK_FOLDER=\"Frameworks/$FULL_MODULE_NAME.framework\"\n" "\n" " # If the framework folder doesn't exist, create it.\n" " if [ ! -d \"$CODESIGNING_FOLDER_PATH/$FRAMEWORK_FOLDER\" ]; then\n" " echo \"Creating framework for $RELATIVE_EXT\"\n" " mkdir -p \"$CODESIGNING_FOLDER_PATH/$FRAMEWORK_FOLDER\"\n" " cp \"$CODESIGNING_FOLDER_PATH/dylib-Info-template.plist\" " "\"$CODESIGNING_FOLDER_PATH/$FRAMEWORK_FOLDER/Info.plist\"\n" " plutil -replace CFBundleExecutable -string \"$FULL_MODULE_NAME\" " "\"$CODESIGNING_FOLDER_PATH/$FRAMEWORK_FOLDER/Info.plist\"\n" " plutil -replace CFBundleIdentifier -string \"$FRAMEWORK_BUNDLE_ID\" " "\"$CODESIGNING_FOLDER_PATH/$FRAMEWORK_FOLDER/Info.plist\"\n" " fi\n" "\n" " echo \"Installing binary for $FRAMEWORK_FOLDER/$FULL_MODULE_NAME\"\n" " mv \"$FULL_EXT\" \"$CODESIGNING_FOLDER_PATH/$FRAMEWORK_FOLDER/" "$FULL_MODULE_NAME\"\n" " # Create a placeholder .fwork file where the .so was\n" " echo \"$FRAMEWORK_FOLDER/$FULL_MODULE_NAME\" > ${FULL_EXT%.so}.fwork\n" " # Create a back reference to the .so file location in the framework\n" " echo \"${RELATIVE_EXT%.so}.fwork\" > \"$CODESIGNING_FOLDER_PATH/" "$FRAMEWORK_FOLDER/$FULL_MODULE_NAME.origin\"\n" " }\n" "\n" " PYTHON_VER=$(ls -1 \"$CODESIGNING_FOLDER_PATH/python/lib\")\n" " echo \"Install Python $PYTHON_VER standard library extension modules...\"\n" " find \"$CODESIGNING_FOLDER_PATH/python/lib/$PYTHON_VER/lib-dynload\" -name " "\"*.so\" | while read FULL_EXT; do\n" " install_dylib python/lib/$PYTHON_VER/lib-dynload/ \"$FULL_EXT\"\n" " done\n" "\n" " # Clean up dylib template\n" " rm -f \"$CODESIGNING_FOLDER_PATH/dylib-Info-template.plist\"\n" "\n" " echo \"Signing frameworks as $EXPANDED_CODE_SIGN_IDENTITY_NAME " "($EXPANDED_CODE_SIGN_IDENTITY)...\"\n" " find \"$CODESIGNING_FOLDER_PATH/Frameworks\" -name \"*.framework\" -exec /" "usr/bin/codesign --force --sign \"$EXPANDED_CODE_SIGN_IDENTITY\" " "${OTHER_CODE_SIGN_FLAGS:-} -o runtime --timestamp=none --preserve-" "metadata=identifier,entitlements,flags --generate-entitlement-der \"{}\" \\;" msgstr "" #: ../../using/ios.rst:292 msgid "" "Add Objective C code to initialize and use a Python interpreter in embedded " "mode. You should ensure that:" msgstr "" "Python インタープリタを埋め込みモードで初期化・使用する Objective C コードを" "追加します。次のことを確認する必要があります:" #: ../../using/ios.rst:295 msgid "UTF-8 mode (:c:member:`PyPreConfig.utf8_mode`) is *enabled*;" msgstr "" "UTF-8 モード (:c:member:`PyPreConfig.utf8_mode`) が *有効* になっていること" #: ../../using/ios.rst:296 msgid "Buffered stdio (:c:member:`PyConfig.buffered_stdio`) is *disabled*;" msgstr "" "Buffered stdio (:c:member:`PyConfig.buffered_stdio`) が *無効* になっているこ" "と" #: ../../using/ios.rst:297 msgid "Writing bytecode (:c:member:`PyConfig.write_bytecode`) is *disabled*;" msgstr "" "バイトコードの書き込み (:c:member:`PyConfig.write_bytecode`) が *無効* になっ" "ていること" #: ../../using/ios.rst:298 msgid "" "Signal handlers (:c:member:`PyConfig.install_signal_handlers`) are *enabled*;" msgstr "" "シグナルハンドラ (:c:member:`PyConfig.install_signal_handlers`) が *有効* に" "なっていること" #: ../../using/ios.rst:299 msgid "" "System logging (:c:member:`PyConfig.use_system_logger`) is *enabled* " "(optional, but strongly recommended; this is enabled by default);" msgstr "" "システムログ (:c:member:`PyConfig.use_system_logger`) が *有効* になっている" "こと (オプションですが、強く推奨され、デフォルトで有効化されています)" #: ../../using/ios.rst:301 msgid "" "``PYTHONHOME`` for the interpreter is configured to point at the ``python`` " "subfolder of your app's bundle; and" msgstr "" "インタープリターの ``PYTHONHOME`` がアプリのバンドルの ``python`` サブフォル" "ダに設定されていること" #: ../../using/ios.rst:303 msgid "The ``PYTHONPATH`` for the interpreter includes:" msgstr "インタープリターの ``PYTHONPATH`` が次の項目を含むこと:" #: ../../using/ios.rst:305 msgid "the ``python/lib/python3.X`` subfolder of your app's bundle," msgstr "アプリのバンドルの ``python/lib/python3.X`` サブフォルダ" #: ../../using/ios.rst:306 msgid "" "the ``python/lib/python3.X/lib-dynload`` subfolder of your app's bundle, and" msgstr "アプリのバンドルの ``python/lib/python3.X/lib-dynload`` サブフォルダ" #: ../../using/ios.rst:307 msgid "the ``app`` subfolder of your app's bundle" msgstr "アプリのバンドルの ``app`` サブフォルダ" #: ../../using/ios.rst:309 msgid "" "Your app's bundle location can be determined using ``[[NSBundle mainBundle] " "resourcePath]``." msgstr "" "アプリのバンドルの場所は ``[[NSBundle mainBundle] resourcePath]`` を用いて取" "得できます。" #: ../../using/ios.rst:312 msgid "" "Steps 8, 9 and 10 of these instructions assume that you have a single folder " "of pure Python application code, named ``app``. If you have third-party " "binary modules in your app, some additional steps will be required:" msgstr "" "これらの手順 8, 9, 10 は ``app`` という名前のただ一つの純粋な Python アプリ" "ケーションのコードのフォルダがあることを前提としています。もしサードパーティ" "のバイナリモジュールがアプリに含まれる場合は、いくつかの追加の手順が必要です:" #: ../../using/ios.rst:316 msgid "" "You need to ensure that any folders containing third-party binaries are " "either associated with the app target, or copied in as part of step 8. Step " "8 should also purge any binaries that are not appropriate for the platform a " "specific build is targeting (i.e., delete any device binaries if you're " "building an app targeting the simulator)." msgstr "" "サードパーティのバイナリを含むフォルダが、アプリのターゲットに関連付けられて" "いる、または手順 8 の一部としてコピーされていることを確認する必要があります。" "手順 8 では、特定のビルドがターゲットとするプラットフォームに適切でないバイナ" "リを取り除く(つまり、もしシミュレーターをターゲットとするアプリをビルドしてい" "る場合は、デバイスバイナリを削除する)ことも必要です。" #: ../../using/ios.rst:322 msgid "" "Any folders that contain third-party binaries must be processed into " "framework form by step 9. The invocation of ``install_dylib`` that processes " "the ``lib-dynload`` folder can be copied and adapted for this purpose." msgstr "" "サードパーティのバイナリを含むフォルダは、手順 9 でフレームワークに処理されな" "ければなりません。 ``lib-dynload`` フォルダを処理する ``install_dylib`` の呼" "び出しは、このためにコピー・変更することができます。" #: ../../using/ios.rst:326 msgid "" "If you're using a separate folder for third-party packages, ensure that " "folder is included as part of the ``PYTHONPATH`` configuration in step 10." msgstr "" "サードパーティパッケージのフォルダを分離している場合は、手順 10 でそのフォル" "ダが ``PYTHONPATH`` 環境設定の一部に含まれていることを確認してください。" #: ../../using/ios.rst:330 msgid "Testing a Python package" msgstr "Python パッケージのテスト" #: ../../using/ios.rst:332 msgid "" "The CPython source tree contains :source:`a testbed project <iOS/testbed>` " "that is used to run the CPython test suite on the iOS simulator. This " "testbed can also be used as a testbed project for running your Python " "library's test suite on iOS." msgstr "" #: ../../using/ios.rst:336 msgid "" "After building or obtaining an iOS XCFramework (See :source:`iOS/README.rst` " "for details), create a clone of the Python iOS testbed project by running:" msgstr "" #: ../../using/ios.rst:339 msgid "" "$ python iOS/testbed clone --framework <path/to/Python.xcframework> --app " "<path/to/module1> --app <path/to/module2> app-testbed" msgstr "" #: ../../using/ios.rst:343 msgid "" "You will need to modify the ``iOS/testbed`` reference to point to that " "directory in the CPython source tree; any folders specified with the ``--" "app`` flag will be copied into the cloned testbed project. The resulting " "testbed will be created in the ``app-testbed`` folder. In this example, the " "``module1`` and ``module2`` would be importable modules at runtime. If your " "project has additional dependencies, they can be installed into the ``app-" "testbed/iOSTestbed/app_packages`` folder (using ``pip install --target app-" "testbed/iOSTestbed/app_packages`` or similar)." msgstr "" #: ../../using/ios.rst:352 msgid "" "You can then use the ``app-testbed`` folder to run the test suite for your " "app, For example, if ``module1.tests`` was the entry point to your test " "suite, you could run:" msgstr "" #: ../../using/ios.rst:356 msgid "$ python app-testbed run -- module1.tests" msgstr "$ python app-testbed run -- module1.tests" #: ../../using/ios.rst:360 msgid "" "This is the equivalent of running ``python -m module1.tests`` on a desktop " "Python build. Any arguments after the ``--`` will be passed to the testbed " "as if they were arguments to ``python -m`` on a desktop machine." msgstr "" #: ../../using/ios.rst:364 msgid "You can also open the testbed project in Xcode by running:" msgstr "" #: ../../using/ios.rst:366 msgid "$ open app-testbed/iOSTestbed.xcodeproj" msgstr "$ open app-testbed/iOSTestbed.xcodeproj" #: ../../using/ios.rst:370 msgid "This will allow you to use the full Xcode suite of tools for debugging." msgstr "" #: ../../using/ios.rst:373 msgid "App Store Compliance" msgstr "App Store コンプライアンス" #: ../../using/ios.rst:375 msgid "" "The only mechanism for distributing apps to third-party iOS devices is to " "submit the app to the iOS App Store; apps submitted for distribution must " "pass Apple's app review process. This process includes a set of automated " "validation rules that inspect the submitted application bundle for " "problematic code." msgstr "" "サードパーティの iOS デバイスにアプリを配布する唯一の仕組みは、アプリを iOS " "App Store に送信することです。配布用に送信されたアプリは、 Apple のアプリ審査" "プロセスに合格する必要があります。このプロセスは、送信されたアプリケーション" "バンドルに問題のあるコードがないかどうか検査する自動検証ルールのセットを含ん" "でいます。" #: ../../using/ios.rst:380 msgid "" "The Python standard library contains some code that is known to violate " "these automated rules. While these violations appear to be false positives, " "Apple's review rules cannot be challenged; so, it is necessary to modify the " "Python standard library for an app to pass App Store review." msgstr "" "Python の標準ライブラリには、これらの自動ルールに違反することが知られている" "コードがいくつか含まれています。これらの違反は誤検出であると思われますが、 " "Apple の審査ルールに異議を唱えることはできません。そのため、 Python の標準ラ" "イブラリを、アプリが App Store 審査に合格するよう修正する必要があります。" #: ../../using/ios.rst:385 msgid "" "The Python source tree contains :source:`a patch file <Mac/Resources/app-" "store-compliance.patch>` that will remove all code that is known to cause " "issues with the App Store review process. This patch is applied " "automatically when building for iOS." msgstr "" "Python のソースツリーは、 App Store 審査プロセスで問題を引き起こすことが知ら" "れているすべてのコードを削除する :source:`パッチファイル <Mac/Resources/app-" "store-compliance.patch>` を含んでいます。このパッチは iOS 用のビルド時に自動" "的に適用されます。" |
| You are visitor 01402520 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |