Blame setup.py

Pierre-Yves Chibon 88ffca
#!/usr/bin/env python
Pierre-Yves Chibon 88ffca
Pierre-Yves Chibon 88ffca
"""
Pierre-Yves Chibon 88ffca
Setup script
Pierre-Yves Chibon 88ffca
"""
Pierre-Yves Chibon 88ffca
Pierre-Yves Chibon 88ffca
# Required to build on EL6
Pierre-Yves Chibon 4c6c3a
__requires__ = ['SQLAlchemy >= 0.8', 'jinja2 >= 2.4']
Pierre-Yves Chibon 88ffca
import pkg_resources
Pierre-Yves Chibon 88ffca
Pierre-Yves Chibon 88ffca
from setuptools import setup
Pierre-Yves Chibon fe5017
from pagure import __version__
Pierre-Yves Chibon 88ffca
Pierre-Yves Chibon 88ffca
Pierre-Yves Chibon 88ffca
def get_requirements(requirements_file='requirements.txt'):
Pierre-Yves Chibon 88ffca
    """Get the contents of a file listing the requirements.
Pierre-Yves Chibon 88ffca
Pierre-Yves Chibon 88ffca
    :arg requirements_file: path to a requirements file
Pierre-Yves Chibon 88ffca
    :type requirements_file: string
Pierre-Yves Chibon 88ffca
    :returns: the list of requirements, or an empty list if
Pierre-Yves Chibon 88ffca
              `requirements_file` could not be opened or read
Pierre-Yves Chibon 88ffca
    :return type: list
Pierre-Yves Chibon 88ffca
    """
Pierre-Yves Chibon 88ffca
Pierre-Yves Chibon 88ffca
    lines = open(requirements_file).readlines()
Pierre-Yves Chibon 88ffca
    return [
Pierre-Yves Chibon 88ffca
        line.rstrip().split('#')[0]
Pierre-Yves Chibon 88ffca
        for line in lines
Pierre-Yves Chibon 88ffca
        if not line.startswith('#')
Pierre-Yves Chibon 88ffca
    ]
Pierre-Yves Chibon 88ffca
Pierre-Yves Chibon 88ffca
Pierre-Yves Chibon 88ffca
setup(
Pierre-Yves Chibon fe5017
    name='pagure',
Pierre-Yves Chibon 88ffca
    description='A light-weight git-centered forge based on pygit2..',
Pierre-Yves Chibon 88ffca
    version=__version__,
Pierre-Yves Chibon 88ffca
    author='Pierre-Yves Chibon',
Pierre-Yves Chibon 88ffca
    author_email='pingou@pingoured.fr',
Pierre-Yves Chibon 88ffca
    maintainer='Pierre-Yves Chibon',
Pierre-Yves Chibon 88ffca
    maintainer_email='pingou@pingoured.fr',
Pierre-Yves Chibon 88ffca
    license='GPLv2+',
Pierre-Yves Chibon fe5017
    download_url='https://fedorahosted.org/releases/p/r/pagure/',
Pierre-Yves Chibon fe5017
    url='https://fedorahosted.org/pagure/',
Pierre-Yves Chibon fe5017
    packages=['pagure'],
Pierre-Yves Chibon 88ffca
    include_package_data=True,
Pierre-Yves Chibon 88ffca
    install_requires=get_requirements(),
Pierre-Yves Chibon 88ffca
)