Skip to content

Commit ded0988

Browse files
committed
Merge remote-tracking branch 'origin/feature/tinytorch-core' into dev
2 parents 23787b7 + 400f302 commit ded0988

3 files changed

Lines changed: 36 additions & 7 deletions

File tree

tinytorch/.gitattributes

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,6 @@ tinytorch/core/*.py linguist-generated=true
33
tinytorch/**/*.py linguist-generated=true
44
# Exclude from diff by default (reduces noise)
55
tinytorch/core/*.py -diff
6+
# Set default line termination behavior for all text files (cross-platform)
7+
# Contributed by @rnjema (PR #1105)
8+
* text=auto

tinytorch/CHANGELOG.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [0.1.5] - 2026-01-27
11+
1012
### Added
11-
- Dynamic `tito --version` command showing current TinyTorch version
12-
- CHANGELOG.md for tracking releases
13-
- Updated publish workflow with release_type (patch/minor/major)
13+
- Windows/Git Bash support for installer script (thanks @rnjema, @joeswagson, @Kobra299!)
14+
- Platform detection (`get_platform()`) for OS-specific guidance
15+
- Cross-platform line endings via `.gitattributes`
1416

1517
### Changed
16-
- Version now managed in `tinytorch/__init__.py` and `pyproject.toml`
18+
- Installer uses `$PYTHON_CMD -m pip` for more reliable pip invocation
19+
- Dynamic `tito --version` command showing current TinyTorch version
20+
21+
### Fixed
22+
- Virtual environment activation now works correctly on Windows Git Bash
1723

1824
## [0.1.1] - 2025-01-13
1925

tinytorch/site/extra/install.sh

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,19 @@ get_python_cmd() {
220220
echo ""
221221
}
222222

223+
# Find the system platform (linux, macos, windows)
224+
# Contributed by @rnjema (PR #1105)
225+
get_platform() {
226+
local uname_out
227+
uname_out=$(uname -s)
228+
case "${uname_out}" in
229+
Linux*) echo "linux";;
230+
Darwin*) echo "macos";;
231+
CYGWIN*|MINGW*|MSYS*) echo "windows";;
232+
*) echo "unknown";;
233+
esac
234+
}
235+
223236
# ============================================================================
224237
# Pre-flight Checks
225238
# These run before any installation to catch problems early
@@ -266,6 +279,7 @@ check_prerequisites() {
266279

267280
# Check for Python 3.10+
268281
PYTHON_CMD=$(get_python_cmd)
282+
PLATFORM=$(get_platform)
269283
if [ -n "$PYTHON_CMD" ]; then
270284
# We know it's good because get_python_cmd validates it, but we run check again to get the version string
271285
PY_VERSION=$(check_python_version "$PYTHON_CMD")
@@ -293,6 +307,11 @@ check_prerequisites() {
293307
fi
294308
fi
295309

310+
# Show Windows-specific guidance (contributed by @rnjema)
311+
if [ "$PLATFORM" = "windows" ]; then
312+
print_info "Windows detected - using Git Bash/WSL compatible mode"
313+
fi
314+
296315
if [ $errors -gt 0 ]; then
297316
echo ""
298317
print_error "Missing prerequisites. Please fix the issues above."
@@ -472,26 +491,27 @@ do_install() {
472491

473492
# -------------------------------------------------------------------------
474493
# Step 3: Install dependencies
494+
# Uses $PYTHON_CMD -m pip for reliability (contributed by @rnjema)
475495
# -------------------------------------------------------------------------
476496
echo -e "${BLUE}[3/4]${NC} Installing dependencies..."
477497

478498
# Upgrade pip first
479-
pip install --upgrade pip -q 2>/dev/null &
499+
$PYTHON_CMD -m pip install --upgrade pip -q 2>/dev/null &
480500
local pip_pid=$!
481501
spin $pip_pid "Upgrading pip..."
482502
wait $pip_pid
483503

484504
# Install from requirements.txt
485505
if [ -f "requirements.txt" ]; then
486506
total_pkgs=$(grep -c -E "^[^#]" requirements.txt 2>/dev/null || echo "?")
487-
pip install -r requirements.txt -q 2>/dev/null &
507+
$PYTHON_CMD -m pip install -r requirements.txt -q 2>/dev/null &
488508
local req_pid=$!
489509
spin $req_pid "Installing $total_pkgs packages..."
490510
wait $req_pid
491511
fi
492512

493513
# Install TinyTorch package in editable mode (includes tito CLI)
494-
pip install -e . -q 2>/dev/null &
514+
$PYTHON_CMD -m pip install -e . -q 2>/dev/null &
495515
local tt_pid=$!
496516
spin $tt_pid "Installing TinyTorch..."
497517
wait $tt_pid

0 commit comments

Comments
 (0)