1
0
mirror of synced 2024-11-12 01:00:46 +01:00

Fix multiprocessing crash on windows.

This commit is contained in:
DragonMinded 2021-05-28 19:50:59 -04:00
parent bc46d83452
commit ac4b139b08
22 changed files with 180 additions and 158 deletions

View File

@ -1,9 +1,10 @@
#! /usr/bin/env python3 #! /usr/bin/env python3
import os if __name__ == "__main__":
path = os.path.abspath(os.path.dirname(__file__)) import os
path = os.path.abspath(os.path.dirname(__file__))
import sys import sys
sys.path.append(path) sys.path.append(path)
import runpy import runpy
runpy.run_module("bemani.utils.twodxutils", run_name="__main__") runpy.run_module("bemani.utils.twodxutils", run_name="__main__")

View File

@ -1,10 +1,11 @@
#! /usr/bin/env python3 #! /usr/bin/env python3
import os if __name__ == "__main__":
path = os.path.abspath(os.path.dirname(__file__)) import os
name = os.path.basename(__file__) path = os.path.abspath(os.path.dirname(__file__))
name = os.path.basename(__file__)
import sys import sys
sys.path.append(path) sys.path.append(path)
import runpy import runpy
runpy.run_module(f"bemani.utils.{name}", run_name="__main__") runpy.run_module(f"bemani.utils.{name}", run_name="__main__")

15
api
View File

@ -1,10 +1,11 @@
#! /usr/bin/env python3 #! /usr/bin/env python3
import os if __name__ == "__main__":
path = os.path.abspath(os.path.dirname(__file__)) import os
name = os.path.basename(__file__) path = os.path.abspath(os.path.dirname(__file__))
name = os.path.basename(__file__)
import sys import sys
sys.path.append(path) sys.path.append(path)
import runpy import runpy
runpy.run_module(f"bemani.utils.{name}", run_name="__main__") runpy.run_module(f"bemani.utils.{name}", run_name="__main__")

View File

@ -1,10 +1,11 @@
#! /usr/bin/env python3 #! /usr/bin/env python3
import os if __name__ == "__main__":
path = os.path.abspath(os.path.dirname(__file__)) import os
name = os.path.basename(__file__) path = os.path.abspath(os.path.dirname(__file__))
name = os.path.basename(__file__)
import sys import sys
sys.path.append(path) sys.path.append(path)
import runpy import runpy
runpy.run_module(f"bemani.utils.{name}", run_name="__main__") runpy.run_module(f"bemani.utils.{name}", run_name="__main__")

View File

@ -1,10 +1,11 @@
#! /usr/bin/env python3 #! /usr/bin/env python3
import os if __name__ == "__main__":
path = os.path.abspath(os.path.dirname(__file__)) import os
name = os.path.basename(__file__) path = os.path.abspath(os.path.dirname(__file__))
name = os.path.basename(__file__)
import sys import sys
sys.path.append(path) sys.path.append(path)
import runpy import runpy
runpy.run_module(f"bemani.utils.{name}", run_name="__main__") runpy.run_module(f"bemani.utils.{name}", run_name="__main__")

View File

@ -1,10 +1,11 @@
#! /usr/bin/env python3 #! /usr/bin/env python3
import os if __name__ == "__main__":
path = os.path.abspath(os.path.dirname(__file__)) import os
name = os.path.basename(__file__) path = os.path.abspath(os.path.dirname(__file__))
name = os.path.basename(__file__)
import sys import sys
sys.path.append(path) sys.path.append(path)
import runpy import runpy
runpy.run_module(f"bemani.utils.{name}", run_name="__main__") runpy.run_module(f"bemani.utils.{name}", run_name="__main__")

View File

@ -1,10 +1,11 @@
#! /usr/bin/env python3 #! /usr/bin/env python3
import os if __name__ == "__main__":
path = os.path.abspath(os.path.dirname(__file__)) import os
name = os.path.basename(__file__) path = os.path.abspath(os.path.dirname(__file__))
name = os.path.basename(__file__)
import sys import sys
sys.path.append(path) sys.path.append(path)
import runpy import runpy
runpy.run_module(f"bemani.utils.{name}", run_name="__main__") runpy.run_module(f"bemani.utils.{name}", run_name="__main__")

15
dbutils
View File

