-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.py
57 lines (46 loc) · 1.62 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
"""Setup file."""
import os
import sys
from setuptools import setup, find_packages
from setuptools.command.test import test as TestCommand
from codecs import open
root_path = os.path.dirname(os.path.abspath(__file__))
class PyTest(TestCommand):
"""Run test suite."""
def initialize_options(self):
"""Initialize arguments to execute."""
TestCommand.initialize_options(self)
self.pytest_args = [
'-v', '--pylama', '--cov-report=term-missing',
'--cov=bot_calendario_telegram', 'tests/'
]
def run_tests(self):
"""Run the suite."""
import pytest
errno = pytest.main(self.pytest_args)
sys.exit(errno)
# long description
with open(os.path.join(root_path, "README.md"), encoding='utf-8') as f:
long_description = f.read()
# requirements
with open(os.path.join(root_path, 'requirements.txt'), encoding='utf-8') as f:
requirements = list(filter(None, f.read().split('\n')))
# test requirements
with open(
os.path.join(root_path, 'test_requirements.txt'),
encoding='utf-8') as f:
test_requirements = list(filter(None, f.read().split('\n')))
setup(
name='bot-calendario-telegram',
version='0.4',
description='A telegram bot to keep every objective up to date.',
long_description=long_description,
url="https://github.com/lulivi/bot-calendario-telegram",
author='Luis Liñán',
author_email='[email protected]',
license="GPLv3",
packages=find_packages(exclude=['docs', 'tests', 'data']),
install_requires=requirements,
tests_require=test_requirements,
cmdclass={'test': PyTest},
)