2020-02-17 08:36:17 +00:00
|
|
|
import sys, os
|
2020-02-08 21:57:47 +00:00
|
|
|
|
|
|
|
global_settings = {
|
2020-02-16 21:00:25 +00:00
|
|
|
'XXH_VERSION': '0.2.9'
|
2020-02-08 21:57:47 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|
2020-02-13 19:16:03 +00:00
|
|
|
|
2020-02-17 08:36:17 +00:00
|
|
|
for e in ['XXH_HOME', 'PIP_TARGET', 'PYTHONPATH']:
|
|
|
|
if e in os.environ:
|
|
|
|
global_settings[e] = os.environ[e]
|
|
|
|
|
2020-02-08 21:57:47 +00:00
|
|
|
if len(sys.argv) > 1:
|
|
|
|
setting_name = sys.argv[1]
|
|
|
|
if setting_name in global_settings:
|
|
|
|
print(global_settings[setting_name])
|
|
|
|
else:
|
|
|
|
sys.exit(1)
|
|
|
|
else:
|
|
|
|
print(global_settings)
|