mirror of
https://github.com/frappe/bench.git
synced 2025-01-08 00:04:38 +00:00
removed pip lockdown on 9.0.3
This commit is contained in:
parent
18bf1b5450
commit
642935a8a8
@ -22,7 +22,7 @@ install:
|
|||||||
|
|
||||||
script:
|
script:
|
||||||
- cd ~
|
- cd ~
|
||||||
- sudo pip install --upgrade pip==9.0.3
|
- sudo pip install --upgrade pip
|
||||||
- sudo pip install -e ~/.bench
|
- sudo pip install -e ~/.bench
|
||||||
# - sudo python -m unittest bench.tests.test_setup_production.TestSetupProduction.test_setup_production_v6
|
# - sudo python -m unittest bench.tests.test_setup_production.TestSetupProduction.test_setup_production_v6
|
||||||
- sudo python -m unittest -v bench.tests.test_setup_production
|
- sudo python -m unittest -v bench.tests.test_setup_production
|
||||||
|
@ -159,8 +159,7 @@ def migrate_env(python, no_backup = False):
|
|||||||
), cwd = path)
|
), cwd = path)
|
||||||
|
|
||||||
pip = osp.join(pvenv, 'bin', 'pip')
|
pip = osp.join(pvenv, 'bin', 'pip')
|
||||||
# pip 10 seems to have a few problems associated with it, temporary freeze pip at 9.0.3
|
exec_cmd('{pip} install --upgrade pip'.format(pip=pip))
|
||||||
exec_cmd('{pip} install --upgrade pip==9.0.3'.format(pip=pip))
|
|
||||||
exec_cmd('{pip} install --upgrade setuptools'.format(pip=pip))
|
exec_cmd('{pip} install --upgrade setuptools'.format(pip=pip))
|
||||||
# TODO: Options
|
# TODO: Options
|
||||||
|
|
||||||
|
@ -173,7 +173,7 @@ def setup_env(bench_path='.', python = 'python'):
|
|||||||
python = which(python, raise_err = True)
|
python = which(python, raise_err = True)
|
||||||
|
|
||||||
exec_cmd('virtualenv -q {} -p {}'.format('env', python), cwd=bench_path)
|
exec_cmd('virtualenv -q {} -p {}'.format('env', python), cwd=bench_path)
|
||||||
exec_cmd('./env/bin/pip -q install --upgrade pip==9.0.3', cwd=bench_path)
|
exec_cmd('./env/bin/pip -q install --upgrade pip', cwd=bench_path)
|
||||||
exec_cmd('./env/bin/pip -q install wheel', cwd=bench_path)
|
exec_cmd('./env/bin/pip -q install wheel', cwd=bench_path)
|
||||||
# exec_cmd('./env/bin/pip -q install https://github.com/frappe/MySQLdb1/archive/MySQLdb-1.2.5-patched.tar.gz', cwd=bench_path)
|
# exec_cmd('./env/bin/pip -q install https://github.com/frappe/MySQLdb1/archive/MySQLdb-1.2.5-patched.tar.gz', cwd=bench_path)
|
||||||
exec_cmd('./env/bin/pip -q install six', cwd=bench_path)
|
exec_cmd('./env/bin/pip -q install six', cwd=bench_path)
|
||||||
@ -421,8 +421,7 @@ def update_requirements(bench_path='.'):
|
|||||||
print('Updating Python libraries...')
|
print('Updating Python libraries...')
|
||||||
pip = os.path.join(bench_path, 'env', 'bin', 'pip')
|
pip = os.path.join(bench_path, 'env', 'bin', 'pip')
|
||||||
|
|
||||||
# pip 10 seems to have a few problems associated with it, temporary freeze pip at 9.0.3
|
exec_cmd("{pip} install --upgrade pip".format(pip=pip))
|
||||||
exec_cmd("{pip} install --upgrade pip==9.0.3".format(pip=pip))
|
|
||||||
|
|
||||||
apps_dir = os.path.join(bench_path, 'apps')
|
apps_dir = os.path.join(bench_path, 'apps')
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@ def install_bench(args):
|
|||||||
# secure pip installation
|
# secure pip installation
|
||||||
if find_executable('pip'):
|
if find_executable('pip'):
|
||||||
run_os_command({
|
run_os_command({
|
||||||
'pip': 'sudo pip install --upgrade setuptools urllib3 requests cryptography pip==9.0.3'
|
'pip': 'sudo pip install --upgrade setuptools urllib3 requests cryptography pip'
|
||||||
})
|
})
|
||||||
|
|
||||||
else:
|
else:
|
||||||
@ -51,7 +51,7 @@ def install_bench(args):
|
|||||||
|
|
||||||
if success:
|
if success:
|
||||||
run_os_command({
|
run_os_command({
|
||||||
'pip': 'sudo pip install --upgrade setuptools urllib3 requests cryptography pip==9.0.3'
|
'pip': 'sudo pip install --upgrade setuptools urllib3 requests cryptography pip'
|
||||||
})
|
})
|
||||||
|
|
||||||
success = run_os_command({
|
success = run_os_command({
|
||||||
@ -374,7 +374,7 @@ def parse_commandline_args():
|
|||||||
parser.add_argument('--frappe-branch', dest='frappe_branch', action='store',
|
parser.add_argument('--frappe-branch', dest='frappe_branch', action='store',
|
||||||
help='Clone a particular branch of frappe')
|
help='Clone a particular branch of frappe')
|
||||||
|
|
||||||
parser.add_argument('--erpnext-repo-url', dest='erpnext_repo_url', action='store', default='https://github.com/frappe/erpnext',
|
parser.add_argument('--erpnext-repo-url', dest='erpnext_repo_url', action='store', default='https://github.com/frappe/erpnext',
|
||||||
help='Clone erpnext from the given url')
|
help='Clone erpnext from the given url')
|
||||||
|
|
||||||
parser.add_argument('--erpnext-branch', dest='erpnext_branch', action='store',
|
parser.add_argument('--erpnext-branch', dest='erpnext_branch', action='store',
|
||||||
|
16
setup.py
16
setup.py
@ -1,18 +1,15 @@
|
|||||||
from setuptools import setup, find_packages
|
from setuptools import setup, find_packages
|
||||||
try: # for pip >= 10
|
|
||||||
from pip._internal.req import parse_requirements
|
|
||||||
except ImportError: # for pip <= 9.0.3
|
|
||||||
from pip.req import parse_requirements
|
|
||||||
import re, ast
|
import re, ast
|
||||||
|
|
||||||
# get version from __version__ variable in bench/__init__.py
|
# get version from __version__ variable in bench/__init__.py
|
||||||
_version_re = re.compile(r'__version__\s+=\s+(.*)')
|
_version_re = re.compile(r'__version__\s+=\s+(.*)')
|
||||||
|
|
||||||
with open('bench/__init__.py', 'rb') as f:
|
with open('requirements.txt') as f:
|
||||||
version = str(ast.literal_eval(_version_re.search(
|
install_requires = f.read().strip().split('\n')
|
||||||
f.read().decode('utf-8')).group(1)))
|
|
||||||
|
|
||||||
requirements = parse_requirements("requirements.txt", session="")
|
with open('bench/__init__.py', 'rb') as f:
|
||||||
|
version = str(ast.literal_eval(_version_re.search(
|
||||||
|
f.read().decode('utf-8')).group(1)))
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name='bench',
|
name='bench',
|
||||||
@ -23,8 +20,7 @@ setup(
|
|||||||
packages=find_packages(),
|
packages=find_packages(),
|
||||||
zip_safe=False,
|
zip_safe=False,
|
||||||
include_package_data=True,
|
include_package_data=True,
|
||||||
install_requires=[str(ir.req) for ir in requirements],
|
install_requires=install_requires,
|
||||||
dependency_links=[str(ir._link) for ir in requirements if ir._link],
|
|
||||||
entry_points='''
|
entry_points='''
|
||||||
[console_scripts]
|
[console_scripts]
|
||||||
bench=bench.cli:cli
|
bench=bench.cli:cli
|
||||||
|
Loading…
Reference in New Issue
Block a user