Commit 640205aa authored by Oskar Skog's avatar Oskar Skog

Support Homebrew

parent 12a6f6fe
#!/usr/bin/python
# Copyright (c) Oskar Skog, 2016-2018
# Copyright (c) Oskar Skog, 2016-2019
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
......@@ -365,15 +365,25 @@ def find_MODULES(Makefile, flags):
prefixes = [libdir + '/python']
try:
import platform
prefixes.append(libdir+'/'+platform.python_implementation().lower())
prefixes.append(libdir+'/'+platform.python_implementation())
prefixes.append(prefix+'/'+platform.python_implementation().lower())
prefixes.append(prefix+'/'+platform.python_implementation())
Implementation = platform.python_implementation()
implementation = Implementation.lower()
# Homebrew
prefixes.append(prefix+'/Cellar/'+implementation)
prefixes.append(prefix+'/Cellar/'+Implementation)
if sys.version_info[0] == 3:
prefixes.append(prefix+'/Cellar/'+implementation+'3')
prefixes.append(prefix+'/Cellar/'+Implementation+'3')
# Standard
prefixes.append(libdir+'/'+implementation)
prefixes.append(libdir+'/'+Implementation)
prefixes.append(prefix+'/'+implementation)
prefixes.append(prefix+'/'+Implementation)
except ImportError:
pass
except AttributeError:
pass
suffixes = ['/site-packages', '/dist-packages']
# Homebrew Standard Debian
suffixes = ['/libexec/site-packages', '/site-packages', '/dist-packages']
for suffix in suffixes:
for prefix in prefixes:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment