-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathsetup.py
executable file
·59 lines (53 loc) · 1.49 KB
/
setup.py
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
48
49
50
51
52
53
54
55
56
57
58
59
#!/usr/bin/env python
from setuptools import setup
from distutils.command.build import build
import subprocess, os, stat, shutil
class build_feff(build):
def run(self):
subprocess.call('make -C feff', shell=True)
# ensure the binary is executable
st = os.stat('feff/feff')
os.chmod('feff/feff', st.st_mode | stat.S_IEXEC)
# move to package dir
shutil.move('feff/feff', 'expectra/feff')
class build_custom(build):
def run(self):
self.run_command('build_feff')
build.run(self)
try:
import pypandoc
long_description = pypandoc.convert_file('README.md', 'rst')
except (IOError, ImportError):
long_description = ''
description = 'Code for simulating EXAFS calculations from molecular ' \
'dynamics trajectories or normal modes using FEFF'
setup(
name='expectra',
version='1.0.5',
author='Samuel T. Chill',
author_email='[email protected]',
url='https://github.com/SamChill/expectra',
packages=['expectra'],
scripts=[
'bin/expectra',
'bin/xafsft',
'bin/harmonic-sampler',
'bin/pdfstats',
'bin/feff',
],
package_data={
'expectra': ['feff'],
},
license='LICENSE.txt',
description=description,
long_description=long_description,
install_requires=[
'numpy >= 1.5.0',
'mpi4py >= 1.3',
'ase >= 3.11.0',
],
cmdclass={
'build' : build_custom,
'build_feff' : build_feff,
},
)