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
6 changes: 5 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,17 @@ matrix:
env: TOXENV=flake8
- python: '3.5'
env: TOXENV=flake8
- python: '2.7'
env: SELFINSTALL=1
- python: '3.5'
env: SELFINSTALL=1
cache:
files:
- $HOME/.pip/cache
- $Home/.cache/pip
install: pip install tox
script:
- tox -e $TOXENV
- python testing/runtests_travis.py



Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
v1.15.3
=======

* bring back correctly getting our version in the own sdist, finalizes #114


v1.15.2
=======

Expand Down
17 changes: 16 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,19 @@
sys.exit('please run `python setup.py egg_info` first')


def _find_hackish_version():
here = os.path.dirname(os.path.abspath(__file__))
sys.path.insert(0, here)
from setuptools_scm.hacks import parse_pkginfo
from setuptools_scm import get_version
try:
return get_version(
root=here, parse=parse_pkginfo,
**scm_config())
except IOError:
pass


def scm_config():
from setuptools_scm.version import (
guess_next_dev_version,
Expand All @@ -38,13 +51,15 @@ def scm_config():
with open('README.rst') as fp:
long_description = fp.read()

found_version = _find_hackish_version()

arguments = dict(
name='setuptools_scm',
url='https://github.com/pypa/setuptools_scm/',
zip_safe=True,
version=found_version,
# pass here since entrypints are not yet registred
use_scm_version=scm_config,
use_scm_version=found_version is None and scm_config,
author='Ronny Pfannschmidt',
author_email='opensource@ronnypfannschmidt.de',
description=('the blessed package to manage your versions by scm tags'),
Expand Down
17 changes: 17 additions & 0 deletions testing/runtests_travis.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@

from subprocess import call

import os

if os.environ.get('TOXENV'):
# normal tox run, lets jsut have tox do its job
import tox
tox.cmdline()
elif os.environ.get('SELFINSTALL'):
# self install testing needs some clarity
# so its being executed without any other tools running
call('python setup.py sdist', shell=True)
call('easy_install dist/*', shell=True)
import pkg_resources
dist = pkg_resources.get_distribution('setuptools_scm')
assert set(dist.version) == set(".0"), dist.version