Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
97 lines (79 loc) · 2.73 KB

File metadata and controls

97 lines (79 loc) · 2.73 KB
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
try:
from setuptools import setup, find_packages
from setuptools.command.test import test as TestCommand
except ImportError:
from distutils.core import setup, find_packages, Command as TestCommand
about = {}
with open("progressbar/__about__.py") as fp:
exec(fp.read(), about)
install_reqs = []
tests_reqs = []
if sys.version_info < (2, 7):
install_reqs += ['argparse']
tests_reqs += ['unittest2']
def parse_requirements(filename):
'''Read the requirements from the filename, supports includes'''
requirements = []
if os.path.isfile(filename):
with open(filename) as fh:
for line in fh:
line = line.strip()
if line.startswith('-r'):
requirements += parse_requirements(
os.path.join(os.path.dirname(filename),
line.split(' ', 1)[-1]))
elif line and not line.startswith('#'):
requirements.append(line)
return requirements
install_reqs += parse_requirements('requirements.txt')
tests_reqs += parse_requirements('tests/requirements.txt')
if sys.argv[-1] == 'info':
for k, v in about.items():
print('%s: %s' % (k, v))
sys.exit()
with open('README.rst') as fh:
readme = fh.read()
class PyTest(TestCommand):
def finalize_options(self):
TestCommand.finalize_options(self)
self.test_args = []
self.test_suite = True
def run_tests(self):
# import here, cause outside the eggs aren't loaded
import pytest
errno = pytest.main(self.test_args)
sys.exit(errno)
setup(
name=about['__package_name__'],
version=about['__version__'],
author=about['__author__'],
author_email=about['__email__'],
description=about['__description__'],
url=about['__url__'],
license=about['__license__'],
keywords=about['__title__'],
packages=find_packages(exclude=['docs']),
long_description=readme,
include_package_data=True,
install_requires=install_reqs,
tests_require=tests_reqs,
zip_safe=False,
cmdclass={'test': PyTest},
classifiers=[
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Natural Language :: English',
"Programming Language :: Python :: 2",
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: Implementation :: PyPy',
],
)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.