Skip to content

Commit

Permalink
restore setuptools_scm write_to usage
Browse files Browse the repository at this point in the history
  • Loading branch information
RonnyPfannschmidt committed Apr 23, 2017
1 parent 4242bf6 commit e02cb6d
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 17 deletions.
6 changes: 2 additions & 4 deletions _pytest/__init__.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
import pkg_resources

__all__ = ['__version__']

try:
__version__ = pkg_resources.get_distribution('pytest').version
except Exception:
from ._version import __version__
except ImportError:
# broken installation, we don't even try
# unknown only works because we do poor mans version compare
__version__ = 'unknown'
4 changes: 4 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ upload-dir = doc/en/build/html
[bdist_wheel]
universal = 1

[check-manifest]
ignore =
_pytest/_version.py

[metadata]
license_file = LICENSE

Expand Down
32 changes: 19 additions & 13 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,23 @@
import os, sys
import os
import sys
import setuptools
import pkg_resources
from setuptools import setup, Command

classifiers = ['Development Status :: 6 - Mature',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: POSIX',
'Operating System :: Microsoft :: Windows',
'Operating System :: MacOS :: MacOS X',
'Topic :: Software Development :: Testing',
'Topic :: Software Development :: Libraries',
'Topic :: Utilities'] + [
('Programming Language :: Python :: %s' % x) for x in
'2 2.6 2.7 3 3.3 3.4 3.5 3.6'.split()]
classifiers = [
'Development Status :: 6 - Mature',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: POSIX',
'Operating System :: Microsoft :: Windows',
'Operating System :: MacOS :: MacOS X',
'Topic :: Software Development :: Testing',
'Topic :: Software Development :: Libraries',
'Topic :: Utilities',
] + [
('Programming Language :: Python :: %s' % x)
for x in '2 2.6 2.7 3 3.3 3.4 3.5 3.6'.split()
]

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

0 comments on commit e02cb6d

Please sign in to comment.