@ -1,10 +1,11 @@
#! /usr/bin/env python3 #! /usr/bin/env python3
import os if __name__ == "__main__":
path = os.path.abspath(os.path.dirname(__file__)) import os
name = os.path.basename(__file__) path = os.path.abspath(os.path.dirname(__file__))
name = os.path.basename(__file__)
import sys import sys
sys.path.append(path) sys.path.append(path)
import runpy import runpy
runpy.run_module(f"bemani.utils.{name}", run_name="__main__") runpy.run_module(f"bemani.utils.{name}", run_name="__main__")

View File

@ -1,10 +1,11 @@
#! /usr/bin/env python3 #! /usr/bin/env python3
import os if __name__ == "__main__":
path = os.path.abspath(os.path.dirname(__file__)) import os
name = os.path.basename(__file__) path = os.path.abspath(os.path.dirname(__file__))
name = os.path.basename(__file__)
import sys import sys
sys.path.append(path) sys.path.append(path)
import runpy import runpy
runpy.run_module(f"bemani.utils.{name}", run_name="__main__") runpy.run_module(f"bemani.utils.{name}", run_name="__main__")

View File

@ -1,10 +1,11 @@
#! /usr/bin/env python3 #! /usr/bin/env python3
import os if __name__ == "__main__":
path = os.path.abspath(os.path.dirname(__file__)) import os
name = os.path.basename(__file__) path = os.path.abspath(os.path.dirname(__file__))
name = os.path.basename(__file__)
import sys import sys
sys.path.append(path) sys.path.append(path)
import runpy import runpy
runpy.run_module(f"bemani.utils.{name}", run_name="__main__") runpy.run_module(f"bemani.utils.{name}", run_name="__main__")

View File

@ -1,10 +1,11 @@
#! /usr/bin/env python3 #! /usr/bin/env python3
import os if __name__ == "__main__":
path = os.path.abspath(os.path.dirname(__file__)) import os
name = os.path.basename(__file__) path = os.path.abspath(os.path.dirname(__file__))
name = os.path.basename(__file__)
import sys import sys
sys.path.append(path) sys.path.append(path)
import runpy import runpy
runpy.run_module(f"bemani.utils.{name}", run_name="__main__") runpy.run_module(f"bemani.utils.{name}", run_name="__main__")

15
proxy
View File

@ -1,10 +1,11 @@
#! /usr/bin/env python3 #! /usr/bin/env python3
import os if __name__ == "__main__":
path = os.path.abspath(os.path.dirname(__file__)) import os
name = os.path.basename(__file__) path = os.path.abspath(os.path.dirname(__file__))
name = os.path.basename(__file__)
import sys import sys
sys.path.append(path) sys.path.append(path)
import runpy import runpy
runpy.run_module(f"bemani.utils.{name}", run_name="__main__") runpy.run_module(f"bemani.utils.{name}", run_name="__main__")

15
psmap
View File

@ -1,10 +1,11 @@
#! /usr/bin/env python3 #! /usr/bin/env python3
import os if __name__ == "__main__":
path = os.path.abspath(os.path.dirname(__file__)) import os
name = os.path.basename(__file__) path = os.path.abspath(os.path.dirname(__file__))
name = os.path.basename(__file__)
import sys import sys
sys.path.append(path) sys.path.append(path)
import runpy import runpy
runpy.run_module(f"bemani.utils.{name}", run_name="__main__") runpy.run_module(f"bemani.utils.{name}", run_name="__main__")

15
read
View File

@ -1,10 +1,11 @@
#! /usr/bin/env python3 #! /usr/bin/env python3
import os if __name__ == "__main__":
path = os.path.abspath(os.path.dirname(__file__)) import os
name = os.path.basename(__file__) path = os.path.abspath(os.path.dirname(__file__))
name = os.path.basename(__file__)
import sys import sys
sys.path.append(path) sys.path.append(path)
import runpy import runpy
runpy.run_module(f"bemani.utils.{name}", run_name="__main__") runpy.run_module(f"bemani.utils.{name}", run_name="__main__")

15
replay
View File

@ -1,10 +1,11 @@
#! /usr/bin/env python3 #! /usr/bin/env python3
import os if __name__ == "__main__":
path = os.path.abspath(os.path.dirname(__file__)) import os
name = os.path.basename(__file__) path = os.path.abspath(os.path.dirname(__file__))
name = os.path.basename(__file__)
import sys import sys
sys.path.append(path) sys.path.append(path)
import runpy import runpy
runpy.run_module(f"bemani.utils.{name}", run_name="__main__") runpy.run_module(f"bemani.utils.{name}", run_name="__main__")

