2020-02-17 08:36:17 +00:00
|
|
|
import sys, os
|
2020-02-08 21:57:47 +00:00
|
|
|
|
|
|
|
global_settings = {
|
2020-03-04 09:42:43 +00:00
|
|
|
'XXH_VERSION': '0.3.6'
|
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)
|