forked from fedora-infra/anitya
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
48 lines (39 loc) · 1.27 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
#!/usr/bin/env python
"""
Setup script
"""
# Required to build on EL6
__requires__ = ['SQLAlchemy >= 0.7', 'jinja2 >= 2.4']
import pkg_resources
from setuptools import setup
from anitya.app import __version__
def get_requirements(requirements_file='requirements.txt'):
"""Get the contents of a file listing the requirements.
:arg requirements_file: path to a requirements file
:type requirements_file: string
:returns: the list of requirements, or an empty list if
`requirements_file` could not be opened or read
:return type: list
"""
lines = open(requirements_file).readlines()
return [
line.rstrip().split('#')[0]
for line in lines
if not line.startswith('#')
]
setup(
name='anitya',
description='anitya is a project to monitor upstream releases in a distro.',
version=__version__,
author='Pierre-Yves Chibon',
author_email='[email protected]',
maintainer='Pierre-Yves Chibon',
maintainer_email='[email protected]',
license='GPLv2+',
download_url='https://fedorahosted.org/releases/a/n/anitya/',
url='https://fedorahosted.org/anitya/',
packages=['anitya'],
include_package_data=True,
scripts=['files/anitya_cron.py'],
install_requires=get_requirements(),
)