forked from lk-geimfari/mimesis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
executable file
·98 lines (86 loc) · 2.41 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
88
89
90
91
92
93
94
95
96
97
98
import os
import sys
from distutils.core import setup
from setuptools.command.test import test as TestCommand
here = os.path.abspath(os.path.dirname(__file__))
# Long description.
with open('PYPI_README.rst', 'r', encoding='utf-8') as f:
readme = f.read()
about = {}
# Get meta-data from __version__.py
with open(os.path.join(here, 'mimesis', '__version__.py')) as f:
exec(f.read(), about)
class PyTest(TestCommand):
"""Custom command for running test using setup.py test"""
user_options = [('pytest-args=', 'a', 'Arguments to pass to py.test')]
def initialize_options(self):
TestCommand.initialize_options(self)
self.pytest_args = []
def finalize_options(self):
TestCommand.finalize_options(self)
self.test_args = []
self.test_suite = True
def run_tests(self):
import pytest
errno = pytest.main(self.pytest_args)
sys.exit(errno)
setup(
name=about['__title__'],
version=about['__version__'],
description=about['__description__'],
long_description=readme,
author=about['__author__'],
author_email=about['__author_email__'],
url=about['__url__'],
license=about['__license__'],
packages=[
'mimesis',
'mimesis.data',
'mimesis.data.int',
'mimesis.builtins',
'mimesis.constants',
'mimesis.providers',
],
keywords=[
'fake',
'mock',
'data',
'populate',
'database',
'testing',
'generate',
'mimesis',
'dummy',
],
package_data={
'mimesis': [
'data/*/*',
],
},
data_files=[
('', ['LICENSE',
'PYPI_README.rst',
],
),
],
classifiers=[
'License :: OSI Approved :: MIT License',
'Intended Audience :: Developers',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: Implementation :: CPython',
'Operating System :: OS Independent',
'Topic :: Software Development',
'Topic :: Software Development :: Testing',
],
tests_require=[
'pytest',
'flake8-builtins',
'flake8-commas',
'flake8-quotes',
'pytest-flake8',
],
cmdclass={'test': PyTest},
)