restore linting, drop _pytest._version for check-manifest

This commit is contained in:
Ronny Pfannschmidt 2017-04-19 20:25:53 +02:00
parent c0a51f5662
commit 2cf422733c
3 changed files with 9 additions and 8 deletions

View File

@ -1,5 +1,7 @@
__all__ = ['__version__']
import pkg_resources
try:
from ._version import version as __version__
except ImportError:
__version__ = pkg_resources.get_distribution('pytest').version
except Exception:
__version__ = None # broken installation, we don't even try

View File

@ -54,9 +54,7 @@ def main():
name='pytest',
description='pytest: simple powerful testing with Python',
long_description=long_description,
use_scm_version={
'write_to': '_pytest/_version.py',
},
use_scm_version=True,
url='http://pytest.org',
license='MIT license',
platforms=['unix', 'linux', 'osx', 'cygwin', 'win32'],

View File

@ -47,8 +47,9 @@ commands=
[testenv:linting]
basepython = python2.7
setenv = # needed to keep check-manifest working
SETUPTOOLS_SCM_PRETEND_VERSION=0.0.1
# needed to keep check-manifest working
setenv =
SETUPTOOLS_SCM_PRETEND_VERSION=2.0.1
deps =
flake8
# pygments required by rst-lint
@ -58,7 +59,7 @@ deps =
commands =
{envpython} scripts/check-manifest.py
flake8 pytest.py _pytest testing
rst-lint CHANGELOG.rst HOWTORELEASE.rst README.rst
rst-lint CHANGELOG.rst HOWTORELEASE.rst README.rst --encoding utf-8
[testenv:py27-xdist]
deps=pytest-xdist>=1.13