libftdi-0.19, fix lib64, site-packages, docs #8351
Conversation
if Formula.factory('python').installed? then | ||
inreplace 'bindings/cmake_install.cmake', | ||
'/usr/site-packages', | ||
'/usr/local/lib/python2.7/site-packages' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#{HOMEBREW_PREFIX}/lib/python2.7/site-packages
Thanks @jacknagel. Amended commit to use |
bump @ a month +/- a few naps. I guess these are big changes, but I think I handled the issues that were raised. |
Sorry, I've been swamped lately. Will try to get to this over the weekend. |
@adamv Can you review the site-packages part of this? |
@2bits re: the site-packages bit, the PySide formula sniffs for the installed Python version: def which_python
"python" + `python -c 'import sys;print(sys.version[:3])'`.strip
end and uses that to figure out where the site-packages directory is, which is nice because it works even in the absence of a Homebrew-built Python. So we could do something like: inreplace 'bindings/cmake_install.cmake', '/usr/site-packages', lib+"#{which_python}/site-packages" untested, of course. Sorry for not thinking of this earlier. |
The above commit now uses which_python to determine the site packages location. |
I think the answer is that it wants to write to /usr/site-packages if it uses the system python, and that is off-limits. |
Needs to be rebased on master again (sorry.) |
Yeah, I have no idea what I just did. I gave it a
It looks messed up, the commit. |
Looks like there was a conflict that needed resolving. |
How do I fix that if you have time for the gory details? |
When you perform a "mergy" operation (in this case, forward porting earlier work onto an updated upstream with
To resolve them, just edit the file, choosing whichever content is correct, or a combination of the two, or none at all. To mark it as resolved, you That being said, you can still edit the file, fix it, |
I should note that you can also at this point invoke |
Ok that should be clean. It audits ok. |
@jacknagel have a moment for this one? |
Also, can LIB_SUFFIX be set by e.g. |
Thank you for asking, but no there is no CMakeCache entry for LIB_SUFFIX. Also there is no manual override code inside CMakeLists.txt. Seeing as I had it dep on Graphviz, it's broken because that requires xcodebuild, I just found out. |
That removes the dep on graphviz for now and fixes the Dir.chdir. |
This commit updates to version 0.19, changes lib64 to lib for the library install, adds the optional deps on doxygen and graphviz, automatically builds the python bindings if Homebrew python is installed, corrects the location of site-packages to Homebrew's /usr/local/lib/python2.7/site-packages, and installs the docs. This compiles without error on 64bit OSX using XCode-4.0.2 and llvm, gcc, or clang. EDIT: use homebrew prefix for site-packages EDIT: use which_python to determine location for site-packages EDIT: fixed some rebase leftovers EDIT: remove the dep on graphviz that is broken. rm Dir.chdir. EDIT: change lib+"#{stuff}" to "#{lib}/#{stuff}" lol
So since I've asked for others to review this a few times without any response, I decided to just rebase and merge it myself. However, this inreplace failed: inreplace 'bindings/cmake_install.cmake', '/usr/site-packages', "#{lib}/#{which_python}/site-packages" Otherwise I'm content to merge. |
Adam bumped it to 0.20 two days ago, but I had some bad code in there about python. It will take some work. I think I'll just close this, and make a fresh start on 0.20. |
This commit updates to version 0.19, changes lib64 to lib for the
library install, adds the optional deps on doxygen and graphviz,
automatically builds the python bindings if Homebrew python is
installed, corrects the location of site-packages to Homebrew's
/usr/local/lib/python2.7/site-packages, and installs the docs.
This compiles without error on 64bit OSX using XCode-4.0.2 and
llvm, gcc, or clang.