@@ -509,14 +509,13 @@ def get_site_packages_dir(self, arch=None):
509509 '''Returns the location of site-packages in the python-install build
510510 dir.
511511 '''
512+ if self .python_recipe .name == 'python2' :
513+ return join (self .get_python_install_dir (),
514+ 'lib' , 'python2.7' , 'site-packages' )
512515
513- # This needs to be replaced with something more general in
514- # order to support multiple python versions and/or multiple
515- # archs.
516- if self .python_recipe .from_crystax :
517- return self .get_python_install_dir ()
518- return join (self .get_python_install_dir (),
519- 'lib' , 'python2.7' , 'site-packages' )
516+ # Only python2 is a special case, other python recipes use the
517+ # python install dir
518+ return self .get_python_install_dir ()
520519
521520 def get_libs_dir (self , arch ):
522521 '''The libs dir for a given arch.'''
@@ -621,7 +620,9 @@ def run_pymodules_install(ctx, modules):
621620
622621 venv = sh .Command (ctx .virtualenv )
623622 with current_directory (join (ctx .build_dir )):
624- shprint (venv , '--python=python2.7' , 'venv' )
623+ shprint (venv ,
624+ '--python=python{}' .format (ctx .python_recipe .major_minor_version_string ()),
625+ 'venv' )
625626
626627 info ('Creating a requirements.txt file for the Python modules' )
627628 with open ('requirements.txt' , 'w' ) as fileh :
0 commit comments