forked from casper-astro/casperfpga
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
76 lines (66 loc) · 2.24 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
import setuptools
import glob
import sysconfig
import os
NAME = 'casperfpga'
DESCRIPTION = 'Talk to CASPER hardware devices using katcp or dcp. See https://github.com/casper-astro/casperfpga for more.'
URL = 'https://github.com/casper-astro/casperfpga'
AUTHOR = 'Tyrone van Balla'
EMAIL = 'tvanballa at ska.ac.za'
here = os.path.abspath(os.path.dirname(__file__))
try:
with open(os.path.join(here, 'README.md')) as readme:
# long_description = readme.read().split('\n')[2]
long_description = '\n{}'.format(readme.read())
except Exception as exc:
# Probably didn't find the file?
long_description = DESCRIPTION
# extra_compile_args = sysconfig.get_config_var('CFLAGS').split()
extra_compile_args = ['-O2', '-Wall']
progska_extension = setuptools.Extension(
'casperfpga.progska',
# sources=['progska/_progska.c', 'progska/progska.c', 'progska/th.c',
# 'progska/netc.c', 'progska/netc.h'],
sources=['progska/_progska.c', 'progska/progska.c', 'progska/th.c',
'progska/netc.c'],
include_dirs=['progska'],
language='c',
# extra_compile_args=extra_compile_args,
# extra_link_args=['-static'],
)
data_files = ['src/tengbe_mmap.txt', 'src/tengbe_mmap_legacy.txt']
setuptools.setup(
name=NAME,
description=DESCRIPTION,
author=AUTHOR,
author_email=EMAIL,
url=URL,
download_url='https://pypi.org/project/casperfpga',
license='GNU GPLv2',
long_description=long_description,
long_description_content_type='text/markdown',
# Specify version in-line here
install_requires=[
'katcp>=0.6.2',
'numpy<1.17',
'odict',
'setuptools',
'tornado<5',
],
packages=['casperfpga'],
package_dir={'casperfpga': 'src'},
scripts=glob.glob('scripts/*'),
setup_requires=['katversion'],
use_katversion=True,
ext_modules=[progska_extension],
# Required for PyPI
keywords='casper ska meerkat fpga',
classifiers=[
"License :: OSI Approved :: GNU General Public License v2 (GPLv2)",
'Programming Language :: Python :: 2.7',
'Operating System :: OS Independent',
'Topic :: Software Development :: Libraries :: Python Modules',
'Topic :: Scientific/Engineering :: Astronomy',
]
)
# end