-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsetup.py
More file actions
89 lines (77 loc) · 2.53 KB
/
setup.py
File metadata and controls
89 lines (77 loc) · 2.53 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
import sys
from setuptools import find_packages, setup
from setuptools.command.test import test as TestCommand
PACKAGE_TYPE = 'pg-tools'
PACKAGE_NAME = 'transparent-alter-type'
PACKAGE_DESC = 'alter type of column without long locks'
PACKAGE_LONG_DESC = ''
PACKAGE_VERSION = '3.1.0'
class PyTest(TestCommand):
user_options = [('pytest-args=', 'a', "Arguments to pass to pytest")]
def initialize_options(self):
super().initialize_options()
# default list of options for testing
# https://docs.pytest.org/en/latest/logging.html
self.pytest_args = (
'--flake8 {0} tests examples '
'--junitxml=.reports/{0}_junit.xml '
'--cov={0} --cov=tests '
'-p no:logging'.format(PACKAGE_NAME.replace('-', '_'))
)
def run_tests(self):
import shlex
# import here, cause outside the eggs aren't loaded
import pytest
errno = pytest.main(shlex.split(self.pytest_args))
sys.exit(errno)
setup_requires = []
install_requires = [
'asyncpg>=0.27.0',
'pg-export>=3.7.0',
]
tests_require = [
'flake8>=5,<6',
'pytest',
'pytest-cov',
'pytest-flake8',
'pytest-asyncio',
'pytest-sugar',
'asynctest',
]
console_scripts = [
'transparent_alter_type=transparent_alter_type.main:main'
]
setup(
name=PACKAGE_NAME,
version=PACKAGE_VERSION,
description=PACKAGE_DESC,
long_description=PACKAGE_LONG_DESC,
url='https://git.dev.uiscom.ru/{}/{}'.format(PACKAGE_TYPE, PACKAGE_NAME),
author="Andrey Chernyakov",
author_email="a.chernyakov@comagic.dev",
license="Nodefined",
classifiers=[
'Development Status :: 5 - Production/Stable',
'Environment :: Console',
'Framework :: Pytest',
'Intended Audience :: Customer Service',
'Intended Audience :: Information Technology',
'License :: Other/Proprietary License',
'License :: UIS License',
'Natural Language :: Russian',
'Natural Language :: English',
'Operating System :: POSIX',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
],
zip_safe=False,
packages=find_packages(exclude=['tests', 'examples', '.reports']),
entry_points={'console_scripts': console_scripts},
python_requires='>=3.8',
setup_requires=setup_requires,
install_requires=install_requires,
tests_require=tests_require,
cmdclass={'test': PyTest},
include_package_data=True
)