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:
parent
80cabca21a
commit
c3aee4b1e6
|
@ -18,6 +18,9 @@ include/
|
|||
*~
|
||||
.hypothesis/
|
||||
|
||||
# autogenerated
|
||||
_pytest/_version.py
|
||||
# setuptools
|
||||
.eggs/
|
||||
|
||||
doc/*/_build
|
||||
|
|
|
@ -3,11 +3,9 @@ How to release pytest
|
|||
|
||||
Note: this assumes you have already registered on pypi.
|
||||
|
||||
1. Bump version numbers in ``_pytest/__init__.py`` (``setup.py`` reads it).
|
||||
1. Check and finalize ``CHANGELOG.rst``.
|
||||
|
||||
2. Check and finalize ``CHANGELOG.rst``.
|
||||
|
||||
3. Write ``doc/en/announce/release-VERSION.txt`` and include
|
||||
2. Write ``doc/en/announce/release-VERSION.txt`` and include
|
||||
it in ``doc/en/announce/index.txt``. Run this command to list names of authors involved::
|
||||
|
||||
git log $(git describe --abbrev=0 --tags)..HEAD --format='%aN' | sort -u
|
||||
|
@ -81,5 +79,3 @@ Note: this assumes you have already registered on pypi.
|
|||
9. Push ``master`` and ``features``.
|
||||
|
||||
c. **major release (3.0.0)**: same steps as that of a **minor release**
|
||||
|
||||
|
||||
|
|
|
@ -1,2 +1,5 @@
|
|||
#
|
||||
__version__ = '3.1.0.dev0'
|
||||
__all__ = ['__version__']
|
||||
try:
|
||||
from ._version import version as __version__
|
||||
except ImportError:
|
||||
__version__ = None # broken installation, we don't even try
|
||||
|
|
14
setup.py
14
setup.py
|
@ -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'],
|
||||
|
|
Loading…
Reference in New Issue