forked from justengel/isfreader
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
94 lines (77 loc) · 2.81 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
"""
setup.py - Setup file to distribute the library
See Also:
https://github.com/pypa/sampleproject
https://packaging.python.org/en/latest/distributing.html
https://pythonhosted.org/an_example_pypi_project/setuptools.html
"""
import os
import glob
from setuptools import setup, Extension, find_packages
# ========== Normal setup.py helpers ==========
def read(fname):
"""Read in a file"""
with open(os.path.join(os.path.dirname(__file__), fname), 'r') as file:
return file.read()
def get_meta(filename):
"""Return the metadata dictionary from the given filename."""
with open(filename, 'r') as f:
meta = {}
exec(compile(f.read(), filename, 'exec'), meta)
return meta
if __name__ == "__main__":
# Variables
meta = get_meta('isfreader/__meta__.py')
name = meta['name']
version = meta['version']
description = meta['description']
url = meta['url']
author = meta['author']
author_email = meta['author_email']
keywords = 'ISF Tek scope reader'
packages = find_packages(exclude=('tests', 'bin'))
# Extensions
extensions = [
# Extension('lib._lib',
# # define_macros=[('MAJOR_VERSION', '1')],
# # extra_compile_args=['-std=c99'],
# sources=['src/lib.c'],
# include_dirs=['src']),
]
setup(name=name,
version=version,
description=description,
long_description=read('README.rst'),
keywords=keywords,
url=url,
download_url=''.join((url, '/archive/v', version, '.tar.gz')),
author=author,
author_email=author_email,
license='Proprietary',
platforms='any',
classifiers=['Programming Language :: Python',
'Programming Language :: Python :: 3',
'Operating System :: OS Independent'],
scripts=[file for file in glob.iglob('bin/*.py')], # Run with python -m Scripts.module args
ext_modules=extensions, # C extensions
packages=packages,
include_package_data=True,
package_data={pkg: ['*', '*/*', '*/*/*', '*/*/*/*', '*/*/*/*/*']
for pkg in packages if '/' not in pkg and '\\' not in pkg},
# Data files outside of packages
# data_files=[('my_data', ['data/my_data.dat'])],
# options to install extra requirements
install_requires=[
'numpy>=1.9.1',
],
extras_require={
},
# entry_points={
# 'console_scripts': [
# 'plot_csv=bin.plot_csv:plot_csv',
# ],
# 'gui_scripts': [
# 'baz = my_package_gui:start_func',
# ]
# }
)