1
1
'''
2
2
This module is kind of special because it contains the base classes used to
3
- build our python3 and python2 recipes and his corresponding hostpython recipes.
3
+ build our python3 and his corresponding hostpython recipes.
4
4
'''
5
5
6
6
from os .path import dirname , exists , join , isfile
@@ -26,8 +26,7 @@ class GuestPythonRecipe(TargetPythonRecipe):
26
26
Class for target python recipes. Sets ctx.python_recipe to point to itself,
27
27
so as to know later what kind of Python was built or used.
28
28
29
- This base class is used for our main python recipes (python2 and python3)
30
- which shares most of the build process.
29
+ This base class is used for our main python3 recipe.
31
30
32
31
.. versionadded:: 0.6.0
33
32
Refactored from the inclement's python3 recipe with a few changes:
@@ -280,10 +279,7 @@ def compile_python_files(self, dir):
280
279
longer used...uses .pyc (https://www.python.org/dev/peps/pep-0488)
281
280
'''
282
281
args = [self .ctx .hostpython ]
283
- if self .ctx .python_recipe .name == 'python3' :
284
- args += ['-OO' , '-m' , 'compileall' , '-b' , '-f' , dir ]
285
- else :
286
- args += ['-OO' , '-m' , 'compileall' , '-f' , dir ]
282
+ args += ['-OO' , '-m' , 'compileall' , '-b' , '-f' , dir ]
287
283
subprocess .call (args )
288
284
289
285
def create_python_bundle (self , dirn , arch ):
@@ -363,7 +359,7 @@ def create_python_bundle(self, dirn, arch):
363
359
364
360
class HostPythonRecipe (Recipe ):
365
361
'''
366
- This is the base class for hostpython3 and hostpython2 recipes . This class
362
+ This is the base class for hostpython3 recipe . This class
367
363
will take care to do all the work to build a hostpython recipe but, be
368
364
careful, it is intended to be subclassed because some of the vars needs to
369
365
be set:
@@ -376,8 +372,7 @@ class HostPythonRecipe(Recipe):
376
372
'''
377
373
378
374
name = ''
379
- '''The hostpython's recipe name. This should be ``hostpython2`` or
380
- ``hostpython3``
375
+ '''The hostpython's recipe name. This should be ``hostpython3``
381
376
382
377
.. warning:: This must be set in inherited class.'''
383
378
0 commit comments