forked from tfgg/magres-format
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
48 lines (41 loc) · 1.68 KB
/
setup.py
File metadata and controls
48 lines (41 loc) · 1.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/usr/bin/env python
from distutils.core import setup
import os, site, sys
def bin():
return os.path.join(site.USER_BASE, "bin")
def bin_on_path():
return bin() in os.environ['PATH'].split(':')
setup(name='Magres format',
version='0.9',
description='Ab-initio magnetic resonance format',
author='Timothy Green',
author_email='timothy.green@gmail.com',
url='http://www.ccpnc.ac.uk/pmwiki.php/CCPNC/Fileformat',
packages=['magres', 'magres.schema'],
scripts=['scripts/convertoldmagres.py',
'scripts/gui_convertmagres.py',
'scripts/magresjson.py',
'scripts/extract-jc-compare.py',
'scripts/compisc.py',
'scripts/magresmerge.py',
'scripts/extract-jc.py',
'scripts/extract-efg.py',
'scripts/absiscdev.py',
'scripts/nqr.py',
'scripts/magres-yaml.py',
'scripts/magres-average.py',
'scripts/yaml-errors.py',
'scripts/copy-seed-tree.py',
'scripts/magres-ms-pcs.py'],
)
if not bin_on_path() and "--user" in sys.argv[1:]:
print "\n\nWARNING: Your scripts directory (%s) is not on your PATH" % bin()
shell = os.environ["SHELL"].split('/')[-1]
if shell == "bash":
print "You can fix this by adding the following to your .bashrc and reloading your session"
print "export PATH=%s:$PATH" % bin()
elif shell == "tcsh":
print "You can fix this by adding the following to your .tcshrc and reloading your session"
print "setenv PATH %s:$PATH" % bin()
else:
print "You can fix this by adding %s to your PATH environment variable" % bin()