python-plexapi/setup.py

37 lines
960 B
Python
Raw Normal View History

2014-12-29 03:21:58 +00:00
#!/usr/bin/python
# -*- coding: utf-8 -*-
2014-12-29 03:21:58 +00:00
"""
Install PlexAPI
"""
2016-05-24 02:13:26 +00:00
import re
2014-12-29 03:21:58 +00:00
from distutils.core import setup
from setuptools import find_packages
2016-05-24 02:13:26 +00:00
# Convert markdown readme to rst
try:
from pypandoc import convert
read_md = lambda f: convert(f, 'rst')
except ImportError:
print("Warn: pypandoc not found, not converting Markdown to RST")
read_md = lambda f: open(f, 'r').read()
2014-12-29 03:21:58 +00:00
# Fetch the current version
with open('plexapi/__init__.py') as handle:
for line in handle.readlines():
if line.startswith('VERSION'):
2016-05-24 02:13:26 +00:00
VERSION = re.findall("'([0-9\.]+?)'", line)[0]
2014-12-29 03:21:58 +00:00
setup(
name='PlexAPI',
version=VERSION,
description='Python bindings for the Plex API.',
author='Michael Shepanski',
author_email='mjs7231@gmail.com',
2015-03-09 04:28:32 +00:00
url='https://github.com/mjs7231/plexapi',
2014-12-29 03:21:58 +00:00
packages=find_packages(),
install_requires=['requests'],
2016-05-24 02:13:26 +00:00
long_description=read_md('README.md'),
2014-12-29 03:21:58 +00:00
keywords=['plex', 'api'],
)