提交 6ff4044a 编写于 作者: L Lucas Meneghel Rodrigues

setup.py: Add install_requires to avocado

Use setuptools's option install_requires, to signal
the dependencies avocado requires for full functionality.
Important for publishing avocado in PyPi [1].

[1] https://pypi.python.org/pypiSigned-off-by: NLucas Meneghel Rodrigues <lmr@redhat.com>
上级 6a375a44
......@@ -16,7 +16,11 @@
import glob
import os
# pylint: disable=E0611
from distutils.core import setup
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
import avocado.version
......@@ -71,6 +75,16 @@ def _get_plugin_resource_files(path):
return flist
def get_requirements():
requirements = []
with open('requirements.txt', 'r') as req:
req_contents = req.read()
for line in req_contents.splitlines():
if not line.startswith("#"):
line = line.split("#")[0].strip()
requirements.append("%s" % line)
return requirements
setup(name='avocado',
version=avocado.version.VERSION,
description='Avocado Test Framework',
......@@ -86,4 +100,5 @@ setup(name='avocado',
'avocado.plugins'],
package_data={'avocado.plugins': _get_plugin_resource_files('avocado/plugins/resources')},
data_files=get_data_files(),
scripts=['scripts/avocado'])
scripts=['scripts/avocado'],
install_requires=get_requirements())
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册