Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall/__main__.py
blob: 69a79855cd3f0986b50df9c8a823cb6e3c9cc393 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import importlib
import sys
import pathlib

# Load .git version before the builtin version
if pathlib.Path('./archinstall/__init__.py').absolute().exists():
	spec = importlib.util.spec_from_file_location("archinstall", "./archinstall/__init__.py")

	if spec is None or spec.loader is None:
		raise ValueError('Could not retrieve spec from file: archinstall/__init__.py')

	archinstall = importlib.util.module_from_spec(spec)
	sys.modules["archinstall"] = archinstall
	spec.loader.exec_module(archinstall)
else:
	import archinstall

if __name__ == '__main__':
	archinstall.run_as_a_module()