-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
executable file
·87 lines (76 loc) · 2.99 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
### -*- coding: utf-8 -*- #############################################
# Developed by Maksym Polshcha ([email protected])
# All right reserved, 2012-2014
#######################################################################
"""setup script class for the ZTK-based sterch.conveyor package
"""
__author__ = "Polscha Maxim ([email protected])"
__license__ = "ZPL"
import os
from setuptools import setup, find_packages
def read(*rnames):
return open(os.path.join(os.path.dirname(__file__), *rnames)).read()
def alltests():
import logging
import pkg_resources
import unittest
class NullHandler(logging.Handler):
level = 50
def emit(self, record):
pass
logging.getLogger().addHandler(NullHandler())
suite = unittest.TestSuite()
base = pkg_resources.working_set.find(
pkg_resources.Requirement.parse('sterch.conveyor')).location
for dirpath, dirnames, filenames in os.walk(base):
if os.path.basename(dirpath) == 'tests':
for filename in filenames:
if filename.endswith('.py') and filename.startswith('test'):
mod = __import__(
_modname(dirpath, base, os.path.splitext(filename)[0]),
{}, {}, ['*'])
suite.addTest(mod.test_suite())
elif 'tests.py' in filenames:
continue
mod = __import__(_modname(dirpath, base, 'tests'), {}, {}, ['*'])
suite.addTest(mod.test_suite())
return suite
setup( name='sterch.conveyor',
version='0.2.2',
url='https://github.com/maxpmaxp/sterch.conveyor',
license='ZPL 2.2',
description='Provides ZCML-based tools to define simultaneous tasks processing conveyors',
author='Maksym Polscha',
author_email='[email protected]',
long_description=(
read('README.txt')
+ '\n' +
read('CHANGES.txt')
),
classifiers=[
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: Zope Public License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 2.5",
"Programming Language :: Python :: 2.6",
"Topic :: Software Development :: Libraries :: Python Modules",
],
packages=find_packages('src'),
package_dir={'': 'src'},
namespace_packages=['sterch'],
include_package_data=True,
exclude_package_data = { '': ['.gitignore', 'bootstrap.py', 'buildout.cfg'] },
install_requires=['setuptools',
'zope.interface',
'zope.schema',
'zope.cachedescriptors',
'zope.configuration',
'zope.component',
'sterch.threading',
'sterch.queue',
],
extras_require={'test': ['zope.testing'],},
test_suite='__main__.alltests',
tests_require=['zope.testing'],
)