forked from Yelp/venv-update
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
77 lines (69 loc) · 2.57 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
#!/usr/bin/env python
from __future__ import absolute_import
from __future__ import print_function
from __future__ import unicode_literals
from setuptools import find_packages
from setuptools import setup
# https://github.com/pypa/python-packaging-user-guide/blob/master/source/single_source_version.rst
def read(*names, **kwargs):
import io
import os
with io.open(
os.path.join(os.path.dirname(__file__), *names),
encoding=kwargs.get('encoding', 'utf8')
) as fp:
return fp.read()
def find_version(*file_paths):
import re
version_file = read(*file_paths)
version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]",
version_file, re.M)
if version_match:
return version_match.group(1)
raise RuntimeError('Unable to find version string.')
def main():
setup(
name='pip-faster',
version=find_version('venv_update.py'),
description='Quickly and exactly synchronize a virtualenv with a requirements.txt',
url='https://github.com/Yelp/pip-faster',
author='Buck Evan',
author_email='buck@yelp.com',
platforms='all',
license='MIT',
classifiers=[
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: Implementation :: PyPy',
'Topic :: System :: Archiving :: Packaging',
'Operating System :: Unix',
'Intended Audience :: Developers',
'Development Status :: 4 - Beta',
'Environment :: Console',
],
py_modules=['venv_update', 'pip_faster'],
packages=find_packages('.', exclude=('tests*',)),
install_requires=[
'virtualenv>=1.11.5,<2.0', # just for venv-update
'pip>=1.5.0,<6.0.0',
'wheel>0.25.0', # 0.25.0 causes get_tag AssertionError in python3
'setuptools>=0.8.0', # 0.7 causes "'sys_platform' not defined" when installing wheel >0.25
],
entry_points={
'console_scripts': [
'venv-update = venv_update:main',
'pip-faster = pip_faster:main',
],
},
keywords=['pip', 'virtualenv'],
options={
'bdist_wheel': {
'universal': 1,
}
},
) # pragma: no cover: covered by tox
if __name__ == '__main__':
exit(main())