#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Avalon Music Server
#
# Copyright (c) 2012 TSH Labs <projects@tshlabs.org>
# All rights reserved.
# 
# Redistribution and use in source and binary forms, with or without 
# modification, are permitted provided that the following conditions are
# met:
# 
# * Redistributions of source code must retain the above copyright 
#   notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
#   notice, this list of conditions and the following disclaimer in the
#   documentation and/or other materials provided with the distribution.
# 
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#

from __future__ import print_function

import os
import os.path
import subprocess
import sys

from setuptools import setup, find_packages


AUTHOR = 'TSH Labs'
DESCRIPTION = 'Avalon Music Server'
EMAIL = 'projects@tshlabs.org'
RELEASE = '0.1.0'
URL = 'http://www.tshlabs.org/'
LICENSE = 'BSD'
CLASSIFIERS = [
    "Development Status :: 3 - Alpha",
    "License :: OSI Approved :: BSD License",
    "Operating System :: POSIX",
    "Topic :: Internet :: WWW/HTTP"
    ]


REQUIRES = []


setup(
    name='avalonms',
    version=RELEASE,
    author=AUTHOR,
    description=DESCRIPTION,
    author_email=EMAIL,
    classifiers=CLASSIFIERS,
    license=LICENSE,
    url=URL,
    install_requires=REQUIRES,
    packages=find_packages(),
    scripts=[os.path.join('bin', 'avalonmsd')])


@@ -1494,16 +1494,26 @@
 os.path%0A
+import re%0A
 import s
@@ -1522,16 +1522,16 @@
 process%0A
-
 import s
@@ -1915,21 +1915,408 @@
 %5D%0A%0A%0A
-REQUIRES = %5B%5D
+def get_requires(filename):%0A    out = %5B%5D%0A    with open(filename) as handle:%0A        for line in handle:%0A            parts = re.split('%5B%5E%5Cw%5D', line, 1)%0A            if parts:%0A                out.append(parts%5B0%5D.strip())%0A    return out%0A%0A%0Adef get_readme(filename):%0A    with open(filename) as handle:%0A        return handle.read()%0A%0A%0AREADME = get_readme('README.rst')%0AREQUIRES = get_requires('requires.txt')
 %0A%0A%0As
@@ -2382,16 +2382,16 @@
 AUTHOR,%0A
-
     desc
@@ -2411,16 +2411,45 @@
 IPTION,%0A
+    long_description=README,%0A
     auth

Add requirements during build