File tree 4 files changed +15
-17
lines changed
4 files changed +15
-17
lines changed Original file line number Diff line number Diff line change @@ -141,7 +141,7 @@ def build(self, **kwargs):
141
141
cmd_ret = self .run (
142
142
* build_command ,
143
143
cwd = checkout_path ,
144
- bin_path = self .project .venv_bin (version = self .version .slug , bin = None )
144
+ bin_path = self .project .venv_bin (version = self .version .slug )
145
145
)
146
146
return cmd_ret .successful
147
147
Original file line number Diff line number Diff line change @@ -142,7 +142,7 @@ def build(self, **kwargs):
142
142
cmd_ret = self .run (
143
143
* build_command ,
144
144
cwd = project .conf_dir (self .version .slug ),
145
- bin_path = project .venv_bin (version = self .version .slug , bin = None )
145
+ bin_path = project .venv_bin (version = self .version .slug )
146
146
)
147
147
return cmd_ret .successful
148
148
@@ -244,7 +244,7 @@ def build(self, **kwargs):
244
244
'.' ,
245
245
'_build/latex' ,
246
246
cwd = cwd ,
247
- bin_path = self .project .venv_bin (version = self .version .slug , bin = None )
247
+ bin_path = self .project .venv_bin (version = self .version .slug )
248
248
)
249
249
latex_cwd = os .path .join (cwd , '_build' , 'latex' )
250
250
tex_files = glob (os .path .join (latex_cwd , '*.tex' ))
Original file line number Diff line number Diff line change @@ -484,16 +484,17 @@ def single_version_symlink_path(self):
484
484
# End symlink paths
485
485
#
486
486
487
- def venv_bin (self , version = LATEST , bin = 'python' ):
487
+ def venv_bin (self , version = LATEST , bin = None ):
488
488
"""Return path to the virtualenv bin path, or a specific binary
489
489
490
- By default, return the path to the ``python`` binary in the virtual
491
- environment path. If ``bin`` is :py:data:`None`, then return the path to
492
- the virtual env path.
490
+ If ``bin`` is :py:data:`None`, then return the path to the virtual env
491
+ path, otherwise, return the path to the executable ``bin`` in the
492
+ virtual env ``bin`` path
493
493
"""
494
- if bin is None :
495
- bin = ''
496
- return os .path .join (self .venv_path (version ), 'bin' , bin )
494
+ parts = [self .venv_path (version ), 'bin' ]
495
+ if bin is not None :
496
+ parts .append (bin )
497
+ return os .path .join (* parts )
497
498
498
499
def full_doc_path (self , version = LATEST ):
499
500
"""
Original file line number Diff line number Diff line change @@ -283,7 +283,7 @@ def setup_environment(self):
283
283
cmd .extend (requirements )
284
284
self .build_env .run (
285
285
* cmd ,
286
- bin_path = self .project .venv_bin (version = self .version .slug , bin = None )
286
+ bin_path = self .project .venv_bin (version = self .version .slug )
287
287
)
288
288
289
289
# Handle requirements
@@ -308,8 +308,7 @@ def setup_environment(self):
308
308
'--exists-action=w' ,
309
309
'-r{0}' .format (requirements_file_path ),
310
310
cwd = checkout_path ,
311
- bin_path = self .project .venv_bin (version = self .version .slug ,
312
- bin = None )
311
+ bin_path = self .project .venv_bin (version = self .version .slug )
313
312
)
314
313
315
314
# Handle setup.py
@@ -324,8 +323,7 @@ def setup_environment(self):
324
323
'--ignore-installed' ,
325
324
'.' ,
326
325
cwd = checkout_path ,
327
- bin_path = self .project .venv_bin (version = self .version .slug ,
328
- bin = None )
326
+ bin_path = self .project .venv_bin (version = self .version .slug )
329
327
)
330
328
else :
331
329
self .build_env .run (
@@ -334,8 +332,7 @@ def setup_environment(self):
334
332
'install' ,
335
333
'--force' ,
336
334
cwd = checkout_path ,
337
- bin_path = self .project .venv_bin (version = self .version .slug ,
338
- bin = None )
335
+ bin_path = self .project .venv_bin (version = self .version .slug )
339
336
)
340
337
341
338
def build_docs (self ):
You can’t perform that action at this time.
0 commit comments