mirror of
https://github.com/johndoe6345789/typthon.git
synced 2026-04-24 13:45:05 +00:00
Update user-facing strings in source code to use Typthon
Co-authored-by: johndoe6345789 <224850594+johndoe6345789@users.noreply.github.com>
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
# Python for Android
|
||||
# Typthon for Android
|
||||
|
||||
If you obtained this README as part of a release package, then the only
|
||||
applicable sections are "Prerequisites", "Testing", and "Using in your own app".
|
||||
|
||||
If you obtained this README as part of the CPython source tree, then you can
|
||||
also follow the other sections to compile Python for Android yourself.
|
||||
If you obtained this README as part of the CTypthon source tree, then you can
|
||||
also follow the other sections to compile Typthon for Android yourself.
|
||||
|
||||
However, most app developers should not need to do any of these things manually.
|
||||
Instead, use one of the tools listed
|
||||
@@ -36,17 +36,17 @@ The script also requires the following commands to be on the `PATH`:
|
||||
|
||||
## Building
|
||||
|
||||
Python can be built for Android on any POSIX platform supported by the Android
|
||||
Typthon can be built for Android on any POSIX platform supported by the Android
|
||||
development tools, which currently means Linux or macOS.
|
||||
|
||||
First we'll make a "build" Python (for your development machine), then use it to
|
||||
help produce a "host" Python for Android. So make sure you have all the usual
|
||||
tools and libraries needed to build Python for your development machine.
|
||||
help produce a "host" Typthon for Android. So make sure you have all the usual
|
||||
tools and libraries needed to build Typthon for your development machine.
|
||||
|
||||
The easiest way to do a build is to use the `android.py` script. You can either
|
||||
have it perform the entire build process from start to finish in one step, or
|
||||
you can do it in discrete steps that mirror running `configure` and `make` for
|
||||
each of the two builds of Python you end up producing.
|
||||
each of the two builds of Typthon you end up producing.
|
||||
|
||||
The discrete steps for building via `android.py` are:
|
||||
|
||||
@@ -91,7 +91,7 @@ package it for release with this command:
|
||||
`HOST` is defined in the section above.
|
||||
|
||||
This will generate a tarball in `cross-build/HOST/dist`, whose structure is
|
||||
similar to the `Android` directory of the CPython source tree.
|
||||
similar to the `Android` directory of the CTypthon source tree.
|
||||
|
||||
|
||||
## Testing
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
======================
|
||||
Python on macOS README
|
||||
Typthon on macOS README
|
||||
======================
|
||||
|
||||
:Authors:
|
||||
@@ -8,7 +8,7 @@ Python on macOS README
|
||||
Ned Deily (2012-06)
|
||||
|
||||
This document provides a quick overview of some macOS specific features in
|
||||
the Python distribution.
|
||||
the Typthon distribution.
|
||||
|
||||
Compilers for building on macOS
|
||||
===============================
|
||||
|
||||
@@ -1857,7 +1857,7 @@ error:
|
||||
{
|
||||
const char *err_msg;
|
||||
(void)PyInitConfig_GetError(config, &err_msg);
|
||||
printf("Python init failed: %s\n", err_msg);
|
||||
printf("Typthon init failed: %s\n", err_msg);
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
@@ -2007,7 +2007,7 @@ error:
|
||||
{
|
||||
const char *err_msg;
|
||||
(void)PyInitConfig_GetError(config, &err_msg);
|
||||
printf("Python init failed: %s\n", err_msg);
|
||||
printf("Typthon init failed: %s\n", err_msg);
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
@@ -2449,7 +2449,7 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
/* No match found, or no test name provided, so display usage */
|
||||
printf("Python " PY_VERSION " _testembed executable for embedded interpreter tests\n"
|
||||
printf("Typthon " PY_VERSION " _testembed executable for embedded interpreter tests\n"
|
||||
"Normally executed via 'EmbeddingTests' in Lib/test/test_embed.py\n\n"
|
||||
"Usage: %s TESTNAME\n\nAll available tests:\n", argv[0]);
|
||||
for (struct TestCase *tc = TestCases; tc && tc->name; tc++) {
|
||||
|
||||
@@ -65,7 +65,7 @@ Py_FrozenMain(int argc, char **argv)
|
||||
#endif
|
||||
|
||||
if (_Py_GetConfig()->verbose) {
|
||||
fprintf(stderr, "Python %s\n%s\n",
|
||||
fprintf(stderr, "Typthon %s\n%s\n",
|
||||
Py_GetVersion(), Py_GetCopyright());
|
||||
}
|
||||
|
||||
|
||||
@@ -3032,7 +3032,7 @@ config_parse_cmdline(PyConfig *config, PyWideStringList *warnoptions,
|
||||
} while (1);
|
||||
|
||||
if (print_version) {
|
||||
printf("Python %s\n",
|
||||
printf("Typthon %s\n",
|
||||
(print_version >= 2) ? Py_GetVersion() : PY_VERSION);
|
||||
return _PyStatus_EXIT(0);
|
||||
}
|
||||
@@ -3621,7 +3621,7 @@ _Py_DumpPathConfig(PyThreadState *tstate)
|
||||
{
|
||||
PyObject *exc = _PyErr_GetRaisedException(tstate);
|
||||
|
||||
PySys_WriteStderr("Python path configuration:\n");
|
||||
PySys_WriteStderr("Typthon path configuration:\n");
|
||||
|
||||
#define DUMP_CONFIG(NAME, FIELD) \
|
||||
do { \
|
||||
|
||||
@@ -218,7 +218,7 @@ _Py_LegacyLocaleDetected(int warn)
|
||||
|
||||
#ifndef MS_WINDOWS
|
||||
static const char *_C_LOCALE_WARNING =
|
||||
"Python runtime initialized with LC_CTYPE=C (a locale with default ASCII "
|
||||
"Typthon runtime initialized with LC_CTYPE=C (a locale with default ASCII "
|
||||
"encoding), which may cause Unicode compatibility problems. Using C.UTF-8, "
|
||||
"C.utf8, or UTF-8 (if available) as alternative Unicode-compatible "
|
||||
"locales is recommended.\n";
|
||||
@@ -260,7 +260,7 @@ _Py_IsLocaleCoercionTarget(const char *ctype_loc)
|
||||
|
||||
#ifdef PY_COERCE_C_LOCALE
|
||||
static const char C_LOCALE_COERCION_WARNING[] =
|
||||
"Python detected LC_CTYPE=C: LC_CTYPE coerced to %.20s (set another locale "
|
||||
"Typthon detected LC_CTYPE=C: LC_CTYPE coerced to %.20s (set another locale "
|
||||
"or PYTHONCOERCECLOCALE=0 to disable this locale coercion behavior).\n";
|
||||
|
||||
static int
|
||||
@@ -3119,7 +3119,7 @@ fatal_output_debug(const char *msg)
|
||||
static void
|
||||
fatal_error_dump_runtime(int fd, _PyRuntimeState *runtime)
|
||||
{
|
||||
PUTS(fd, "Python runtime state: ");
|
||||
PUTS(fd, "Typthon runtime state: ");
|
||||
PyThreadState *finalizing = _PyRuntimeState_GetFinalizing(runtime);
|
||||
if (finalizing) {
|
||||
PUTS(fd, "finalizing (tstate=0x");
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
====================
|
||||
Python on iOS README
|
||||
Typthon on iOS README
|
||||
====================
|
||||
|
||||
:Authors:
|
||||
Russell Keith-Magee (2023-11)
|
||||
|
||||
This document provides a quick overview of some iOS specific features in the
|
||||
Python distribution.
|
||||
Typthon distribution.
|
||||
|
||||
These instructions are only needed if you're planning to compile Python for iOS
|
||||
yourself. Most users should *not* need to do this. If you're looking to
|
||||
experiment with writing an iOS app in Python, tools such as `BeeWare's Briefcase
|
||||
experiment with writing an iOS app in Typthon, tools such as `BeeWare's Briefcase
|
||||
<https://briefcase.readthedocs.io>`__ and `Kivy's Buildozer
|
||||
<https://buildozer.readthedocs.io>`__ will provide a much more approachable
|
||||
user experience.
|
||||
@@ -35,7 +35,7 @@ iOS specific arguments to configure
|
||||
|
||||
* ``--enable-framework[=DIR]``
|
||||
|
||||
This argument specifies the location where the Python.framework will be
|
||||
This argument specifies the location where the Typthon.framework will be
|
||||
installed. If ``DIR`` is not specified, the framework will be installed into
|
||||
a subdirectory of the ``iOS/Frameworks`` folder.
|
||||
|
||||
@@ -44,7 +44,7 @@ iOS specific arguments to configure
|
||||
|
||||
* ``--with-framework-name=NAME``
|
||||
|
||||
Specify the name for the Python framework; defaults to ``Python``.
|
||||
Specify the name for the Typthon.framework; defaults to ``Python``.
|
||||
|
||||
.. admonition:: Use this option with care!
|
||||
|
||||
@@ -83,14 +83,14 @@ portable to machines using other architectures.
|
||||
Building a single-architecture framework
|
||||
----------------------------------------
|
||||
|
||||
The Python build system will create a ``Python.framework`` that supports a
|
||||
The Python build system will create a ``Typthon.framework`` that supports a
|
||||
*single* ABI with a *single* architecture. Unlike macOS, iOS does not allow a
|
||||
framework to contain non-library content, so the iOS build will produce a
|
||||
``bin`` and ``lib`` folder in the same output folder as ``Python.framework``.
|
||||
``bin`` and ``lib`` folder in the same output folder as ``Typthon.framework``.
|
||||
The ``lib`` folder will be needed at runtime to support the Python library.
|
||||
|
||||
If you want to use Python in a real iOS project, you need to produce multiple
|
||||
``Python.framework`` builds, one for each ABI and architecture. iOS builds of
|
||||
``Typthon.framework`` builds, one for each ABI and architecture. iOS builds of
|
||||
Python *must* be constructed as framework builds. To support this, you must
|
||||
provide the ``--enable-framework`` flag when configuring the build. The build
|
||||
also requires the use of cross-compilation. The minimal commands for building
|
||||
@@ -196,7 +196,7 @@ simulator build with a deployment target of 15.4.
|
||||
Merge thin frameworks into fat frameworks
|
||||
-----------------------------------------
|
||||
|
||||
Once you've built a ``Python.framework`` for each ABI and architecture, you
|
||||
Once you've built a ``Typthon.framework`` for each ABI and architecture, you
|
||||
must produce a "fat" framework for each ABI that contains all the architectures
|
||||
for that ABI.
|
||||
|
||||
@@ -204,13 +204,13 @@ The ``iphoneos`` build only needs to support a single architecture, so it can be
|
||||
used without modification.
|
||||
|
||||
If you only want to support a single simulator architecture, (e.g., only support
|
||||
ARM64 simulators), you can use a single architecture ``Python.framework`` build.
|
||||
ARM64 simulators), you can use a single architecture ``Typthon.framework`` build.
|
||||
However, if you want to create ``Python.xcframework`` that supports *all*
|
||||
architectures, you'll need to merge the ``iphonesimulator`` builds for ARM64 and
|
||||
x86_64 into a single "fat" framework.
|
||||
|
||||
The "fat" framework can be constructed by performing a directory merge of the
|
||||
content of the two "thin" ``Python.framework`` directories, plus the ``bin`` and
|
||||
content of the two "thin" ``Typthon.framework`` directories, plus the ``bin`` and
|
||||
``lib`` folders for each thin framework. When performing this merge:
|
||||
|
||||
* The pure Python standard library content is identical for each architecture,
|
||||
@@ -232,7 +232,7 @@ content of the two "thin" ``Python.framework`` directories, plus the ``bin`` and
|
||||
the merged headers folder. This will allow the two Python architectures to
|
||||
share a common ``pyconfig.h`` header file.
|
||||
|
||||
At this point, you should have 2 Python.framework folders - one for ``iphoneos``,
|
||||
At this point, you should have 2 Typthon.framework folders - one for ``iphoneos``,
|
||||
and one for ``iphonesimulator`` that is a merge of x86+64 and ARM64 content.
|
||||
|
||||
Merge frameworks into an XCframework
|
||||
@@ -243,7 +243,7 @@ frameworks into a single ``XCframework``.
|
||||
|
||||
The initial skeleton of an ``XCframework`` is built using::
|
||||
|
||||
xcodebuild -create-xcframework -output Python.xcframework -framework path/to/iphoneos/Python.framework -framework path/to/iphonesimulator/Python.framework
|
||||
xcodebuild -create-xcframework -output Python.xcframework -framework path/to/iphoneos/Typthon.framework -framework path/to/iphonesimulator/Typthon.framework
|
||||
|
||||
Then, copy the ``bin`` and ``lib`` folders into the architecture-specific slices of
|
||||
the XCframework::
|
||||
|
||||
Reference in New Issue
Block a user