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:
16
16
env : TOXENV=flake8
17
17
- python : ' 3.5'
18
18
env : TOXENV=flake8
19
+ - python : ' 2.7'
20
+ env : SELFINSTALL=1
21
+ - python : ' 3.5'
22
+ env : SELFINSTALL=1
19
23
cache :
20
24
files :
21
25
- $HOME/.pip/cache
22
26
- $Home/.cache/pip
23
27
install : pip install tox
24
28
script :
25
- - tox -e $TOXENV
29
+ - python testing/runtests_travis.py
26
30
27
31
28
32
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
+
1
7
v1.15.2
2
8
=======
3
9
Original file line number Diff line number Diff line change 24
24
sys .exit ('please run `python setup.py egg_info` first' )
25
25
26
26
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
+
27
40
def scm_config ():
28
41
from setuptools_scm .version import (
29
42
guess_next_dev_version ,
@@ -38,13 +51,15 @@ def scm_config():
38
51
with open ('README.rst' ) as fp :
39
52
long_description = fp .read ()
40
53
54
+ found_version = _find_hackish_version ()
41
55
42
56
arguments = dict (
43
57
name = 'setuptools_scm' ,
44
58
url = 'https://github.com/pypa/setuptools_scm/' ,
45
59
zip_safe = True ,
60
+ version = found_version ,
46
61
# 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 ,
48
63
author = 'Ronny Pfannschmidt' ,
49
64
50
65
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