mirror of
https://github.com/frappe/bench.git
synced 2024-11-16 01:57:08 +00:00
perf: Remove semantic_version from the import tree
This commit is contained in:
parent
07ecaa1f77
commit
2df0bf726d
@ -11,7 +11,6 @@ import sys
|
||||
|
||||
# imports - third party imports
|
||||
import click
|
||||
import semantic_version
|
||||
from six.moves import reload_module
|
||||
|
||||
# imports - module imports
|
||||
@ -432,6 +431,8 @@ def get_version_from_string(contents, field='__version__'):
|
||||
return match.group(2)
|
||||
|
||||
def get_major_version(version):
|
||||
import semantic_version
|
||||
|
||||
return semantic_version.Version(version).major
|
||||
|
||||
def install_apps_from_path(path, bench_path='.'):
|
||||
|
@ -3,9 +3,6 @@ import os
|
||||
import re
|
||||
import subprocess
|
||||
|
||||
# imports - third party imports
|
||||
import semantic_version
|
||||
|
||||
# imports - module imports
|
||||
import bench
|
||||
from bench.config.common_site_config import get_config
|
||||
@ -62,6 +59,8 @@ def write_redis_config(template_name, context, bench_path):
|
||||
f.write(template.render(**context))
|
||||
|
||||
def get_redis_version():
|
||||
import semantic_version
|
||||
|
||||
version_string = subprocess.check_output('redis-server --version', shell=True)
|
||||
version_string = version_string.decode('utf-8').strip()
|
||||
# extract version number from string
|
||||
|
@ -21,7 +21,6 @@ from distutils.spawn import find_executable
|
||||
|
||||
# imports - third party imports
|
||||
import click
|
||||
from semantic_version import Version
|
||||
from six import iteritems
|
||||
|
||||
# imports - module imports
|
||||
@ -89,6 +88,7 @@ def safe_decode(string, encoding = 'utf-8'):
|
||||
|
||||
def check_latest_version():
|
||||
import requests
|
||||
from semantic_version import Version
|
||||
|
||||
try:
|
||||
pypi_request = requests.get("https://pypi.org/pypi/frappe-bench/json")
|
||||
|
Loading…
Reference in New Issue
Block a user