forked from ics-py/ics-py
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
executable file
·75 lines (63 loc) · 2.17 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
#!/usr/bin/env python
#-*- coding: utf-8 -*-
from setuptools import setup
from setuptools.command.test import test as TestCommand
import sys
from meta import __version__, __title__, __license__, __author__
with open("requirements.txt") as f:
install_requires = [line for line in f if line and line[0] not in "#-"]
with open("dev/requirements-test.txt") as f:
tests_require = [line for line in f if line and line[0] not in "#-"]
class PyTest(TestCommand):
def finalize_options(self):
TestCommand.finalize_options(self)
self.test_args = [
'--cov',
'ics',
'ics/',
'tests/'
]
self.test_suite = True
def run_tests(self):
# import here, cause outside the eggs aren't loaded
import pytest
errno = pytest.main(self.test_args)
sys.exit(errno)
def readme():
if sys.version_info.major > 2:
with open('README.rst', encoding='utf-8') as f:
return f.read()
else:
with open('README.rst') as f:
return f.read()
setup(
name=__title__,
version=__version__,
description='Python icalendar (rfc5545) parser',
long_description=readme(),
keywords='ics icalendar calendar event todo rfc5545 parser pythonic',
classifiers=[
'Development Status :: 4 - Beta',
'Topic :: Software Development :: Libraries',
'Topic :: Software Development :: Libraries :: Python Modules',
'Intended Audience :: Developers',
'Topic :: Office/Business :: Scheduling',
'License :: OSI Approved :: Apache Software License',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
],
url='http://github.com/C4ptainCrunch/ics.py',
author=__author__,
author_email='[email protected]',
install_requires=install_requires,
license=__license__,
packages=['ics'],
include_package_data=True,
cmdclass={'test': PyTest},
tests_require=tests_require,
test_suite="py.test",
zip_safe=False,
)