View File

@ -1,10 +1,11 @@
#! /usr/bin/env python3 #! /usr/bin/env python3
import os if __name__ == "__main__":
path = os.path.abspath(os.path.dirname(__file__)) import os
name = os.path.basename(__file__) path = os.path.abspath(os.path.dirname(__file__))
name = os.path.basename(__file__)
import sys import sys
sys.path.append(path) sys.path.append(path)
import runpy import runpy
runpy.run_module(f"bemani.utils.{name}", run_name="__main__") runpy.run_module(f"bemani.utils.{name}", run_name="__main__")

View File

@ -1,10 +1,11 @@
#! /usr/bin/env python3 #! /usr/bin/env python3
import os if __name__ == "__main__":
path = os.path.abspath(os.path.dirname(__file__)) import os
name = os.path.basename(__file__) path = os.path.abspath(os.path.dirname(__file__))
name = os.path.basename(__file__)
import sys import sys
sys.path.append(path) sys.path.append(path)
import runpy import runpy
runpy.run_module(f"bemani.utils.{name}", run_name="__main__") runpy.run_module(f"bemani.utils.{name}", run_name="__main__")

View File

@ -1,10 +1,11 @@
#! /usr/bin/env python3 #! /usr/bin/env python3
import os if __name__ == "__main__":
path = os.path.abspath(os.path.dirname(__file__)) import os
name = os.path.basename(__file__) path = os.path.abspath(os.path.dirname(__file__))
name = os.path.basename(__file__)
import sys import sys
sys.path.append(path) sys.path.append(path)
import runpy import runpy
runpy.run_module(f"bemani.utils.{name}", run_name="__main__") runpy.run_module(f"bemani.utils.{name}", run_name="__main__")

13
shell
View File

@ -1,9 +1,10 @@
#! /usr/bin/env python3 #! /usr/bin/env python3
import os if __name__ == "__main__":
path = os.path.abspath(os.path.dirname(__file__)) import os
path = os.path.abspath(os.path.dirname(__file__))
import sys import sys
sys.path.append(path) sys.path.append(path)
import code import code
code.InteractiveConsole().interact() code.InteractiveConsole().interact()

15
struct
View File

@ -1,10 +1,11 @@
#! /usr/bin/env python3 #! /usr/bin/env python3
import os if __name__ == "__main__":
path = os.path.abspath(os.path.dirname(__file__)) import os
name = os.path.basename(__file__) path = os.path.abspath(os.path.dirname(__file__))
name = os.path.basename(__file__)
import sys import sys
sys.path.append(path) sys.path.append(path)
import runpy import runpy
runpy.run_module(f"bemani.utils.{name}", run_name="__main__") runpy.run_module(f"bemani.utils.{name}", run_name="__main__")

View File

@ -1,10 +1,11 @@
#! /usr/bin/env python3 #! /usr/bin/env python3
import os if __name__ == "__main__":
path = os.path.abspath(os.path.dirname(__file__)) import os
name = os.path.basename(__file__) path = os.path.abspath(os.path.dirname(__file__))
name = os.path.basename(__file__)
import sys import sys
sys.path.append(path) sys.path.append(path)
import runpy import runpy
runpy.run_module(f"bemani.utils.{name}", run_name="__main__") runpy.run_module(f"bemani.utils.{name}", run_name="__main__")

View File

@ -1,16 +1,17 @@
#! /usr/bin/env python3 #! /usr/bin/env python3
import os if __name__ == "__main__":
path = os.path.abspath(os.path.dirname(__file__)) import os
path = os.path.abspath(os.path.dirname(__file__))
import sys import sys
sys.path.append(path) sys.path.append(path)
sys.argv = [ sys.argv = [
sys.argv[0], sys.argv[0],
"discover", "discover",
"-s", "-s",
os.path.join(path, "bemani/tests"), os.path.join(path, "bemani/tests"),
*sys.argv[1:], *sys.argv[1:],
] ]
import runpy import runpy
runpy.run_module("unittest", run_name="__main__") runpy.run_module("unittest", run_name="__main__")