@@ -59,13 +59,13 @@ def install_myself(session, extras=None):
5959 if extras :
6060 arg += '[%s]' % ',' .join (extras )
6161
62- session .install ( '-e' , arg )
62+ session .run ( 'pip' , 'install' , '-e' , arg )
6363
6464
6565@nox .session (name = 'format' , python = PYTHON_DEFAULT_VERSION )
6666def format_ (session ):
6767 """Format the code."""
68- session .install ( * REQUIREMENTS_FORMAT )
68+ session .run ( 'pip' , 'install' , * REQUIREMENTS_FORMAT )
6969 # TODO: incremental mode for yapf
7070 session .run ('yapf' , '--in-place' , '--parallel' , '--recursive' , * PY_PATHS )
7171 # TODO: uncomment if we want to use isort and docformatter
@@ -84,7 +84,7 @@ def format_(session):
8484def lint (session ):
8585 """Run linters."""
8686 install_myself (session )
87- session .install ( * REQUIREMENTS_LINT )
87+ session .run ( 'pip' , 'install' , * REQUIREMENTS_LINT )
8888 session .run ('yapf' , '--diff' , '--parallel' , '--recursive' , * PY_PATHS )
8989 # TODO: uncomment if we want to use isort and docformatter
9090 # session.run('isort', '--check', *PY_PATHS)
@@ -115,7 +115,7 @@ def lint(session):
115115def unit (session ):
116116 """Run unit tests."""
117117 install_myself (session )
118- session .install ( * REQUIREMENTS_TEST )
118+ session .run ( 'pip' , 'install' , * REQUIREMENTS_TEST )
119119 args = ['--doctest-modules' , '-p' , 'pyfakefs' , '-n' , 'auto' ]
120120 if not SKIP_COVERAGE :
121121 args += ['--cov=b2sdk' , '--cov-branch' , '--cov-report=xml' ]
@@ -135,15 +135,15 @@ def unit(session):
135135def integration (session ):
136136 """Run integration tests."""
137137 install_myself (session )
138- session .install ( * REQUIREMENTS_TEST )
138+ session .run ( 'pip' , 'install' , * REQUIREMENTS_TEST )
139139 session .run ('pytest' , '-s' , * session .posargs , 'test/integration' )
140140
141141
142142@nox .session (python = PYTHON_DEFAULT_VERSION )
143143def cleanup_old_buckets (session ):
144144 """Remove buckets from previous test runs."""
145145 install_myself (session )
146- session .install ( * REQUIREMENTS_TEST )
146+ session .run ( 'pip' , 'install' , * REQUIREMENTS_TEST )
147147 session .run ('python' , '-m' , 'test.integration.cleanup_buckets' )
148148
149149
@@ -161,7 +161,7 @@ def test(session):
161161@nox .session
162162def cover (session ):
163163 """Perform coverage analysis."""
164- session .install ( 'coverage' )
164+ session .run ( 'pip' , 'install' , 'coverage' )
165165 session .run ('coverage' , 'report' , '--fail-under=75' , '--show-missing' , '--skip-covered' )
166166 session .run ('coverage' , 'erase' )
167167
@@ -170,7 +170,7 @@ def cover(session):
170170def build (session ):
171171 """Build the distribution."""
172172 # TODO: consider using wheel as well
173- session .install ( * REQUIREMENTS_BUILD )
173+ session .run ( 'pip' , 'install' , * REQUIREMENTS_BUILD )
174174 session .run ('python' , 'setup.py' , 'check' , '--metadata' , '--strict' )
175175 session .run ('rm' , '-rf' , 'build' , 'dist' , 'b2sdk.egg-info' , external = True )
176176 session .run ('python' , 'setup.py' , 'sdist' , * session .posargs )
0 commit comments