forked from theatlantic/thumbor-video-engine
-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.py
52 lines (41 loc) · 1.56 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
import sys
from setuptools import setup, find_packages
from os import path
from io import open
CURR_DIR = path.abspath(path.dirname(__file__))
def read(rel_path):
with open(path.join(CURR_DIR, rel_path), encoding='utf-8') as f:
return f.read()
def get_long_description():
readme_rst = read('README.rst')
lines = readme_rst.split(u"\n")
return u"\n".join(lines[12:])
def get_version():
for line in read('src/thumbor_video_engine/__init__.py').splitlines():
if line.startswith('__version__'):
delim = '"' if '"' in line else "'"
return line.split(delim)[1]
else:
raise RuntimeError("Unable to find version string.")
setup(
name='thumbor-video-engine',
version=get_version(),
description='An engine and tools for manipulating videos with thumbor using ffmpeg',
long_description=get_long_description(),
long_description_content_type='text/x-rst',
url='https://github.com/theatlantic/thumbor-video-engine',
author='Frankie Dintino',
author_email='[email protected]',
classifiers=[
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'Topic :: Software Development',
'Environment :: Web Environment',
'License :: OSI Approved :: BSD License',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
],
packages=find_packages('src'),
package_dir={'': 'src'},
install_requires=['thumbor<7' if sys.version_info[0] == '2' else 'thumbor'],
zip_safe=False)