Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.

Updated the opencv version to 2.3.1. #7500

Closed
wants to merge 1 commit into from
Closed

Updated the opencv version to 2.3.1. #7500

wants to merge 1 commit into from

Conversation

wjwwood
Copy link
Contributor

@wjwwood wjwwood commented Sep 8, 2011

I updated the package to support opencv 2.3.1. This is tested on OS X 10.7.1.

∫ python 
Python 2.7.1 (r271:86832, Jun 16 2011, 16:59:05) 
[GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import cv
>>> import cv2
>>> ^D
william@arepa:/usr/local (git:opencv-2.3.1:9317f43) 
∫ which python
/usr/bin/python

I am aware of #6692

I think this has either been fixed upstream by opencv or homebrew or OS X. I don't seem to have the issues they are talking about. I am using the system Python though. Maybe we need to retest on SL and with the homebrew python.

Like I said this is working on OS X 10.7.1 with the system Python.

@manphiz
Copy link
Contributor

manphiz commented Sep 10, 2011

The python version differs on different versions of Mac. Will be great to specify Python version as per system version.

@wjwwood
Copy link
Contributor Author

wjwwood commented Sep 10, 2011

Sorry I don't exactly understand what you mean, something like a Formula
option --with-python= ? Or a system wide option for
specifying the python version to use?

If I were to add an option for specifying the python version to use with
opencv, how would I do that? Is there a good example Formula where that is
done?

Thanks,

William Woodall
Graduate Software Engineering
Auburn University
w@auburn.edu
wjwwood@gmail.com
williamjwoodall.com

On Sat, Sep 10, 2011 at 4:52 AM, Xiyue Deng <
reply@reply.github.com>wrote:

The python version differs on different versions of Mac. Will be great to
specify Python version as per system version.

Reply to this email directly or view it on GitHub:
#7500 (comment)

@manphiz
Copy link
Contributor

manphiz commented Sep 10, 2011

Homebrew has a MacOS module that set system version. As Mac OS X 10.5 ships Python 2.5 as default, 10.6 ships Python 2.6 as default, 10.7 ships Python 2.7 as default, the default Python version can be determined by system version. Something like this should work (untested, I'm new to ruby so please correct me):

if MacOS.leopard?
python_version = 2.5
elseif MacOS.snow_leopard?
python_version = 2.6
elseif MacOS.lion?
python_version = 2.7
else
opoo "Unsupported system version."
end

Then the caveat line could be written like this:

export PYTHONPATH="#{HOMEBREW_PREFIX}/lib/python#{python_version}/site-packages/:$PYTHONPATH"

On the other hand, I think it will be beneficial if Homebrew could define the default version for Perl, Python, Tcl, PHP, etc. as they did for gcc. It will further simplify formula that installs modules for those languages.

@wjwwood
Copy link
Contributor Author

wjwwood commented Sep 10, 2011

I agree that having a brew set python_version would help with this because
what if you have python installed via brew and want to detect that? Maybe
there is already something like this, something like python_select.

William Woodall
Graduate Software Engineering
Auburn University
w@auburn.edu
wjwwood@gmail.com
williamjwoodall.com

On Sat, Sep 10, 2011 at 5:02 PM, Xiyue Deng <
reply@reply.github.com>wrote:

Homebrew has a MacOS module that set system version. As Mac OS X 10.5 ships
Python 2.5 as default, 10.6 ships Python 2.6 as default, 10.7 ships Python
2.7 as default, the default Python version can be determined by system
version. Something like this should work (untested, I'm new to ruby so
please correct me):

if MacOS.leopard?
python_version = 2.5
elseif MacOS.snow_leopard?
python_version = 2.6
elseif MacOS.lion?
python_version = 2.7
else
opoo "Unsupported system version."
end

Then the caveat line could be written like this:

export
PYTHONPATH="#{HOMEBREW_PREFIX}/lib/python#{python_version}/site-packages/:$PYTHONPATH"

On the other hand, I think it will be beneficial if Homebrew could define
the default version for Perl, Python, Tcl, PHP, etc. as they did for gcc. It
will further simplify formula that installs modules for those languages.

Reply to this email directly or view it on GitHub:
#7500 (comment)

@Sharpie
Copy link
Contributor

Sharpie commented Sep 18, 2011

@manphiz

Have to be careful as MacOS.snow_leopard? actually returns true if MACOS_VERSION >= 10.6---so it will take over execution even if the computer is running Lion.

It's a bug, but one that has been in Homebrew so long that there are lots of formula using it as a "feature".

@Sharpie Sharpie closed this in d11a8d2 Sep 21, 2011
martinploeger pushed a commit to martinploeger/homebrew that referenced this pull request Oct 8, 2011
Also correct `PYTHONPATH` in caveats.

Fixes Homebrew#5596.

Fixes Homebrew#7121.
Fixes Homebrew#7453.

Closes Homebrew#6692.
Closes Homebrew#7500.
Closes Homebrew#7706.

Signed-off-by: Charlie Sharpsteen <source@sharpsteen.net>
Sharpie pushed a commit to Sharpie/homebrew that referenced this pull request Sep 12, 2012
Also correct `PYTHONPATH` in caveats.

Fixes Homebrew#5596.

Fixes Homebrew#7121.
Fixes Homebrew#7453.

Closes Homebrew#6692.
Closes Homebrew#7500.
Closes Homebrew#7706.

Signed-off-by: Charlie Sharpsteen <source@sharpsteen.net>
snakeyroc3 pushed a commit to snakeyroc3/homebrew that referenced this pull request Dec 17, 2012
Also correct `PYTHONPATH` in caveats.

Fixes Homebrew#5596.

Fixes Homebrew#7121.
Fixes Homebrew#7453.

Closes Homebrew#6692.
Closes Homebrew#7500.
Closes Homebrew#7706.

Signed-off-by: Charlie Sharpsteen <source@sharpsteen.net>
@Homebrew Homebrew locked and limited conversation to collaborators Feb 16, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants