50 lines
1.8 KiB
Python
50 lines
1.8 KiB
Python
import os
|
|
import sys
|
|
from setuptools import setup, find_packages
|
|
from setuptools.command.test import test as TestCommand
|
|
|
|
class PyTest(TestCommand):
|
|
user_options = [('pytest-args=', 'a', "Arguments to pass to py.test")]
|
|
|
|
def initialize_options(self):
|
|
TestCommand.initialize_options(self)
|
|
self.pytest_args = []
|
|
|
|
def run_tests(self):
|
|
#import here, cause outside the eggs aren't loaded
|
|
import pytest
|
|
errno = pytest.main(self.pytest_args)
|
|
sys.exit(errno)
|
|
|
|
# Utility function to read the README file.
|
|
# Used for the long_description. It's nice, because now 1) we have a top level
|
|
# README file and 2) it's easier to type in the README file than to put a raw
|
|
# string in below. Stolen from
|
|
# https://pythonhosted.org/an_example_pypi_project/setuptools.html
|
|
def read(fname):
|
|
return open(os.path.join(os.path.dirname(__file__), fname)).read()
|
|
|
|
setup(
|
|
name = "fedora_nightlies",
|
|
version = "1.0.0",
|
|
entry_points = {
|
|
'console_scripts': ['fedora_nightlies = fedora_nightlies:main'],
|
|
},
|
|
author = "Adam Williamson",
|
|
author_email = "awilliam@redhat.com",
|
|
description = "Find most recent build/known-good nightly build for each Fedora image",
|
|
license = "GPLv3+",
|
|
keywords = "fedora release image media iso nightly",
|
|
url = "https://forge.fedoraproject.org/quality/fedora-nightlies",
|
|
py_modules = ["fedora_nightlies"],
|
|
install_requires = ['setuptools', 'fedora-messaging', 'fedfind>=2.5.0', 'openqa_client>=1.2'],
|
|
tests_require=['pytest', 'mock'],
|
|
cmdclass = {'test': PyTest},
|
|
long_description=read('README.md'),
|
|
classifiers=[
|
|
"Development Status :: 3 - Alpha",
|
|
"Topic :: Utilities",
|
|
"License :: OSI Approved :: GNU General Public License v3 or later "
|
|
"(GPLv3+)",
|
|
],
|
|
)
|