make readline a dependency on OSX #343

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
3 participants
Owner

minrk commented Apr 9, 2011

This commit makes readline a setuptools install dependency on OSX (so easy_installed ipython will always install it), and adds readline/pyreadline to the check_dependencies on OSX/Windows.

If merged, this should probably close #20, unless we really do want to bundle readline.

@fperez fperez and 1 other commented on an outdated diff Apr 9, 2011

setupbase.py
@@ -327,7 +327,8 @@ def check_for_dependencies():
check_for_nose()
check_for_pexpect()
check_for_pyzmq()
-
+ if sys.platform == 'darwin' or sys.platform.startswith('win'):
@fperez

fperez Apr 9, 2011

Owner

Is this the recommended way to check for windows? It's a bit of a mess because there's the old os.name, there's sys.platform, and there's the new platform module. But I think the functions in platform module (http://docs.python.org/library/platform.html#module-platform) are the ones that we're supposed to use now across the board...

@minrk

minrk Apr 9, 2011

Owner

I can make the change, but sys.platform is the only check we have in IPython (and it's all over the place).

@fperez

fperez Apr 9, 2011

Owner

On Sat, Apr 9, 2011 at 11:56 AM, minrk
reply@reply.github.com
wrote:

I can make the change, but sys.platform is the only check we have in IPython (and it's all over the place).

MMh, we also have os.name in other places... Not sure what to do
here, let's take it up on IRC...

@fperez fperez commented on the diff Apr 9, 2011

setupext/setupext.py
@@ -140,3 +140,13 @@ def check_for_pyzmq():
print_status("pyzmq", zmq.__version__)
return True
+def check_for_readline():
+ try:
+ import readline
@fperez

fperez Apr 9, 2011

Owner

Isn't this supposed to return True on success?

minrk closed this in 74b2c74 Apr 9, 2011

Contributor

ddale commented Apr 11, 2011

I think this issue needs to be reopened. I already have readline installed:

>>> import readline
>>> readline.__file__
'/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/readline.so'

and yet:

$ python setupegg.py develop --user
[...]
Installed /Users/darren/Projects/ipython
Processing dependencies for ipython==0.11.dev
Searching for readline
Reading http://pypi.python.org/simple/readline/
Reading http://www.python.org/
Reading http://github.com/ludwigschwardt/python-readline
Best match: readline 6.1.0
Downloading http://pypi.python.org/packages/source/r/readline/readline-6.1.0.tar.gz#md5=1456828f863e05a4a47c2d89823cdc4e
Processing readline-6.1.0.tar.gz
Running readline-6.1.0/setup.py -q bdist_egg --dist-dir /var/folders/zk/zkIssZgsHvyoASNSRx8Opk+++TQ/-Tmp-/easy_install-lvpGB1/readline-6.1.0/egg-dist-tmp-pb6xJr
i686-apple-darwin10-gcc-4.2.1: readline/libreadline.a: No such file or directory
i686-apple-darwin10-gcc-4.2.1: readline/libhistory.a: No such file or directory
powerpc-apple-darwin10-gcc-4.2.1: readline/libreadline.a: No such file or directory
powerpc-apple-darwin10-gcc-4.2.1: readline/libhistory.a: No such file or directory
i686-apple-darwin10-gcc-4.2.1: readline/libreadline.a: No such file or directory
i686-apple-darwin10-gcc-4.2.1: readline/libhistory.a: No such file or directory
lipo: can't figure out the architecture type of: /var/folders/zk/zkIssZgsHvyoASNSRx8Opk+++TQ/-Tmp-//cccMDaQE.out
error: Setup script exited with error: command '/usr/bin/gcc-4.2' failed with exit status 1

Owner

minrk commented Apr 11, 2011

Well, crap.

I presume your readline was not installed with setuptools, and that's why it doesn't find it as a dependency.

@fperez, should we then do our own import check, rather than rely on setuptools' obviously deficient dependency checking?

Owner

minrk commented Apr 11, 2011

PR #361 backs off trusting setuptools for the dependency check, does that fix the problem for you?

Owner

fperez commented Apr 12, 2011

On Mon, Apr 11, 2011 at 10:07 AM, minrk
reply@reply.github.com
wrote:

@fperez, should we then do our own import check, rather than rely on setuptools' obviously deficient dependency checking?

Sure, if @ddale reports success with your new patch, let's use that...

@mattvonrocketstein mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this pull request Nov 3, 2014

@minrk minrk make readline a dependency on OSX and pyreadline on Windows
closes gh-343
229480c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment