-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsetup.py
More file actions
106 lines (93 loc) · 3.38 KB
/
setup.py
File metadata and controls
106 lines (93 loc) · 3.38 KB
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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
# Copyright 2015-2019 Cedric RICARD
#
# This file is part of CloudMailing.
#
# CloudMailing is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# CloudMailing is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with CloudMailing. If not, see <http://www.gnu.org/licenses/>.
from __future__ import print_function
from setuptools import setup, find_packages
from setuptools.command.test import test as TestCommand
import io
import codecs
import os
import sys
here = os.path.normpath(os.path.dirname(__file__))
def read_version_from_properties_file():
import os
filename = os.path.join(here, 'cloud_mailing', 'version.properties')
if os.path.exists(filename):
with open(filename, 'rt') as f:
for line in f:
try:
name, value = line.split('=')
if name == 'VERSION':
return value.strip()
except:
pass
return "0.3.0"
def read(*filenames, **kwargs):
encoding = kwargs.get('encoding', 'utf-8')
sep = kwargs.get('sep', '\n')
buf = []
for filename in filenames:
with io.open(os.path.join(here, filename), encoding=encoding) as f:
buf.append(f.read())
return sep.join(buf)
long_description = read('README.md', 'CHANGES.md')
class PyTest(TestCommand):
def finalize_options(self):
TestCommand.finalize_options(self)
self.test_args = []
self.test_suite = True
def run_tests(self):
import pytest
errcode = pytest.main(self.test_args)
sys.exit(errcode)
setup(
name='cloud_mailing',
version=read_version_from_properties_file(),
url='http://github.com/ricard33/cloud_mailing/',
license='GNU Affero General Public License',
author='Cedric RICARD',
tests_require=['pytest'],
install_requires=['twisted',
'pymongo',
'mogo',
'Jinja2',
'watchdog',
],
cmdclass={'test': PyTest},
author_email='ricard@free.fr',
description='An e-mailing engine designed for simplicity and performance',
long_description=long_description,
packages=['cloud_mailing'],
include_package_data=True,
platforms='any',
# test_suite='sandman.test.test_sandman',
classifiers = [
'Programming Language :: Python',
'Development Status :: 4 - Beta',
'Natural Language :: English',
'Environment :: No Input/Output (Daemon)',
'Framework :: Twisted',
'Intended Audience :: Developers',
'License :: OSI Approved :: GNU Affero General Public License v3',
'Operating System :: OS Independent',
'Topic :: Software Development :: Libraries :: Python Modules',
'Topic :: Communications :: Email :: Mailing List Servers',
],
extras_require={
'testing': ['pytest'],
},
scripts=['bin/cm_master.py', 'bin/cm_satellite.py']
)