File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Expand file tree Collapse file tree 1 file changed +16
-1
lines changed 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 ,
@@ -37,13 +50,15 @@ def scm_config():
3750with open ('README.rst' ) as fp :
3851 long_description = fp .read ()
3952
53+ found_version = _find_hackish_version ()
4054
4155arguments = dict (
4256 name = 'setuptools_scm' ,
4357 url = 'https://github.com/pypa/setuptools_scm/' ,
4458 zip_safe = True ,
59+ version = found_version ,
4560 # pass here since entrypints are not yet registred
46- use_scm_version = scm_config ,
61+ use_scm_version = found_version is None and scm_config ,
4762 author = 'Ronny Pfannschmidt' ,
48634964 description = ('the blessed package to manage your versions by scm tags' ),
You can’t perform that action at this time.
0 commit comments