pip: Separate test-requires
Currently, in addition to "requirements for tests", test-requires includes "optional requirements". This makes it unclear to identify which packages are surely required to use optional features (e.g., OF-Config, NETCONF, BGP speaker) and causes the redundant installation when building Docker images. This patch separates test-requires into two files("test requirements" and "optional requirements"). Also, this patch reverts the version fixation for some packages. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
This commit is contained in:
parent
1af384fa17
commit
03f77e7279
11
README.rst
11
README.rst
@ -35,16 +35,15 @@ Optional Requirements
|
||||
|
||||
Some functionalities of ryu requires extra packages:
|
||||
|
||||
- OF-Config requires lxml
|
||||
- OF-Config requires lxml and ncclient
|
||||
- NETCONF requires paramiko
|
||||
- BGP speaker (ssh console) requires paramiko
|
||||
- OVSDB support requires ovs (Note: python 3.4 requires ovs>=2.6.0.dev0)
|
||||
- BGP speaker (SSH console) requires paramiko
|
||||
|
||||
If you want to use the functionalities, please install requirements::
|
||||
|
||||
% pip install lxml
|
||||
% pip install paramiko
|
||||
% pip install ovs
|
||||
% pip install -r tools/optional-requires
|
||||
|
||||
Please refer to tools/optional-requires for details.
|
||||
|
||||
|
||||
Support
|
||||
|
@ -31,6 +31,7 @@ import sys
|
||||
ROOT = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
|
||||
VENV = os.path.join(ROOT, '.venv')
|
||||
PIP_REQUIRES = os.path.join(ROOT, 'tools', 'pip-requires')
|
||||
OPTIONAL_REQUIRES = os.path.join(ROOT, 'tools', 'optional-requires')
|
||||
TEST_REQUIRES = os.path.join(ROOT, 'tools', 'test-requires')
|
||||
PY_VERSION = "python%s.%s" % (sys.version_info[0], sys.version_info[1])
|
||||
|
||||
@ -94,6 +95,8 @@ def install_dependencies(venv=VENV):
|
||||
print 'Installing dependencies with pip (this can take a while)...'
|
||||
run_command(['tools/with_venv.sh', 'pip', 'install', '-r',
|
||||
PIP_REQUIRES], redirect_output=False)
|
||||
run_command(['tools/with_venv.sh', 'pip', 'install', '-r',
|
||||
OPTIONAL_REQUIRES], redirect_output=False)
|
||||
run_command(['tools/with_venv.sh', 'pip', 'install', '-r',
|
||||
TEST_REQUIRES], redirect_output=False)
|
||||
|
||||
|
4
tools/optional-requires
Normal file
4
tools/optional-requires
Normal file
@ -0,0 +1,4 @@
|
||||
lxml # OF-Config
|
||||
ncclient # OF-Config
|
||||
cryptography!=1.5.2 # Required by paramiko
|
||||
paramiko # NETCONF, BGP speaker (SSH console)
|
@ -4,8 +4,3 @@ nose
|
||||
pep8
|
||||
pylint
|
||||
formencode
|
||||
lxml; platform_python_implementation != 'PyPy' # OF-Config
|
||||
lxml==3.4.0; platform_python_implementation == 'PyPy'
|
||||
cryptography==1.5
|
||||
paramiko # NETCONF, BGP speaker
|
||||
ncclient # OF-Config
|
||||
|
Loading…
x
Reference in New Issue
Block a user