File tree Expand file tree Collapse file tree 4 files changed +44
-2
lines changed Expand file tree Collapse file tree 4 files changed +44
-2
lines changed Original file line number Diff line number Diff line change @@ -16,13 +16,17 @@ matrix:
1616 env : TOXENV=flake8
1717 - python : ' 3.5'
1818 env : TOXENV=flake8
19+ - python : ' 2.7'
20+ env : SELFINSTALL=1
21+ - python : ' 3.5'
22+ env : SELFINSTALL=1
1923cache :
2024 files :
2125 - $HOME/.pip/cache
2226 - $Home/.cache/pip
2327install : pip install tox
2428script :
25- - tox -e $TOXENV
29+ - python testing/runtests_travis.py
2630
2731
2832
Original file line number Diff line number Diff line change 1+ v1.15.3
2+ =======
3+
4+ * bring back correctly getting our version in the own sdist, finalizes #114
5+
6+
17v1.15.2
28=======
39
Original file line number Diff line number Diff line change 2424 sys .exit ('please run `python setup.py egg_info` first' )
2525
2626
27+ def _find_hackish_version ():
28+ here = os .path .dirname (os .path .abspath (__file__ ))
29+ sys .path .insert (0 , here )
30+ from setuptools_scm .hacks import parse_pkginfo
31+ from setuptools_scm import get_version
32+ try :
33+ return get_version (
34+ root = here , parse = parse_pkginfo ,
35+ ** scm_config ())
36+ except IOError :
37+ pass
38+
39+
2740def scm_config ():
2841 from setuptools_scm .version import (
2942 guess_next_dev_version ,
@@ -38,13 +51,15 @@ def scm_config():
3851with open ('README.rst' ) as fp :
3952 long_description = fp .read ()
4053
54+ found_version = _find_hackish_version ()
4155
4256arguments = dict (
4357 name = 'setuptools_scm' ,
4458 url = 'https://github.com/pypa/setuptools_scm/' ,
4559 zip_safe = True ,
60+ version = found_version ,
4661 # pass here since entrypints are not yet registred
47- use_scm_version = scm_config ,
62+ use_scm_version = found_version is None and scm_config ,
4863 author = 'Ronny Pfannschmidt' ,
49645065 description = ('the blessed package to manage your versions by scm tags' ),
Original file line number Diff line number Diff line change 1+
2+ from subprocess import call
3+
4+ import os
5+
6+ if os .environ .get ('TOXENV' ):
7+ # normal tox run, lets jsut have tox do its job
8+ import tox
9+ tox .cmdline ()
10+ elif os .environ .get ('SELFINSTALL' ):
11+ # self install testing needs some clarity
12+ # so its being executed without any other tools running
13+ call ('python setup.py sdist' , shell = True )
14+ call ('easy_install dist/*' , shell = True )
15+ import pkg_resources
16+ dist = pkg_resources .get_distribution ('setuptools_scm' )
17+ assert set (dist .version ) == set (".0" ), dist .version
You can’t perform that action at this time.
0 commit comments