Skip to content
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
9 changes: 6 additions & 3 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,14 @@
# |version| and |release|, also used in various other places throughout the
# built documents.
#
import pytestqt
import re
with open('../pytestqt/__init__.py') as f:
m = re.search("version = '(.*)'", f.read())
assert m is not None
version = m.group(1)
# The short X.Y version.
version = pytestqt.version
# The full version, including alpha/beta/rc tags.
release = pytestqt.version
release = version

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
3 changes: 2 additions & 1 deletion pytestqt/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,5 @@ def test_hello(qtbot):

'''

version = __version__ = '1.4.0'
version = '1.4.0'
__version__ = version
29 changes: 6 additions & 23 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,33 +1,17 @@
import sys
import re

from setuptools import setup
from setuptools.command.test import test as TestCommand

import pytestqt


class PyTest(TestCommand):
"""
Overrides setup "test" command, taken from here:
http://pytest.org/latest/goodpractises.html
"""

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([])
sys.exit(errno)
with open('pytestqt/__init__.py') as f:
m = re.search("version = '(.*)'", f.read())
assert m is not None
version = m.group(1)


setup(
name="pytest-qt",
version=pytestqt.version,
version=version,
packages=['pytestqt'],
entry_points={
'pytest11': ['pytest-qt = pytestqt.plugin'],
Expand Down Expand Up @@ -56,5 +40,4 @@ def run_tests(self):
'Topic :: Software Development :: User Interfaces',
],
tests_requires=['pytest'],
cmdclass={'test': PyTest},
)