Use ENV.prepend_path
This commit is contained in:
parent
ea8f51256b
commit
4a3dac82ef
@ -73,7 +73,7 @@ module SharedEnvExtension
|
||||
paths = ORIGINAL_PATHS.map { |p| p.realpath.to_s rescue nil } - %w{/usr/X11/bin /opt/X11/bin}
|
||||
self['PATH'] = paths.unshift(*self['PATH'].split(File::PATH_SEPARATOR)).uniq.join(File::PATH_SEPARATOR)
|
||||
# XXX hot fix to prefer brewed stuff (e.g. python) over /usr/bin.
|
||||
prepend 'PATH', HOMEBREW_PREFIX/'bin', File::PATH_SEPARATOR
|
||||
prepend_path 'PATH', HOMEBREW_PREFIX/'bin'
|
||||
end
|
||||
|
||||
def fortran
|
||||
|
||||
@ -62,11 +62,11 @@ def python_helper(options={:allowed_major_versions => [2, 3]}, &block)
|
||||
# so that lib points to the HOMEBREW_PREFIX/Cellar/<formula>/<version>/lib
|
||||
puts "brew: Prepending to PYTHONPATH: #{py.site_packages}" if ARGV.verbose?
|
||||
mkdir_p py.site_packages
|
||||
ENV.prepend 'PYTHONPATH', py.site_packages, File::PATH_SEPARATOR
|
||||
ENV.prepend_path 'PYTHONPATH', py.site_packages
|
||||
ENV['PYTHON'] = py.binary
|
||||
ENV.prepend 'CMAKE_INCLUDE_PATH', py.incdir, File::PATH_SEPARATOR
|
||||
ENV.prepend 'PKG_CONFIG_PATH', py.pkg_config_path, File::PATH_SEPARATOR if py.pkg_config_path
|
||||
ENV.prepend 'PATH', py.binary.dirname, File::PATH_SEPARATOR unless py.from_osx?
|
||||
ENV.prepend_path 'CMAKE_INCLUDE_PATH', py.incdir
|
||||
ENV.prepend_path 'PKG_CONFIG_PATH', py.pkg_config_path if py.pkg_config_path
|
||||
ENV.prepend_path 'PATH', py.binary.dirname unless py.from_osx?
|
||||
#Note: Don't set LDFLAGS to point to the Python.framework, because
|
||||
# it breaks builds (for example scipy.)
|
||||
|
||||
|
||||
@ -250,7 +250,7 @@ class PythonInstalled < Requirement
|
||||
file.write(sitecustomize)
|
||||
|
||||
# For non-system python's we add the opt_prefix/bin of python to the path.
|
||||
ENV.prepend 'PATH', binary.dirname, File::PATH_SEPARATOR unless from_osx?
|
||||
ENV.prepend_path 'PATH', binary.dirname unless from_osx?
|
||||
|
||||
ENV['PYTHONHOME'] = nil # to avoid fuck-ups.
|
||||
ENV['PYTHONPATH'] = if brewed? then nil; else global_site_packages.to_s; end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user