mirror of
https://github.com/balkian/balkian-pyproject.git
synced 2024-12-22 17:28:12 +00:00
quick fix for semver dependency during install
This commit is contained in:
parent
0975dbc358
commit
1a2737bbcd
@ -16,19 +16,23 @@
|
|||||||
"""
|
"""
|
||||||
{{cookiecutter.project_short_description}}
|
{{cookiecutter.project_short_description}}
|
||||||
"""
|
"""
|
||||||
|
from __future__ import print_function
|
||||||
|
|
||||||
import semver
|
|
||||||
from .version import __version__
|
from .version import __version__
|
||||||
|
|
||||||
__version_info__ = semver.parse_version_info(__version__)
|
try:
|
||||||
|
import semver
|
||||||
|
__version_info__ = semver.parse_version_info(__version__)
|
||||||
|
|
||||||
if __version_info__.prerelease:
|
if __version_info__.prerelease:
|
||||||
import logging
|
import logging
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
msg = 'WARNING: You are using a pre-release version of {} ({})'.format(
|
msg = 'WARNING: You are using a pre-release version of {} ({})'.format(
|
||||||
__name__, __version__)
|
__name__, __version__)
|
||||||
if len(logging.root.handlers) > 0:
|
if len(logging.root.handlers) > 0:
|
||||||
logger.info(msg)
|
logger.info(msg)
|
||||||
else:
|
else:
|
||||||
import sys
|
import sys
|
||||||
print(msg, file=sys.stderr)
|
print(msg, file=sys.stderr)
|
||||||
|
except ImportError:
|
||||||
|
print('semver not installed. Not doing version checking')
|
||||||
|
Loading…
Reference in New Issue
Block a user