-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.py
75 lines (72 loc) · 2.42 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
from setuptools import setup, find_packages, Extension
import os
import sys
try:
from Cython.Build import cythonize
cython_available = True
except ImportError:
cython_available = False
def get_version():
"""
Gets the version number. Pulls it from the source files rather than
duplicating it.
"""
fn = os.path.join(os.path.dirname(__file__), 'src', 'grassfire', '__init__.py')
try:
lines = open(fn, 'r').readlines()
except IOError:
raise RuntimeError("Could not determine version number"
"(%s not there)" % (fn))
version = None
for l in lines:
# include the ' =' as __version__ might be a part of __all__
if l.startswith('__version__ =', ):
version = eval(l[13:])
break
if version is None:
raise RuntimeError("Could not determine version number: "
"'__version__ =' string not found")
return version
PACKAGES = find_packages('src')
if cython_available:
EXT_MODULES = [] # cythonize("src/tri/CYTHON.pyx")
else:
sys.stderr.write("Cython NOT available, building from .C sources\n")
EXT_MODULES = [
# Extension('oseq._oseq',
# ['src/oseq/_oseq.c']),
]
SCRIPTS = []
REQUIREMENTS = ["geompreds", "tri", "oseq"]
DATA_FILES = []
setup(
name = "grassfire",
version = get_version(),
packages = PACKAGES,
package_dir = {"": "src"},
author = "Martijn Meijers",
author_email = "[email protected]",
description = "",
url = "https://bitbucket.org/bmmeijers/grassfire/",
license = "MIT license",
ext_modules = EXT_MODULES,
data_files = DATA_FILES,
zip_safe = False,
scripts = SCRIPTS,
install_requires = REQUIREMENTS,
classifiers = [
"Development Status :: 3 - Alpha",
# "Development Status :: 4 - Beta",
# "Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Intended Audience :: Information Technology",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Topic :: Software Development :: Libraries",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Scientific/Engineering :: GIS",
"Topic :: Scientific/Engineering :: Information Analysis",
],
)