Skip to content
This repository was archived by the owner on Jan 13, 2021. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
include README.rst LICENSE CONTRIBUTORS.rst HISTORY.rst hyper/certs.pem tox.ini

recursive-include test *
29 changes: 24 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,31 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import itertools
import os
import re
import sys

try:
from setuptools import setup
except ImportError:
from distutils.core import setup
from setuptools import setup
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 = ['test/']

def finalize_options(self):
TestCommand.finalize_options(self)
self.test_args = []
self.test_suite = True

def run_tests(self):
# import here, cause outside the eggs aren't loaded
import pytest
errno = pytest.main(self.pytest_args)
sys.exit(errno)


# Get the version
version_regex = r'__version__ = ["\']([^"\']*)["\']'
Expand Down Expand Up @@ -83,6 +100,8 @@ def resolve_install_requires():
'Programming Language :: Python :: Implementation :: CPython',
],
install_requires=resolve_install_requires(),
tests_require=['pytest', 'requests', 'mock'],
cmdclass={'test': PyTest},
entry_points={
'console_scripts': [
'hyper = hyper.cli:main',
Expand Down