python build for windows
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. |
||
|---|---|---|
| .github@f7f41c3659 | ||
| scripts | ||
| .gitignore | ||
| .gitmodules | ||
| CHANGELOG.md | ||
| CODEOFCONDUCT.md | ||
| LICENSE.md | ||
| README.md | ||
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-versionorpyproject.toml - Universal Support: Works with any Python project (public/private repos)
- Dependency Management: Handles
requirements.txt,pyproject.toml, andsetup.py - Build System: Automatically builds with PyInstaller if
.specfile 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
- Run the quick setup command
- Enter your Django repo URL
- Enter deploy token (if private repo)
- Script automatically detects requirements and builds environment
Building a PyInstaller App
- Run the Python project builder
- If your repo has a
.specfile, it builds an executable automatically - Otherwise, sets up development environment
Setting Up Remote Development
- Run SSH server installer (as admin)
- Run Python project builder (as user)
- 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.