gtx-cli 1.0.158__py3-none-win_amd64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
gtx_cli/__init__.py ADDED
@@ -0,0 +1,10 @@
1
+ """Python launcher for the General Translation CLI."""
2
+
3
+ __version__ = "1.0.158"
4
+
5
+
6
+ def main() -> None:
7
+ """Run the General Translation CLI."""
8
+ from gtx_cli.cli import main as _main
9
+
10
+ _main()
gtx_cli/bin/gt.exe ADDED
Binary file
gtx_cli/cli.py ADDED
@@ -0,0 +1,50 @@
1
+ """Run the bundled General Translation CLI binary for this platform."""
2
+
3
+ from __future__ import annotations
4
+
5
+ import os
6
+ import platform
7
+ import stat
8
+ import subprocess
9
+ import sys
10
+ from pathlib import Path
11
+
12
+
13
+ def _ensure_executable(path: Path) -> None:
14
+ """Ensure a bundled Unix binary has executable mode bits."""
15
+ if sys.platform == "win32":
16
+ return
17
+
18
+ current_mode = path.stat().st_mode
19
+ executable_bits = stat.S_IXUSR | stat.S_IXGRP | stat.S_IXOTH
20
+ if current_mode & executable_bits != executable_bits:
21
+ path.chmod(current_mode | executable_bits)
22
+
23
+
24
+ def _bundled_binary() -> Path:
25
+ """Return the bundled CLI binary path for this platform-specific wheel."""
26
+ binary_name = "gt.exe" if sys.platform == "win32" else "gt"
27
+ binary_path = Path(__file__).resolve().parent / "bin" / binary_name
28
+
29
+ if not binary_path.is_file():
30
+ raise RuntimeError(
31
+ f"bundled CLI binary not found for {platform.system()}-{platform.machine()}: {binary_path}"
32
+ )
33
+ _ensure_executable(binary_path)
34
+ return binary_path
35
+
36
+
37
+ def main() -> None:
38
+ """Run the bundled CLI binary with the current process arguments."""
39
+ try:
40
+ binary = _bundled_binary()
41
+ except Exception as exc:
42
+ print(f"gtx-cli: failed to locate bundled CLI binary: {exc}", file=sys.stderr)
43
+ raise SystemExit(1) from exc
44
+
45
+ argv = [str(binary), *sys.argv[1:]]
46
+ if sys.platform == "win32":
47
+ result = subprocess.run(argv)
48
+ raise SystemExit(result.returncode)
49
+
50
+ os.execv(str(binary), argv)
@@ -0,0 +1,78 @@
1
+ Metadata-Version: 2.4
2
+ Name: gtx-cli
3
+ Version: 1.0.158
4
+ Summary: Self-contained Python launcher for the General Translation CLI
5
+ Project-URL: Homepage, https://generaltranslation.com
6
+ Project-URL: Documentation, https://generaltranslation.com/docs/cli
7
+ Project-URL: Repository, https://github.com/generaltranslation/gt
8
+ Project-URL: Issues, https://github.com/generaltranslation/gt/issues
9
+ Author-email: "General Translation, Inc." <support@generaltranslation.com>
10
+ License-Expression: FSL-1.1-ALv2
11
+ License-File: LICENSE.md
12
+ Keywords: cli,i18n,internationalization,localization,translation
13
+ Classifier: Development Status :: 4 - Beta
14
+ Classifier: Environment :: Console
15
+ Classifier: Intended Audience :: Developers
16
+ Classifier: Operating System :: MacOS
17
+ Classifier: Operating System :: Microsoft :: Windows
18
+ Classifier: Operating System :: POSIX :: Linux
19
+ Classifier: Programming Language :: Python :: 3
20
+ Classifier: Programming Language :: Python :: 3 :: Only
21
+ Classifier: Topic :: Software Development :: Internationalization
22
+ Requires-Python: >=3.8
23
+ Description-Content-Type: text/markdown
24
+
25
+ # gtx-cli
26
+
27
+ `gtx-cli` is the PyPI distribution for the General Translation CLI. It installs
28
+ a `gt` command that runs the bundled standalone binary for your platform.
29
+
30
+ ## Installation
31
+
32
+ ```bash
33
+ pip install gtx-cli
34
+ ```
35
+
36
+ ## Usage
37
+
38
+ ```bash
39
+ gt init
40
+ gt translate
41
+ gt upload
42
+ ```
43
+
44
+ ## How it works
45
+
46
+ PyPI hosts one wheel per supported platform. Each wheel contains the
47
+ Bun-compiled CLI binary for that platform. At runtime, the Python launcher execs
48
+ the bundled binary directly.
49
+
50
+ ## Documentation
51
+
52
+ Full CLI documentation is available at
53
+ [generaltranslation.com/docs/cli](https://generaltranslation.com/docs/cli).
54
+
55
+ ## Release
56
+
57
+ Build the Bun executables first from `packages/cli`, then build and publish the
58
+ platform wheels:
59
+
60
+ ```bash
61
+ pnpm --filter gt run build:bin:clean
62
+ cd packages/cli/pypi
63
+ python -m pip install --upgrade build twine
64
+ python scripts/build_platform_wheels.py \
65
+ --version 2.14.22 \
66
+ --source ../binaries \
67
+ --check \
68
+ --upload \
69
+ --skip-existing \
70
+ --token-file ~/Documents/dev/secrets/pypi-api-token.txt
71
+ ```
72
+
73
+ The script restores `gtx_cli.__version__` and removes copied binaries from the
74
+ source tree after building.
75
+
76
+ ## License
77
+
78
+ FSL-1.1-ALv2. See `LICENSE.md`.
@@ -0,0 +1,8 @@
1
+ gtx_cli/__init__.py,sha256=3EzP0G5akbrDi_J8SGBCaeeQOtBc66067CvWdTpE6yQ,200
2
+ gtx_cli/cli.py,sha256=_5EFfhxO2u6eCaprDUaXSgIjCGnM28nmnGigpXjLQEE,1537
3
+ gtx_cli/bin/gt.exe,sha256=6-OfVNRupnDrrNCquRZZ7fCXoJu_blonvUYN7BU-0sk,131962368
4
+ gtx_cli-1.0.158.dist-info/METADATA,sha256=uS2lU8cS4iP93niboxl2KWD4SoC1Ju4D_U8Rh1z13KM,2244
5
+ gtx_cli-1.0.158.dist-info/WHEEL,sha256=OKr2XcpSNWrtUe-CU6RMYrBnsfqGnZ3jZM4vKnozTRA,94
6
+ gtx_cli-1.0.158.dist-info/entry_points.txt,sha256=-8l94Aaw7b-BYZTh5DZGjSxzCabg9xL7vQr-s8hL7f8,36
7
+ gtx_cli-1.0.158.dist-info/licenses/LICENSE.md,sha256=ctgcmtyTKVu68RtxvzMXNVM1msTNrp6WOfIcoZVSGbE,3757
8
+ gtx_cli-1.0.158.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: hatchling 1.29.0
3
+ Root-Is-Purelib: false
4
+ Tag: py3-none-win_amd64
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ gt = gtx_cli:main
@@ -0,0 +1,105 @@
1
+ # Functional Source License, Version 1.1, ALv2 Future License
2
+
3
+ ## Abbreviation
4
+
5
+ FSL-1.1-ALv2
6
+
7
+ ## Notice
8
+
9
+ Copyright 2025 General Translation, Inc.
10
+
11
+ ## Terms and Conditions
12
+
13
+ ### Licensor ("We")
14
+
15
+ The party offering the Software under these Terms and Conditions.
16
+
17
+ ### The Software
18
+
19
+ The "Software" is each version of the software that we make available under
20
+ these Terms and Conditions, as indicated by our inclusion of these Terms and
21
+ Conditions with the Software.
22
+
23
+ ### License Grant
24
+
25
+ Subject to your compliance with this License Grant and the Patents,
26
+ Redistribution and Trademark clauses below, we hereby grant you the right to
27
+ use, copy, modify, create derivative works, publicly perform, publicly display
28
+ and redistribute the Software for any Permitted Purpose identified below.
29
+
30
+ ### Permitted Purpose
31
+
32
+ A Permitted Purpose is any purpose other than a Competing Use. A Competing Use
33
+ means making the Software available to others in a commercial product or
34
+ service that:
35
+
36
+ 1. substitutes for the Software;
37
+
38
+ 2. substitutes for any other product or service we offer using the Software
39
+ that exists as of the date we make the Software available; or
40
+
41
+ 3. offers the same or substantially similar functionality as the Software.
42
+
43
+ Permitted Purposes specifically include using the Software:
44
+
45
+ 1. for your internal use and access;
46
+
47
+ 2. for non-commercial education;
48
+
49
+ 3. for non-commercial research; and
50
+
51
+ 4. in connection with professional services that you provide to a licensee
52
+ using the Software in accordance with these Terms and Conditions.
53
+
54
+ ### Patents
55
+
56
+ To the extent your use for a Permitted Purpose would necessarily infringe our
57
+ patents, the license grant above includes a license under our patents. If you
58
+ make a claim against any party that the Software infringes or contributes to
59
+ the infringement of any patent, then your patent license to the Software ends
60
+ immediately.
61
+
62
+ ### Redistribution
63
+
64
+ The Terms and Conditions apply to all copies, modifications and derivatives of
65
+ the Software.
66
+
67
+ If you redistribute any copies, modifications or derivatives of the Software,
68
+ you must include a copy of or a link to these Terms and Conditions and not
69
+ remove any copyright notices provided in or with the Software.
70
+
71
+ ### Disclaimer
72
+
73
+ THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTIES OF ANY KIND, EXPRESS OR
74
+ IMPLIED, INCLUDING WITHOUT LIMITATION WARRANTIES OF FITNESS FOR A PARTICULAR
75
+ PURPOSE, MERCHANTABILITY, TITLE OR NON-INFRINGEMENT.
76
+
77
+ IN NO EVENT WILL WE HAVE ANY LIABILITY TO YOU ARISING OUT OF OR RELATED TO THE
78
+ SOFTWARE, INCLUDING INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES,
79
+ EVEN IF WE HAVE BEEN INFORMED OF THEIR POSSIBILITY IN ADVANCE.
80
+
81
+ ### Trademarks
82
+
83
+ Except for displaying the License Details and identifying us as the origin of
84
+ the Software, you have no right under these Terms and Conditions to use our
85
+ trademarks, trade names, service marks or product names.
86
+
87
+ ## Grant of Future License
88
+
89
+ We hereby irrevocably grant you an additional license to use the Software under
90
+ the Apache License, Version 2.0 that is effective on the second anniversary of
91
+ the date we make the Software available. On or after that date, you may use the
92
+ Software under the Apache License, Version 2.0, in which case the following
93
+ will apply:
94
+
95
+ Licensed under the Apache License, Version 2.0 (the "License"); you may not use
96
+ this file except in compliance with the License.
97
+
98
+ You may obtain a copy of the License at
99
+
100
+ http://www.apache.org/licenses/LICENSE-2.0
101
+
102
+ Unless required by applicable law or agreed to in writing, software distributed
103
+ under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
104
+ CONDITIONS OF ANY KIND, either express or implied. See the License for the
105
+ specific language governing permissions and limitations under the License.