Skip to content

Commit c69fc8f

Browse files
committed
feat(pypi): add techscript-lang package and update workflow to build and verify both packages
1 parent 33b2ebc commit c69fc8f

13 files changed

Lines changed: 1251 additions & 11 deletions

File tree

.github/workflows/pypi-publish.yml

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,27 +23,34 @@ jobs:
2323
- name: Install build tools
2424
run: pip install build hatchling
2525

26-
- name: Build wheel and sdist
26+
- name: Build wheel and sdist (techscript)
2727
working-directory: python-installer
2828
run: python -m build
2929

30+
- name: Build wheel and sdist (techscript-lang)
31+
working-directory: python-installer-lang
32+
run: python -m build
33+
3034
- name: Verify package size is under 200 KB
31-
working-directory: python-installer
3235
run: |
33-
for f in dist/*.whl dist/*.tar.gz; do
34-
size=$(stat -c%s "$f")
35-
echo " $f: ${size} bytes"
36-
if [ "$size" -gt 204800 ]; then
37-
echo "ERROR: $f exceeds 200 KB limit ($size bytes)"
38-
exit 1
36+
for f in python-installer/dist/* python-installer-lang/dist/*; do
37+
if [ -f "$f" ]; then
38+
size=$(stat -c%s "$f")
39+
echo " $f: ${size} bytes"
40+
if [ "$size" -gt 204800 ]; then
41+
echo "ERROR: $f exceeds 200 KB limit ($size bytes)"
42+
exit 1
43+
fi
3944
fi
4045
done
4146
4247
- name: Upload dist artifacts
4348
uses: actions/upload-artifact@v4
4449
with:
4550
name: python-dist
46-
path: python-installer/dist/
51+
path: |
52+
python-installer/dist/
53+
python-installer-lang/dist/
4754
4855
test:
4956
name: Run installer tests

README.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,10 +126,10 @@ graph TD
126126

127127
### 🐍 Via pip — All Platforms (Recommended)
128128
```bash
129-
pip install techscript
129+
pip install techscript # or: pip install techscript-lang
130130
techscript install
131131
```
132-
The PyPI package auto-detects your OS and downloads the correct native binary from GitHub Releases.
132+
The PyPI packages auto-detect your OS and download the correct native binary from GitHub Releases.
133133

134134
### 🪟 Windows Setup
135135
1. Go to the [Releases](https://github.com/Tcode-Motion/techscript/releases) page on GitHub.
@@ -145,12 +145,22 @@ curl -fsSL https://raw.githubusercontent.com/Tcode-Motion/techscript/main/script
145145
```
146146

147147
### 🤖 Android (Termux) Setup
148+
**Recommended Method (Shell script):**
148149
```bash
149150
pkg update
150151
pkg install curl
151152
curl -fsSL https://raw.githubusercontent.com/Tcode-Motion/techscript/main/scripts/install.sh | bash
152153
```
153154

155+
**Alternative Method (pip — Not Recommended):**
156+
```bash
157+
pkg update
158+
pkg install python
159+
pip install techscript # or: pip install techscript-lang
160+
techscript install
161+
```
162+
*(Note: Python installations in Termux may require the `--break-system-packages` flag under PEP 668).*
163+
154164
> **Homebrew** (`brew install techscript`), **Winget** and **Scoop** support coming soon!
155165
156166
---

python-installer-lang/LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2026 Tcode-Motion
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

python-installer-lang/README.md

Lines changed: 224 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,224 @@
1+
# TechScript — Python Installer
2+
3+
<div align="center">
4+
5+
[![PyPI](https://img.shields.io/pypi/v/techscript?style=for-the-badge&color=0DF28B)](https://pypi.org/project/techscript/)
6+
[![Python](https://img.shields.io/pypi/pyversions/techscript?style=for-the-badge)](https://pypi.org/project/techscript/)
7+
[![License](https://img.shields.io/badge/license-MIT-green?style=for-the-badge)](../LICENSE)
8+
[![GitHub](https://img.shields.io/badge/GitHub-Tcode--Motion%2Ftechscript-black?style=for-the-badge)](https://github.com/Tcode-Motion/techscript)
9+
10+
**The official Python-based installer for the TechScript 2.0 programming language.**
11+
12+
</div>
13+
14+
---
15+
16+
## What This Package Does
17+
18+
This is a **lightweight bootstrapper only** — it contains no compiler binaries.
19+
20+
When you run `techscript install`, it:
21+
1. Detects your OS and CPU architecture
22+
2. Fetches the correct native binary from [GitHub Releases](https://github.com/Tcode-Motion/techscript/releases/latest)
23+
3. Installs it into your PATH
24+
4. Verifies the installation by running `tsc version`
25+
26+
> **The actual TechScript compiler remains distributed via GitHub Releases.**
27+
> This PyPI package is under 200 KB and contains only Python code.
28+
29+
---
30+
31+
## Supported Platforms
32+
33+
| Platform | Architecture | Status |
34+
|---|---|---|
35+
| Windows | x64 | ✅ Supported |
36+
| Windows | ARM64 | ✅ Supported |
37+
| Linux | x64 | ✅ Supported |
38+
| Linux | ARM64 | ✅ Supported |
39+
| macOS | Intel (x64) | ✅ Supported |
40+
| macOS | Apple Silicon (ARM64) | ✅ Supported |
41+
| Android Termux | ARM64 | ✅ Supported |
42+
| Android Termux | ARMv7 | 🔄 Optional |
43+
44+
---
45+
46+
## Installation
47+
48+
### Via pip (Recommended)
49+
50+
```bash
51+
pip install techscript
52+
techscript install
53+
```
54+
55+
### Via curl — Linux / macOS
56+
57+
```bash
58+
curl -fsSL https://raw.githubusercontent.com/Tcode-Motion/techscript/main/scripts/install.sh | bash
59+
```
60+
61+
### Via installer.exe — Windows
62+
63+
Download `TechScript_Setup.exe` from [GitHub Releases](https://github.com/Tcode-Motion/techscript/releases/latest).
64+
65+
### Via Termux — Android
66+
67+
```bash
68+
pkg update
69+
pkg install curl python
70+
# Option 1: Python installer
71+
pip install techscript
72+
techscript install
73+
74+
# Option 2: Shell installer
75+
curl -fsSL https://raw.githubusercontent.com/Tcode-Motion/techscript/main/scripts/install.sh | bash
76+
```
77+
78+
### Via Homebrew — macOS *(coming soon)*
79+
80+
```bash
81+
brew install tcode-motion/tap/techscript
82+
```
83+
84+
### Via Winget — Windows *(coming soon)*
85+
86+
```powershell
87+
winget install Tcode-Motion.TechScript
88+
```
89+
90+
### Via Scoop — Windows *(coming soon)*
91+
92+
```powershell
93+
scoop install techscript
94+
```
95+
96+
---
97+
98+
## Usage
99+
100+
### Install the compiler
101+
102+
```bash
103+
techscript install
104+
```
105+
106+
### Force reinstall / update
107+
108+
```bash
109+
techscript install --force
110+
```
111+
112+
### Check installed version
113+
114+
```bash
115+
techscript version
116+
```
117+
118+
### Check for updates
119+
120+
```bash
121+
techscript check
122+
```
123+
124+
### Uninstall
125+
126+
```bash
127+
techscript uninstall
128+
```
129+
130+
### Forward commands to tsc
131+
132+
```bash
133+
# These are equivalent:
134+
techscript run myfile.txs
135+
tsc run myfile.txs
136+
```
137+
138+
---
139+
140+
## Quick Start
141+
142+
After installing:
143+
144+
```bash
145+
# Create a new project
146+
tsc new hello_world
147+
cd hello_world
148+
149+
# Run it
150+
tsc run
151+
```
152+
153+
Your first `src/main.txs`:
154+
155+
```txs
156+
say "Hello, World! 🌍"
157+
name = ask "What is your name? "
158+
say $"Welcome, {name}! You are running TechScript 2.0."
159+
```
160+
161+
---
162+
163+
## Install Locations
164+
165+
| Platform | Location |
166+
|---|---|
167+
| Windows | `%LOCALAPPDATA%\TechScript\bin\tsc.exe` |
168+
| Linux / macOS | `~/.local/bin/tsc` |
169+
| Termux | `$PREFIX/bin/tsc` |
170+
171+
---
172+
173+
## Debug Mode
174+
175+
Enable verbose output and Python tracebacks:
176+
177+
```bash
178+
techscript install --debug
179+
```
180+
181+
---
182+
183+
## Requirements
184+
185+
- Python 3.8 or newer
186+
- Internet access (to download the compiler binary)
187+
- The `requests` library (installed automatically)
188+
189+
---
190+
191+
## Development
192+
193+
```bash
194+
git clone https://github.com/Tcode-Motion/techscript
195+
cd techscript/python-installer
196+
197+
# Install in editable mode
198+
pip install -e .
199+
200+
# Run tests
201+
python -m pytest tests/ -v
202+
203+
# Build wheel and sdist
204+
python -m build
205+
```
206+
207+
---
208+
209+
## Links
210+
211+
| Resource | Link |
212+
|---|---|
213+
| 🌐 Website | [techscript.is-a.dev](https://techscript.is-a.dev) |
214+
| 📦 GitHub | [Tcode-Motion/techscript](https://github.com/Tcode-Motion/techscript) |
215+
| 🐍 PyPI | [pypi.org/project/techscript](https://pypi.org/project/techscript/) |
216+
| 💻 VS Code Extension | [marketplace.visualstudio.com](https://marketplace.visualstudio.com/items?itemName=tanmoy.techscript) |
217+
| 🐛 Issues | [GitHub Issues](https://github.com/Tcode-Motion/techscript/issues) |
218+
| 💬 Discussions | [GitHub Discussions](https://github.com/Tcode-Motion/techscript/discussions) |
219+
220+
---
221+
222+
## License
223+
224+
MIT License — Copyright © 2026 [Tcode-Motion](https://github.com/Tcode-Motion)
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
[build-system]
2+
requires = ["hatchling"]
3+
build-backend = "hatchling.build"
4+
5+
[project]
6+
name = "techscript-lang"
7+
version = "2.0.0"
8+
description = "Official installer and launcher for the TechScript 2.0 programming language toolchain"
9+
readme = "README.md"
10+
license = { file = "LICENSE" }
11+
requires-python = ">=3.8"
12+
authors = [
13+
{ name = "Tcode-Motion", email = "tcode.motion@gmail.com" }
14+
]
15+
keywords = ["techscript", "compiler", "installer", "tsc", "programming-language"]
16+
classifiers = [
17+
"Development Status :: 5 - Production/Stable",
18+
"Environment :: Console",
19+
"Intended Audience :: Developers",
20+
"License :: OSI Approved :: MIT License",
21+
"Operating System :: OS Independent",
22+
"Programming Language :: Python :: 3",
23+
"Programming Language :: Python :: 3.8",
24+
"Programming Language :: Python :: 3.9",
25+
"Programming Language :: Python :: 3.10",
26+
"Programming Language :: Python :: 3.11",
27+
"Programming Language :: Python :: 3.12",
28+
"Topic :: Software Development :: Compilers",
29+
"Topic :: System :: Installation/Setup",
30+
]
31+
dependencies = [
32+
"requests>=2.28.0",
33+
]
34+
35+
[project.urls]
36+
Homepage = "https://techscript.is-a.dev"
37+
Repository = "https://github.com/Tcode-Motion/techscript"
38+
Issues = "https://github.com/Tcode-Motion/techscript/issues"
39+
Changelog = "https://github.com/Tcode-Motion/techscript/blob/main/CHANGELOG.md"
40+
41+
[project.scripts]
42+
techscript = "techscript.__main__:main"
43+
44+
[tool.hatch.build.targets.wheel]
45+
packages = ["techscript"]
46+
47+
[tool.hatch.build.targets.sdist]
48+
include = [
49+
"techscript/",
50+
"tests/",
51+
"README.md",
52+
"LICENSE",
53+
"pyproject.toml",
54+
]
55+
56+
[project.optional-dependencies]
57+
dev = ["build", "hatchling"]
58+

0 commit comments

Comments
 (0)