mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 04:01:32 -06:00
Split requirements into world types, automatically discover and resolve them.
This commit is contained in:
@@ -3,12 +3,20 @@ import sys
|
||||
import subprocess
|
||||
import pkg_resources
|
||||
|
||||
requirements_files = ['requirements.txt']
|
||||
requirements_files = {'requirements.txt'}
|
||||
|
||||
if sys.version_info < (3, 8, 6):
|
||||
raise RuntimeError("Incompatible Python Version. 3.8.7+ is supported.")
|
||||
|
||||
update_ran = getattr(sys, "frozen", False) # don't run update if environment is frozen/compiled
|
||||
|
||||
if not update_ran:
|
||||
for entry in os.scandir("worlds"):
|
||||
if entry.is_dir():
|
||||
req_file = os.path.join(entry.path, "requirements.txt")
|
||||
if os.path.exists(req_file):
|
||||
requirements_files.add(req_file)
|
||||
|
||||
|
||||
def update_command():
|
||||
for file in requirements_files:
|
||||
|
@@ -3,7 +3,7 @@ import multiprocessing
|
||||
import logging
|
||||
|
||||
import ModuleUpdate
|
||||
ModuleUpdate.requirements_files.append(os.path.join("WebHostLib", "requirements.txt"))
|
||||
ModuleUpdate.requirements_files.add(os.path.join("WebHostLib", "requirements.txt"))
|
||||
ModuleUpdate.update()
|
||||
|
||||
from WebHostLib import app as raw_app
|
||||
|
@@ -2,10 +2,6 @@ colorama>=0.4.4
|
||||
websockets>=9.1
|
||||
PyYAML>=5.4.1
|
||||
fuzzywuzzy>=0.18.0
|
||||
bsdiff4>=1.2.1
|
||||
prompt_toolkit>=3.0.18
|
||||
appdirs>=1.4.4
|
||||
maseya-z3pr>=1.0.0rc1
|
||||
xxtea>=2.0.0.post0
|
||||
factorio-rcon-py>=1.2.1
|
||||
jinja2>=3.0.1
|
3
worlds/alttp/requirements.txt
Normal file
3
worlds/alttp/requirements.txt
Normal file
@@ -0,0 +1,3 @@
|
||||
bsdiff4>=1.2.1
|
||||
maseya-z3pr>=1.0.0rc1
|
||||
xxtea>=2.0.0.post0
|
2
worlds/factorio/requirements.txt
Normal file
2
worlds/factorio/requirements.txt
Normal file
@@ -0,0 +1,2 @@
|
||||
kivy>=2.0.0
|
||||
factorio-rcon-py>=1.2.1
|
Reference in New Issue
Block a user