-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathsetup.py
More file actions
executable file
·64 lines (53 loc) · 2.4 KB
/
Copy pathsetup.py
File metadata and controls
executable file
·64 lines (53 loc) · 2.4 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#!/usr/bin/env python
from distutils.core import setup
from distutils.extension import Extension
from distutils.sysconfig import get_config_vars
from build_config import *
if local_compiler is not None:
# Kludge: Force compiler of choice for building _rho_j_k.c.
# _rho_j_k.c only contains a plain c-function with no python-
# dependencies at all. Hence, just blatantly set simple
# compiler, linker and flags.
# (inspired by GPAW setup.py)
config_vars = get_config_vars()
for key in ['BASECFLAGS', 'CFLAGS', 'OPT', 'PY_CFLAGS',
'CCSHARED', 'CFLAGSFORSHARED', 'LINKFORSHARED',
'LIBS', 'SHLIBS']:
config_vars[key] = ''
config_vars['CC'] = local_compiler
config_vars['LDSHARED'] = ' '.join([local_linker] +
local_link_shared)
rho_j_k_d_ext = Extension('dsf._rho_j_k_d',
sources=['src/_rho_j_k.c'],
define_macros=[('RHOPREC', 'double')],
extra_compile_args=extra_compile_args,
extra_link_args=extra_link_args,
)
rho_j_k_s_ext = Extension('dsf._rho_j_k_s',
sources=['src/_rho_j_k.c'],
define_macros=[('RHOPREC', 'float')],
extra_compile_args=extra_compile_args,
extra_link_args=extra_link_args,
)
setup(name = 'python-dynsf',
version = '0.2',
description = 'Tool for calculating the dynamical structure factor',
author = 'Mattias Slabanja',
author_email = 'slabanja@chalmers.se',
packages = ['dsf'],
ext_modules = [rho_j_k_d_ext,
rho_j_k_s_ext],
scripts = ['dynsf'],
data_files = [('share/man/man1', ['dynsf.1'])],
requires = ['numpy'],
license = "GPL2+",
classifiers = ['Development Status :: 3 - Alpha',
'Intended Audience :: Education',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: GNU General Public License (GPL)',
'Programming Language :: Python',
'Programming Language :: C',
'Topic :: Scientific/Engineering :: Chemistry',
'Topic :: Scientific/Engineering :: Physics'
]
)