second take at setuptools_scm

since setuptools 18.6 fixes the issues with develop installs

https://github.com/pypa/setuptools/blob/master/CHANGES.rst#186

https://github.com/pypa/setuptools/issues/439
This commit is contained in:
Ronny Pfannschmidt
2016-08-21 18:13:32 +02:00
parent 80cabca21a
commit c3aee4b1e6
4 changed files with 14 additions and 18 deletions

View File

@@ -18,15 +18,6 @@ classifiers = ['Development Status :: 6 - Mature',
with open('README.rst') as fd:
long_description = fd.read()
def get_version():
p = os.path.join(os.path.dirname(
os.path.abspath(__file__)), "_pytest", "__init__.py")
with open(p) as f:
for line in f.readlines():
if "__version__" in line:
return line.strip().split("=")[-1].strip(" '")
raise ValueError("could not read version")
def has_environment_marker_support():
"""
@@ -63,7 +54,9 @@ def main():
name='pytest',
description='pytest: simple powerful testing with Python',
long_description=long_description,
version=get_version(),
use_scm_version={
'write_to': '_pytest/_version.py',
},
url='http://pytest.org',
license='MIT license',
platforms=['unix', 'linux', 'osx', 'cygwin', 'win32'],
@@ -74,6 +67,7 @@ def main():
keywords="test unittest",
cmdclass={'test': PyTest},
# the following should be enabled for release
setup_requires=['setuptools-scm'],
install_requires=install_requires,
extras_require=extras_require,
packages=['_pytest', '_pytest.assertion', '_pytest._code', '_pytest.vendored_packages'],