forked from ntt/reverence
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
91 lines (67 loc) · 2.03 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
# setup.py
import sys
if sys.version_info < (2, 7) or sys.version_info >= (2, 8):
raise RuntimeError("Python 2.7 required")
try:
from setuptools import setup
from setuptools import Extension
except ImportError:
from distutils.core import setup
from distutils.extension import Extension
import platform
import os
try:
os.chdir(os.path.dirname(sys.argv[0]))
except OSError:
pass
desc = """\
Reverence is a decoder for, and interface to the bulkdata, cache and
settings of an EVE Online installation. It allows programmatic access
to the game's database tables, and provides various data formatting
functions and helpers for EVE-related applications.
"""
# Collect all the subpackages for inclusion.
p_names = [] # package names.
p_dirs = {} # folders for said packages.
for path, dirs, files in os.walk("src"):
if "__init__.py" in files:
# derive the name from the folder
p = ("reverence." + path[4:].replace("\\", ".")).strip(".")
p_names.append(p) # add it to the package list
p_dirs[p] = path # add its path
setup(
name = "reverence",
url = "http://github.com/ntt/reverence",
version = "1.8.0",
install_requires = ['PyYAML'],
description = "Interface to EVE Online resources",
long_description = desc,
classifiers = [
"License :: OSI Approved :: BSD License",
"Programming Language :: Python :: 2 :: Only",
"Programming Language :: Python :: 2.7",
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Topic :: Database",
"Topic :: Software Development :: Libraries :: Python Modules",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX :: Linux",
],
license = "BSD",
author = "Jamie van den Berge",
author_email = "[email protected]",
ext_modules = [
Extension("reverence._blue", [
"src/blue/__init__.c",
"src/blue/marshal.c",
"src/blue/dbrow.c",
"src/blue/adler32.c",
]),
Extension("reverence._pyFSD", [
"src/blue/fsd.c",
])
],
packages = p_names,
package_dir = p_dirs,
package_data = {"reverence": ['*.txt']},
)