/
setup.py
executable file
·70 lines (59 loc) · 2.05 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
#!/usr/bin/env python
from setuptools.command.test import test as TestCommand
import codecs
import setuptools
import sys
from setupext import pip
def _read_file(filename):
with codecs.open(filename, 'rb', encoding='utf-8') as file_obj:
return '\n' + file_obj.read()
class Tox(TestCommand):
user_options = [('tox-args=', 'a', 'Arguments to pass to tox')]
def initialize_options(self):
TestCommand.initialize_options(self)
self.tox_args = None
def finalize_options(self):
TestCommand.finalize_options(self)
self.test_args = []
self.test_suite = True
def run_tests(self):
import shlex
import tox
sys.exit(tox.cmdline(args=shlex.split(self.tox_args or '')))
setuptools.setup(
name='setupext-pip',
version=pip.version,
author='Dave Shawley',
author_email='daveshawley@gmail.com',
url='http://github.com/dave-shawley/setupext-pip',
description='Setuptools extension for installing requirements',
long_description=_read_file('README.rst'),
packages=setuptools.find_packages(exclude=['tests', 'tests.*']),
namespace_packages=['setupext'],
zip_safe=False,
platforms='any',
install_requires=['pip>=1.5'],
tests_require=['tox'],
classifiers=[
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Framework :: Setuptools Plugin',
'Development Status :: 4 - Beta',
],
cmdclass={'test': Tox},
entry_points={
'distutils.commands': [
'requirements = setupext.pip:PipInstall',
],
},
)