File tree Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Original file line number Diff line number Diff line change 1
1
#!/usr/bin/env python
2
2
#
3
3
# Copyright (C) 2008-2016 CEA/DAM
4
- # Copyright (C) 2016-2017 Stephane Thiell <[email protected] >
4
+ # Copyright (C) 2016-2018 Stephane Thiell <[email protected] >
5
5
#
6
6
# This file is part of ClusterShell.
7
7
#
23
23
from setuptools import setup , find_packages
24
24
25
25
26
- if os .geteuid () == 0 :
27
- # System-wide, out-of-prefix config install (rpmbuild or pip as root)
28
- CFGDIR = '/etc/clustershell'
29
- else :
30
- # User, in-prefix config install (rpmbuild or pip as user)
31
- CFGDIR = 'etc/clustershell'
32
-
33
26
VERSION = '1.8'
34
27
28
+ # Default CFGDIR: in-prefix config install (rpmbuild or pip as user)
29
+ CFGDIR = 'etc/clustershell'
30
+
31
+ # Use system-wide CFGDIR instead when installing as root on Unix
32
+ try :
33
+ if os .geteuid () == 0 :
34
+ CFGDIR = '/etc/clustershell'
35
+ except AttributeError : # Windows?
36
+ pass
37
+
35
38
# Dependencies (for pip install)
36
39
REQUIRES = ['PyYAML' ]
37
40
You can’t perform that action at this time.
0 commit comments