forked from svartalf/python-wargaming
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsetup.py
69 lines (56 loc) · 2.1 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
# -*- coding: utf-8 -*-
import os
from codecs import open
from setuptools import setup, find_packages
from setuptools.command.test import test as TestCommand
from wargaming.version import VERSION
class PyTest(TestCommand):
def finalize_options(self):
TestCommand.finalize_options(self)
self.test_args = ['tests/']
self.test_suite = True
def run_tests(self):
import pytest
pytest.main(self.test_args)
if 'VERIFY_ENDPOINTS' in os.environ:
from tests import validate_endpoints
validate_endpoints.main()
def lines(filename):
return [x.strip() for x in open(filename).read().splitlines()]
install_requires = lines('requirements.txt')
test_requires = lines('requirements_test.txt')
here = os.path.abspath(os.path.dirname(__file__))
# Get the long description from the README file
with open(os.path.join(here, 'README.rst'), encoding='utf-8') as f:
long_description = f.read()
setup(
name='wargaming',
version='%s.%s.%s' % VERSION,
author='svartalf',
author_email='[email protected]',
url='https://github.com/svartalf/python-wargaming',
description='API library for Wargaming.net',
long_description=long_description,
long_description_content_type='text/x-rst',
license='MIT',
packages=find_packages(exclude=['tests', 'docs']),
package_data={'wargaming': ['schema/*.json']},
install_requires=install_requires,
tests_require=install_requires + test_requires,
cmdclass={'test': PyTest},
classifiers=[
'Development Status :: 3 - Alpha',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: Implementation :: PyPy',
'Topic :: Software Development :: Libraries',
],
keywords='wargaming wot',
zip_safe=False,
)