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
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,8 @@ __pycache__
.coverage
/.cache
/.venv
/.eggs


# auto-generated by setuptools_scm
/pytestqt/_version.py
8 changes: 2 additions & 6 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,10 @@
# |version| and |release|, also used in various other places throughout the
# built documents.
#
import re
with open('../pytestqt/__init__.py') as f:
m = re.search("version = '(.*)'", f.read())
assert m is not None
version = m.group(1)
import pkg_resources
version = pkg_resources.get_distribution('pytest-qt').version
# The short X.Y version.
# The full version, including alpha/beta/rc tags.
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
@@ -1,2 +1,3 @@
version = '2.0.0'
# _version is automatically generated by setuptools_scm
from pytestqt._version import version
__version__ = version
9 changes: 2 additions & 7 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,8 @@ def run_tests(self):
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=version,
packages=['pytestqt'],
entry_points={
'pytest11': ['pytest-qt = pytestqt.plugin'],
Expand All @@ -47,6 +40,8 @@ def run_tests(self):
license="MIT",
keywords="pytest qt test unittest",
url="http://github.com/pytest-dev/pytest-qt",
use_scm_version={'write_to': 'pytestqt/_version.py'},
setup_requires=['setuptools_scm'],
classifiers=[
'Development Status :: 5 - Production/Stable',
'Framework :: Pytest',
Expand Down