Skip to content
Snippets Groups Projects
Commit c02fb1dc authored by André Anjos's avatar André Anjos :speech_balloon:
Browse files

Fix site-packages for ArchLinux installations

parent ed6b7981
Branches
Tags
No related merge requests found
...@@ -7,7 +7,7 @@ from setuptools import setup, find_packages ...@@ -7,7 +7,7 @@ from setuptools import setup, find_packages
setup( setup(
name='xbob.buildout', name='xbob.buildout',
version='0.2.12', version='0.2.13',
description="zc.buildout recipes to perform a variety of tasks required by Bob satellite packages", description="zc.buildout recipes to perform a variety of tasks required by Bob satellite packages",
keywords=['buildout', 'sphinx', 'nose', 'recipe', 'eggs', 'bob'], keywords=['buildout', 'sphinx', 'nose', 'recipe', 'eggs', 'bob'],
url='http://github.com/bioidiap/xbob.buildout', url='http://github.com/bioidiap/xbob.buildout',
......
...@@ -18,6 +18,15 @@ from zc.buildout.buildout import bool_option ...@@ -18,6 +18,15 @@ from zc.buildout.buildout import bool_option
import zc.buildout.easy_install import zc.buildout.easy_install
from zc.recipe.egg import Scripts from zc.recipe.egg import Scripts
# Standard prefixes to check
PYTHONDIR = 'python%d.%d' % sys.version_info[0:2]
SUFFIXES = tools.uniq([
get_python_lib(prefix=''),
os.path.join('lib', PYTHONDIR, 'site-packages'),
os.path.join('lib32', PYTHONDIR, 'site-packages'),
os.path.join('lib64', PYTHONDIR, 'site-packages'),
])
# Python interpreter script template # Python interpreter script template
py_script_template = """#!%(interpreter)s py_script_template = """#!%(interpreter)s
# %(date)s # %(date)s
...@@ -77,9 +86,10 @@ class Recipe(Scripts): ...@@ -77,9 +86,10 @@ class Recipe(Scripts):
self.user_paths = [] self.user_paths = []
if prefixes: if prefixes:
for k in prefixes: for k in prefixes:
candidate = os.path.realpath(get_python_lib(prefix=k)) for suffix in SUFFIXES:
if os.path.exists(candidate) and candidate not in self.user_paths: candidate = os.path.realpath(os.path.join(k, suffix))
self.user_paths.append(candidate) if os.path.exists(candidate) and candidate not in self.user_paths:
self.user_paths.append(candidate)
# Shall we panic or ignore if we cannot find all eggs? # Shall we panic or ignore if we cannot find all eggs?
self.panic = options.get('error-on-failure', 'true').lower() == 'true' self.panic = options.get('error-on-failure', 'true').lower() == 'true'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment