forked from scrapy/pypydispatcher
/
setup.py
80 lines (70 loc) · 2.58 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
#!/usr/bin/env python
"""Installs PyDispatcher using distutils (or setuptools/distribute)
Run:
python setup.py install
to install the package from the source archive.
"""
import sys, os
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
extra_commands = {}
extra_arguments = {
'classifiers': [
"""License :: OSI Approved :: BSD License""",
"""Programming Language :: Python""",
"""Programming Language :: Python :: 3""",
"""Topic :: Software Development :: Libraries :: Python Modules""",
"""Intended Audience :: Developers""",
],
#'download_url': "http://sourceforge.net/projects/pydispatcher/files/pydispatcher/",
'keywords': 'dispatcher,dispatch,pydispatch,event,signal,sender,receiver,propagate,multi-consumer,multi-producer,saferef,robustapply,apply',
'long_description' : """Dispatcher mechanism for creating event models
PyDispatcher is an enhanced version of Patrick K. O'Brien's
original dispatcher.py module. It provides the Python
programmer with a robust mechanism for event routing within
various application contexts.
Included in the package are the robustapply and saferef
modules, which provide the ability to selectively apply
arguments to callable objects and to reference instance
methods using weak-references.
""",
'platforms': ['Any'],
}
version = [
(line.split('=')[1]).strip().strip('"').strip("'")
for line in open(os.path.join('pydispatch','__init__.py'))
if line.startswith( '__version__' )
][0]
if __name__ == "__main__":
### Now the actual set up call
setup (
name = "PyPyDispatcher",
version = version,
description= "Multi-producer-multi-consumer signal dispatching mechanism",
author = "Patrick K. O'Brien",
maintainer = "Scrapy project",
author_email = "pydispatcher-devel@lists.sourceforge.net",
maintainer_email = "info@scrapy.org",
url = "https://github.com/scrapy/pypydispatcher",
license = "BSD",
package_dir = {
'pydispatch':'pydispatch',
},
packages = [
'pydispatch',
],
options = {
'sdist':{'use_defaults':0, 'force_manifest':1,'formats': ['gztar'],},
'bdist_rpm':{
'group':'Libraries/Python',
'provides':'python-dispatcher',
'requires':"python",
},
},
cmdclass = extra_commands,
# use_2to3 = True,
# registration metadata
**extra_arguments
)