diff options
| author | Amos Wenger | 2013-08-15 21:50:13 +0200 |
|---|---|---|
| committer | Jack Nagel | 2013-08-19 13:35:44 -0500 |
| commit | 13c2776795a4cb233924914b558bab9a5e4beea2 (patch) | |
| tree | 3260352c9c7230683320294b612ba6e9738011a1 /Library/Homebrew/requirements/python_dependency.rb | |
| parent | 1c991b249ef58ba77f17431e108782b0adb7ceae (diff) | |
| download | homebrew-13c2776795a4cb233924914b558bab9a5e4beea2.tar.bz2 | |
Use File::PATH_SEPARATOR globally instead of ':'
On Unix, the path separator is ':', whereas on Windows,
it is ';'. This is the first of a series of patch to bring
macbrew's and winbrew's codebases closer together.
The main places the magic constant ':' was being used were:
- the $PATH environment variable
- CMAKE-related environment variables
- pkg-config related environment variables
Closes #21921.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Diffstat (limited to 'Library/Homebrew/requirements/python_dependency.rb')
| -rw-r--r-- | Library/Homebrew/requirements/python_dependency.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Library/Homebrew/requirements/python_dependency.rb b/Library/Homebrew/requirements/python_dependency.rb index 5eca9cf30..6a18883df 100644 --- a/Library/Homebrew/requirements/python_dependency.rb +++ b/Library/Homebrew/requirements/python_dependency.rb @@ -122,7 +122,7 @@ class PythonInstalled < Requirement else # Using the ORIGINAL_PATHS here because in superenv, the user # installed external Python is not visible otherwise. - which(@name, ORIGINAL_PATHS.join(':')) + which(@name, ORIGINAL_PATHS.join(File::PATH_SEPARATOR)) end end end @@ -252,12 +252,12 @@ 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, ':' unless from_osx? + ENV.prepend 'PATH', binary.dirname, File::PATH_SEPARATOR unless from_osx? ENV['PYTHONHOME'] = nil # to avoid fuck-ups. ENV['PYTHONPATH'] = if brewed? then nil; else global_site_packages.to_s; end - ENV.append 'CMAKE_INCLUDE_PATH', incdir, ':' - ENV.append 'PKG_CONFIG_PATH', pkg_config_path, ':' if pkg_config_path + ENV.append 'CMAKE_INCLUDE_PATH', incdir, File::PATH_SEPARATOR + ENV.append 'PKG_CONFIG_PATH', pkg_config_path, File::PATH_SEPARATOR if pkg_config_path # We don't set the -F#{framework} here, because if Python 2.x and 3.x are # used, `Python.framework` is ambiguous. However, in the `python do` block # we can set LDFLAGS+="-F#{framework}" because only one is temporarily set. |
