Minor updates for release to pip

This commit is contained in:
Michael Shepanski 2016-05-23 22:13:26 -04:00
parent 3d28b5309e
commit 322ac63130
2 changed files with 14 additions and 4 deletions

View file

@ -12,9 +12,9 @@ CONFIG = PlexConfig(CONFIG_PATH)
# Core Settings
PROJECT = 'PlexAPI' # name provided to plex server
VERSION = '2.0.0a' # version of this api
VERSION = '2.0.1' # version of this api
TIMEOUT = CONFIG.get('plexapi.timeout', 30, int) # request timeout
X_PLEX_CONTAINER_SIZE = 50 # max results to return in a single search page
X_PLEX_CONTAINER_SIZE = 50 # max results to return in a single search page
# Plex Header Configuation
X_PLEX_PROVIDES = 'controller' # one or more of [player, controller, server]

View file

@ -3,14 +3,24 @@
"""
Install PlexAPI
"""
import re
from distutils.core import setup
from setuptools import find_packages
# 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()
# Fetch the current version
with open('plexapi/__init__.py') as handle:
for line in handle.readlines():
if line.startswith('VERSION'):
VERSION = line.split('=')[1].strip(" '\n")
VERSION = re.findall("'([0-9\.]+?)'", line)[0]
setup(
name='PlexAPI',
@ -21,6 +31,6 @@ setup(
url='https://github.com/mjs7231/plexapi',
packages=find_packages(),
install_requires=['requests'],
long_description=open('README.md').read(),
long_description=read_md('README.md'),
keywords=['plex', 'api'],
)