|
| 1 | +```markdown |
| 2 | + |
| 3 | +\# Windows Development Guide |
| 4 | + |
| 5 | + |
| 6 | + |
| 7 | +This guide helps Windows developers contribute to the Kubernetes Python Client. |
| 8 | + |
| 9 | + |
| 10 | + |
| 11 | +--- |
| 12 | + |
| 13 | + |
| 14 | + |
| 15 | +\## 🧰 Prerequisites |
| 16 | + |
| 17 | + |
| 18 | + |
| 19 | +\- Python 3.8+ (Recommended: Python 3.11+) |
| 20 | + |
| 21 | +\- Git for Windows |
| 22 | + |
| 23 | +\- PowerShell or Command Prompt |
| 24 | + |
| 25 | + |
| 26 | + |
| 27 | +--- |
| 28 | + |
| 29 | + |
| 30 | + |
| 31 | +\## ⚙️ Setup for Windows Development |
| 32 | + |
| 33 | + |
| 34 | + |
| 35 | +\### 1. Clone and setup the repository: |
| 36 | + |
| 37 | + |
| 38 | + |
| 39 | +```bash |
| 40 | + |
| 41 | +git clone https://github.com/your-username/kubernetes-client-python.git |
| 42 | + |
| 43 | +cd kubernetes-client-python |
| 44 | + |
| 45 | +python setup-windows-dev.py |
| 46 | + |
| 47 | +``` |
| 48 | + |
| 49 | + |
| 50 | + |
| 51 | +\### 2. Install in development mode: |
| 52 | + |
| 53 | + |
| 54 | + |
| 55 | +```bash |
| 56 | + |
| 57 | +pip install -e . |
| 58 | + |
| 59 | +pip install -r test-requirements.txt |
| 60 | + |
| 61 | +``` |
| 62 | + |
| 63 | + |
| 64 | + |
| 65 | +\### 3. Run tests: |
| 66 | + |
| 67 | + |
| 68 | + |
| 69 | +```bash |
| 70 | + |
| 71 | +python -m pytest kubernetes/base/watch/watch\_test.py -v |
| 72 | + |
| 73 | +``` |
| 74 | + |
| 75 | + |
| 76 | + |
| 77 | +--- |
| 78 | + |
| 79 | + |
| 80 | + |
| 81 | +\## 🐞 Known Windows Issues and Solutions |
| 82 | + |
| 83 | + |
| 84 | + |
| 85 | +\### 🔗 Symlink Directories |
| 86 | + |
| 87 | +\- \*\*Problem:\*\* `kubernetes/config` and `kubernetes/watch` are symlinks that don't work on Windows. |
| 88 | + |
| 89 | +\- \*\*Solution:\*\* Run `python setup-windows-dev.py` to create proper directory copies. |
| 90 | + |
| 91 | + |
| 92 | + |
| 93 | +\### ❌ Missing Imports |
| 94 | + |
| 95 | +\- \*\*Problem:\*\* Some test files were missing `import json`. |
| 96 | + |
| 97 | +\- \*\*Solution:\*\* Fixed in the codebase. |
| 98 | + |
| 99 | + |
| 100 | + |
| 101 | +\### 🔒 Permission Errors |
| 102 | + |
| 103 | +\- \*\*Problem:\*\* Temporary file creation fails with `PermissionError`. |
| 104 | + |
| 105 | +\- \*\*Solution:\*\* Tests now handle Windows permissions gracefully. |
| 106 | + |
| 107 | + |
| 108 | + |
| 109 | +--- |
| 110 | + |
| 111 | + |
| 112 | + |
| 113 | +\## 🤝 Contributing |
| 114 | + |
| 115 | + |
| 116 | + |
| 117 | +When contributing from Windows: |
| 118 | + |
| 119 | + |
| 120 | + |
| 121 | +1\. Always run the setup script first. |
| 122 | + |
| 123 | +2\. Test your changes locally. |
| 124 | + |
| 125 | +3\. Include Windows-specific considerations in your PRs. |
| 126 | + |
| 127 | +``` |
| 128 | +
|
| 129 | +
|
| 130 | +
|
0 commit comments