python build for windows
Find a file
hc d76075919b Add comprehensive README with copy-paste one-liner commands
Features:
- Copy-paste ready PowerShell and CMD commands for instant download/run
- Complete documentation of all script features and capabilities
- Clear usage examples for different Python project types
- Troubleshooting section with common issues and solutions
- Quick reference for both Python builder and SSH server setup
- Ultra-convenient one-liners for lazy deployment

Perfect for quickly setting up Python environments or SSH servers
with simple copy-paste commands. No need to clone the repo.
2025-10-28 17:42:38 -04:00
.github@f7f41c3659 chore: add copilot instructions as .github submodule 2025-10-28 16:55:09 -04:00
scripts Bulletproof install_ssh_windows.bat for robust execution 2025-10-28 17:35:09 -04:00
.gitignore chore: add generic .gitignore for common languages and IDEs 2025-10-28 16:55:10 -04:00
.gitmodules chore: add copilot instructions as .github submodule 2025-10-28 16:55:09 -04:00
CHANGELOG.md Add comprehensive README with copy-paste one-liner commands 2025-10-28 17:42:38 -04:00
CODEOFCONDUCT.md chore: add CODEOFCONDUCT.md with Bill & Ted quote 2025-10-28 16:55:10 -04:00
LICENSE.md chore: add base LICENSE.md file 2025-10-28 16:55:10 -04:00
README.md Add comprehensive README with copy-paste one-liner commands 2025-10-28 17:42:38 -04:00

Generic Python Project Builder for Windows

A collection of bulletproof Windows batch scripts for setting up Python development environments and building Python projects without admin privileges.

🚀 Quick Start Commands

Generic Python Project Builder

Download and run the interactive Python project builder:

PowerShell:

Invoke-WebRequest -Uri 'https://code.emmybear.dev/hc/windowspybuild/raw/branch/master/scripts/build_windows.bat' -OutFile 'build_windows.bat'; .\build_windows.bat

CMD:

powershell -Command "Invoke-WebRequest -Uri 'https://code.emmybear.dev/hc/windowspybuild/raw/branch/master/scripts/build_windows.bat' -OutFile 'build_windows.bat'" && build_windows.bat

SSH Server Setup

Download and run the SSH server installer (requires admin):

PowerShell:

Invoke-WebRequest -Uri 'https://code.emmybear.dev/hc/windowspybuild/raw/branch/master/scripts/install_ssh_windows.bat' -OutFile 'install_ssh_windows.bat'; .\install_ssh_windows.bat

CMD:

powershell -Command "Invoke-WebRequest -Uri 'https://code.emmybear.dev/hc/windowspybuild/raw/branch/master/scripts/install_ssh_windows.bat' -OutFile 'install_ssh_windows.bat'" && install_ssh_windows.bat

Ultra Quick Setup

For the laziest approach, just download and run the quick setup:

PowerShell:

Invoke-WebRequest -Uri 'https://code.emmybear.dev/hc/windowspybuild/raw/branch/master/scripts/quick_setup.bat' -OutFile 'quick_setup.bat'; .\quick_setup.bat

📋 What These Scripts Do

build_windows.bat - Generic Python Project Builder

  • Interactive Setup: Prompts for repository URL and deploy token
  • Smart Detection: Auto-detects Python version from .python-version or pyproject.toml
  • Universal Support: Works with any Python project (public/private repos)
  • Dependency Management: Handles requirements.txt, pyproject.toml, and setup.py
  • Build System: Automatically builds with PyInstaller if .spec file found
  • Fast Installation: Uses UV package manager for lightning-fast installs
  • No Admin Required: Creates portable Python environment

install_ssh_windows.bat - SSH Server Setup

  • Admin Required: Installs OpenSSH Server on Windows 10/11
  • Auto-Configuration: Sets up firewall rules and auto-start
  • PowerShell Default: Configures PowerShell as default SSH shell
  • Status Verification: Checks and reports service status
  • Connection Info: Provides clear instructions for SSH access

quick_setup.bat - One-Click Solution

  • Downloads and runs the Python project builder automatically
  • Perfect for fresh Windows installations
  • Just run and follow prompts

🛠️ Features

  • 🔐 Secure: Support for private repositories with deploy tokens
  • Fast: UV package manager for rapid dependency installation
  • 🎯 Smart: Auto-detects project structure and requirements
  • 💪 Robust: Bulletproof batch scripting with proper error handling
  • 🌐 Universal: Works with any Python project structure
  • 📦 Portable: No system modifications, everything in local directory

🔧 Requirements

Python Project Builder

  • Windows 10/11
  • Internet connection
  • No admin privileges required

SSH Server Setup

  • Windows 10/11
  • Administrator privileges
  • Internet connection

📖 Usage Examples

Building a Django Project

  1. Run the quick setup command
  2. Enter your Django repo URL
  3. Enter deploy token (if private repo)
  4. Script automatically detects requirements and builds environment

Building a PyInstaller App

  1. Run the Python project builder
  2. If your repo has a .spec file, it builds an executable automatically
  3. Otherwise, sets up development environment

Setting Up Remote Development

  1. Run SSH server installer (as admin)
  2. Run Python project builder (as user)
  3. Connect remotely and develop

🚨 Troubleshooting

  • Permission Denied: Make sure you're running SSH installer as Administrator
  • Download Failed: Check internet connection and firewall settings
  • Token Issues: Verify your deploy token has read access to the repository
  • Build Failed: Check that all required files are in your repository

📝 Notes

  • All scripts use delayed expansion for robust variable handling
  • Error messages include helpful troubleshooting information
  • Scripts are designed to work on first try with proper error handling
  • No system-wide changes made by Python builder (portable installation)

Save any of the quick commands above and run them whenever you need to set up a Python development environment or SSH server on Windows.