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
|
#!/usr/bin/env python
import os
import re
try:
from setuptools import setup, Extension
use_setuptools = True
except ImportError:
from distutils.core import setup, Extension
use_setuptools = False
if os.path.isfile("MANIFEST"):
os.unlink("MANIFEST")
BUILD_CEXTENSIONS = True
VERSION = re.search('version = "([^"]+)"',
open("storm/__init__.py").read()).group(1)
def find_packages():
# implement a simple find_packages so we don't have to depend on
# setuptools
packages = []
for directory, subdirectories, files in os.walk("storm"):
if '__init__.py' in files:
packages.append(directory.replace(os.sep, '.'))
return packages
if use_setuptools:
setuptools_kwargs = {
'entry_points' : {
'nose.plugins.0.10' : [
'storm_debug = storm.nose_plugin:StormDebug'],
}
}
else:
setuptools_kwargs = {}
setup(
name="storm",
version=VERSION,
description="Storm is an object-relational mapper (ORM) for Python developed at Canonical.",
author="Gustavo Niemeyer",
author_email="gustavo@niemeyer.net",
maintainer="Storm Developers",
maintainer_email="storm@lists.canonical.com",
license="LGPL",
url="https://storm.canonical.com",
download_url="https://launchpad.net/storm/+download",
packages=find_packages(),
zip_safe=False,
include_package_data=True,
package_data={"": ["*.zcml"]},
classifiers=[
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)",
"Programming Language :: Python",
"Topic :: Database",
"Topic :: Database :: Front-Ends",
"Topic :: Software Development :: Libraries :: Python Modules",
],
ext_modules=(BUILD_CEXTENSIONS and
[Extension("storm.cextensions", ["storm/cextensions.c"])]),
**setuptools_kwargs
)
|