MCPcopy Index your code
hub / github.com/BasicProtein/AugmentCode-Free / validate_environment

Method validate_environment

build.py:204–235  ·  view source on GitHub ↗

Validate build environment requirements

(self)

Source from the content-addressed store, hash-verified

202 self.dist_dir = self.build_dir / 'dist'
203
204 def validate_environment(self) -> bool:
205 """Validate build environment requirements"""
206 logger.step("Validating Build Environment")
207
208 # Check Python version
209 min_version = BUILD_CONFIG["python_min_version"]
210 if self.python_version < min_version:
211 logger.error(f"Python {min_version[0]}.{min_version[1]}+ required, got {self.python_version}")
212 return False
213 logger.success(f"Python version: {platform.python_version()}")
214
215 # Check platform
216 logger.info(f"Platform: {self.platform_info['platform']}")
217 logger.info(f"Architecture: {self.platform_info['machine']}")
218
219 # Check required files
220 required_files = ['setup.py', 'main.py', 'requirements.txt']
221 missing_files = [f for f in required_files if not (self.build_dir / f).exists()]
222
223 if missing_files:
224 logger.error(f"Missing required files: {missing_files}")
225 return False
226 logger.success("All required files present")
227
228 # Check core module
229 core_dir = self.build_dir / 'augment_tools_core'
230 if not core_dir.exists() or not core_dir.is_dir():
231 logger.error("augment_tools_core directory not found")
232 return False
233 logger.success("Core module directory found")
234
235 return True
236
237 def clean_build_artifacts(self) -> bool:
238 """Comprehensive cleanup of build artifacts"""

Callers

nothing calls this directly

Calls 4

stepMethod · 0.80
errorMethod · 0.80
successMethod · 0.80
infoMethod · 0.80

Tested by

no test coverage detected