Setup: add setup specific requirements
This commit is contained in:
		
							parent
							
								
									66c15c8639
								
							
						
					
					
						commit
						c7e87bc16a
					
				| 
						 | 
				
			
			@ -308,8 +308,8 @@ async def main(args):
 | 
			
		|||
    if sys.stdin:
 | 
			
		||||
        input_task = asyncio.create_task(console_loop(ctx), name="Input")
 | 
			
		||||
    factorio_server_task = asyncio.create_task(factorio_spinup_server(ctx), name="FactorioSpinupServer")
 | 
			
		||||
    succesful_launch = await factorio_server_task
 | 
			
		||||
    if succesful_launch:
 | 
			
		||||
    successful_launch = await factorio_server_task
 | 
			
		||||
    if successful_launch:
 | 
			
		||||
        factorio_server_task = asyncio.create_task(factorio_server_watcher(ctx), name="FactorioServer")
 | 
			
		||||
        progression_watcher = asyncio.create_task(
 | 
			
		||||
            game_watcher(ctx), name="FactorioProgressionWatcher")
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -38,7 +38,6 @@ def update(yes = False, force = False):
 | 
			
		|||
                for line in requirementsfile:
 | 
			
		||||
                    if line.startswith('https://'):
 | 
			
		||||
                        # extract name and version from url
 | 
			
		||||
                        url = line.split(';')[0]
 | 
			
		||||
                        wheel = line.split('/')[-1]
 | 
			
		||||
                        name, version, _ = wheel.split('-', 2)
 | 
			
		||||
                        line = f'{name}=={version}'
 | 
			
		||||
| 
						 | 
				
			
			@ -58,6 +57,7 @@ def update(yes = False, force = False):
 | 
			
		|||
 | 
			
		||||
if __name__ == "__main__":
 | 
			
		||||
    import argparse
 | 
			
		||||
 | 
			
		||||
    parser = argparse.ArgumentParser(description='Install archipelago requirements')
 | 
			
		||||
    parser.add_argument('-y', '--yes', dest='yes', action='store_true', help='answer "yes" to all questions')
 | 
			
		||||
    parser.add_argument('-f', '--force', dest='force', action='store_true', help='force update')
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										10
									
								
								setup.py
								
								
								
								
							
							
						
						
									
										10
									
								
								setup.py
								
								
								
								
							| 
						 | 
				
			
			@ -3,6 +3,16 @@ import shutil
 | 
			
		|||
import sys
 | 
			
		||||
import sysconfig
 | 
			
		||||
from pathlib import Path
 | 
			
		||||
 | 
			
		||||
import ModuleUpdate
 | 
			
		||||
# I don't really want to have another root directory file for a single requirement, but this special case is also jank.
 | 
			
		||||
# Might move this into a cleaner solution when I think of one.
 | 
			
		||||
with open("freeze_requirements.txt", "w") as f:
 | 
			
		||||
    f.write("cx-Freeze>=6.9\n")
 | 
			
		||||
ModuleUpdate.requirements_files.add("freeze_requirements.txt")
 | 
			
		||||
ModuleUpdate.requirements_files.add(os.path.join("WebHostLib", "requirements.txt"))
 | 
			
		||||
ModuleUpdate.update()
 | 
			
		||||
 | 
			
		||||
import cx_Freeze
 | 
			
		||||
from kivy_deps import sdl2, glew
 | 
			
		||||
from Utils import version_tuple
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue