mirror of
https://github.com/frappe/bench.git
synced 2025-01-10 09:02:10 +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
|
# imports - third party imports
|
||||||
import click
|
import click
|
||||||
import semantic_version
|
|
||||||
from six.moves import reload_module
|
from six.moves import reload_module
|
||||||
|
|
||||||
# imports - module imports
|
# imports - module imports
|
||||||
@ -432,6 +431,8 @@ def get_version_from_string(contents, field='__version__'):
|
|||||||
return match.group(2)
|
return match.group(2)
|
||||||
|
|
||||||
def get_major_version(version):
|
def get_major_version(version):
|
||||||
|
import semantic_version
|
||||||
|
|
||||||
return semantic_version.Version(version).major
|
return semantic_version.Version(version).major
|
||||||
|
|
||||||
def install_apps_from_path(path, bench_path='.'):
|
def install_apps_from_path(path, bench_path='.'):
|
||||||
|
@ -3,9 +3,6 @@ import os
|
|||||||
import re
|
import re
|
||||||
import subprocess
|
import subprocess
|
||||||
|
|
||||||
# imports - third party imports
|
|
||||||
import semantic_version
|
|
||||||
|
|
||||||
# imports - module imports
|
# imports - module imports
|
||||||
import bench
|
import bench
|
||||||
from bench.config.common_site_config import get_config
|
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))
|
f.write(template.render(**context))
|
||||||
|
|
||||||
def get_redis_version():
|
def get_redis_version():
|
||||||
|
import semantic_version
|
||||||
|
|
||||||
version_string = subprocess.check_output('redis-server --version', shell=True)
|
version_string = subprocess.check_output('redis-server --version', shell=True)
|
||||||
version_string = version_string.decode('utf-8').strip()
|
version_string = version_string.decode('utf-8').strip()
|
||||||
# extract version number from string
|
# extract version number from string
|
||||||
|
@ -21,7 +21,6 @@ from distutils.spawn import find_executable
|
|||||||
|
|
||||||
# imports - third party imports
|
# imports - third party imports
|
||||||
import click
|
import click
|
||||||
from semantic_version import Version
|
|
||||||
from six import iteritems
|
from six import iteritems
|
||||||
|
|
||||||
# imports - module imports
|
# imports - module imports
|
||||||
@ -89,6 +88,7 @@ def safe_decode(string, encoding = 'utf-8'):
|
|||||||
|
|
||||||
def check_latest_version():
|
def check_latest_version():
|
||||||
import requests
|
import requests
|
||||||
|
from semantic_version import Version
|
||||||
|
|
||||||
try:
|
try:
|
||||||
pypi_request = requests.get("https://pypi.org/pypi/frappe-bench/json")
|
pypi_request = requests.get("https://pypi.org/pypi/frappe-bench/json")
|
||||||
|
Loading…
Reference in New Issue
Block a user