Opened 13 years ago
Closed 13 years ago
#30521 closed update (fixed)
ipython update to version 0.11
Reported by: | cdeil (Christoph Deil) | Owned by: | akitada@… |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | |
Keywords: | Cc: | luis.beca@…, ajb78@…, jjstickel@…, zheaton@…, michelle.lynn.gill@…, stromnov (Andrey Stromnov), otto.hasselblad@… | |
Port: | py25-ipython, py26-ipython, py27-ipython |
Description
- py25-ipython, py26-ipython, py27-ipython should be updated to version 0.11
- A port py32-ipython should be created.
- A variant for the new Qt-based console should be added.
- The existing scientific variant can be removed (or maybe I just fail to see it's purpose?)
- The new website and download location is at http://ipython.org/ and the port long_description should be updated a bit.
Attachments (13)
Change History (46)
comment:1 Changed 13 years ago by mf2k (Frank Schima)
Cc: | akitada@… openmaintainer@… removed |
---|---|
Owner: | changed from macports-tickets@… to akitada@… |
Version: | 2.0.0 |
Changed 13 years ago by cdeil (Christoph Deil)
Attachment: | Portfile-py27-ipython.diff added |
---|
comment:4 Changed 13 years ago by cdeil (Christoph Deil)
Attached find a Portfile patch that updates to 0.11, removes the scientific variant and adds parallel and qtconsole variants.
I couldn't test the qtconsole variant because port:py27-pyside currently doesn't build on Lion.
The same changes should be made to the other python version ports, or we try the new unified python portgroup?
@macsforever2000: This is the first time I have edited a Portfile, and I have no clue how to rewrite it to use the "unified python portgroup" you mentioned. I can see that it was implemented in changeset:80976 as a result of the discussion in ticket:16723.
Are there existing Portfiles that make use of it that we could use for guidance?
Is it necessary that dependencies (like python) have converted to this new method for supporting a bunch of python versions for python ports or is the new format compatible with the old multi-port format and a gradual transition is possible?
comment:10 follow-up: 11 Changed 13 years ago by michelle.lynn.gill@…
I've just installed the python26 version of ipython 0.11 with the variants +scientific+parallel. I cannot install the qtconsole variant as Qt will not build for me on Lion. The build completes fine, but when I tried to make this the default ipython using python select, I get the following error:
% sudo port select --set ipython ipython26 Password: Selecting 'ipython26' for 'ipython' failed: could not create new link "/Volumes/Files/macports/bin/ipython-wx": target "/Volumes/Files/macports/Library/Frameworks/Python.framework/Versions/2.6/bin/ipython-wx" doesn't exist
If I activate the old version of ipython (version 0.10.1), the same port select command runs fine. Thus, I'm guessing port select needs to be updated due to the GUI switchover in ipython 0.11. I have filed a ticket for "port select" as well.
Also, please do not delete the scientific variant. There are definitely some who use its capabilities. Thanks.
comment:11 follow-up: 12 Changed 13 years ago by cdeil (Christoph Deil)
Replying to michelle.lynn.gill@…:
I've just installed the python26 version of ipython 0.11 with the variants +scientific+parallel.
How? Did you patch the py26-ipython Portfile using the diff I attached to this ticket? I didn't try that myself, I'm waiting for the ipython Portfile maintainer to answer / update.
I cannot install the qtconsole variant as Qt will not build for me on Lion.
There are three open issues for building Qt on Lion at the moment, we just have to wait:
https://trac.macports.org/wiki/LionProblems
Also, please do not delete the scientific variant. There are definitely some who use its capabilities. Thanks.
I just don't see why installing http://dirac.cnrs-orleans.fr/ScientificPython/ (which is port pyXX-scientific) should be a variant of the ipython port. I've never used it, but as far as I can see from the web page it is just some python package that is not related to ipython? There are hundreds of such packages, some much more useful (e.g. numpy, scipy, matplotlib) than ScientificPython (which seems to be dead since 2007), which are also not ipython variants. If the variant is removed you can still use ScientificPython as you always have, just install the pyXX-scientific port instead of selecting the ipython scientific variant.
comment:12 Changed 13 years ago by michelle.lynn.gill@…
Replying to Deil.Christoph@…:
Replying to michelle.lynn.gill@…:
I've just installed the python26 version of ipython 0.11 with the variants +scientific+parallel.
How? Did you patch the py26-ipython Portfile using the diff I attached to this ticket? I didn't try that myself, I'm waiting for the ipython Portfile maintainer to answer / update.
Yes, I applied the patch to the existing iPython26 in a local port repository because there are parallel computing features new to version 0.11 that are useful to my research. I realize the port maintainer needs to commit a final version of the port, but it seems prudent to highlight the port select issue now so it can be dealt with if necessary when such a commit occurs.
I cannot install the qtconsole variant as Qt will not build for me on Lion.
There are three open issues for building Qt on Lion at the moment, we just have to wait:
I am aware of the link describing port issues involving Lion. This is what I was referring to.
Also, please do not delete the scientific variant. There are definitely some who use its capabilities. Thanks.
I just don't see why installing http://dirac.cnrs-orleans.fr/ScientificPython/ (which is port pyXX-scientific) should be a variant of the ipython port. I've never used it, but as far as I can see from the web page it is just some python package that is not related to ipython? There are hundreds of such packages, some much more useful (e.g. numpy, scipy, matplotlib) than ScientificPython (which seems to be dead since 2007), which are also not ipython variants. If the variant is removed you can still use ScientificPython as you always have, just install the pyXX-scientific port instead of selecting the ipython scientific variant.
I understand how to install pyXX-scientific independently and import it as a module in the iPython environment.
One reason the scientific variant exists is that one of the iPython-provided profiles, ipythonrc-physics, uses ScientificPython. I also know of at least one secondary project which uses this profile, so there may be (minor) downfield compatibility issues. Whether or not the existence of this profile and the possibility of other compatibility problems warrants the creation of a variant is a philosophical discussion, but clearly someone thought so at one point.
However, I have just noticed that as of version 0.11, several of the other modules utilized by ipythonrc-physics are on deathrow, so maybe these concerns will become moot if the profile is broken for other reasons.
Regardless of what the iPython maintainer decides, the reason for the existence of the scientific variant is not as arbitrary as it may seem.
Changed 13 years ago by jjstickel@…
Attachment: | Portfile_pyxx-ipython added |
---|
unified portfile for pyxx-ipython
comment:13 follow-up: 14 Changed 13 years ago by jjstickel@…
I just uploaded my attempt at a unified portfile. I successfully installed py26-ipython @0.11 using this portfile, but I have not tested py27, etc. You will need to have the appropriate ipythonXX file in the "files" subdirectory (grab from existing pyXX-ipython folders).
Perhaps someone knows how to consolidate the subport dependency lines.
comment:14 Changed 13 years ago by cdeil (Christoph Deil)
Replying to jjstickel@…:
I just uploaded my attempt at a unified portfile. I successfully installed py26-ipython @0.11 using this portfile, but I have not tested py27, etc. You will need to have the appropriate ipythonXX file in the "files" subdirectory (grab from existing pyXX-ipython folders).
Thanks for writing the new Portfile, it works for me for both 2.6 and 2.7.
I copied the contents of py26-ipython/files and py27-ipython/files to pyxx-ipython/files, then removed the py26-ipython and py27-ipython directories (otherwise port search '*ipython*'
will show two entries for py26-ipython and py27-ipython), then installed py26-ipython and py27-ipython using the new Portfile without problems.
However as already noted in comment:11 selecting ipython versions doesn't work:
$ sudo port select --set ipython ipython27 Selecting 'ipython27' for 'ipython' failed: could not create new link "/opt/local/bin/ipython-wx": target "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/bin/ipython-wx" doesn't exist
Note that this problem occured when switching from ipython 0.10 to ipython 0.11, not when switching to the new Portfile with subports.
Also I can confirm that the ipython qtconsole works with the pyside variant on Lion.
comment:15 Changed 13 years ago by jjstickel@…
I just noticed on http://ipython.org/ the following statement:
"IPython (0.11) supports Python 2.6 to 2.7 and 3.1 to 3.2. Using it with Python 3 requires a separate download..."
Therefore, in the unified portfile, we should delete 24 and 25 from the "python.versions" line and remove the corresponding subport lines. However, this would leave no port for py(24)-ipython. Is this OK? Or should we keep separate portfiles so that python 2.4 users can still use the older ipython?
Changed 13 years ago by jjstickel@…
Changed 13 years ago by jjstickel@…
comment:16 follow-up: 17 Changed 13 years ago by jjstickel@…
Replying to Deil.Christoph@…:
However as already noted in comment:11 selecting ipython versions doesn't work:
$ sudo port select --set ipython ipython27 Selecting 'ipython27' for 'ipython' failed: could not create new link "/opt/local/bin/ipython-wx": target "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/bin/ipython-wx" doesn't existNote that this problem occured when switching from ipython 0.10 to ipython 0.11, not when switching to the new Portfile with subports.
I think the contents of the ipythonXX files need to be changed. Try the attached files.
comment:17 follow-up: 18 Changed 13 years ago by cdeil (Christoph Deil)
Replying to jjstickel@…:
I think the contents of the ipythonXX files need to be changed. Try the attached files.
Now running the select succeeds. But for some reason the ipython link points to iptest, not to ipython (both when selecting 2.6 or 2.7):
/opt/local/bin/ipython -> /opt/local/Library/Frameworks/Python.framework/Versions/2.6/bin/iptest
If you add the python 3.1 and 3.2 subports (with the different download file) I'm happy to test all versions.
comment:18 follow-up: 20 Changed 13 years ago by jjstickel@…
Replying to Deil.Christoph@…:
Now running the select succeeds. But for some reason the ipython link points to iptest, not to ipython (both when selecting 2.6 or 2.7):
/opt/local/bin/ipython -> /opt/local/Library/Frameworks/Python.framework/Versions/2.6/bin/iptest
What happens if you cycle the the selection a couple of times? I am totally guessing here... someone with a better understanding of how "port select" works will probably have to provide some input.
If you add the python 3.1 and 3.2 subports (with the different download file) I'm happy to test all versions.
Again, someone who knows more about the internals of the unified python group will need to provide some input. I do not know how to specify a separate download depending on python version.
comment:19 Changed 13 years ago by mf2k (Frank Schima)
You could try the following untested code:
if {$subport == "py31-ipython"} { distname foo-$version }
Also, I believe your variants can be simplified like this:
variant pyqt4 conflicts pyside requires parallel description "Support for the Qt console using pyqt4" { depends_lib-append port:py${python.version}-pyqt4 }
comment:20 follow-up: 22 Changed 13 years ago by cdeil (Christoph Deil)
Replying to jjstickel@…:
Replying to Deil.Christoph@…:
Now running the select succeeds. But for some reason the ipython link points to iptest, not to ipython (both when selecting 2.6 or 2.7):
/opt/local/bin/ipython -> /opt/local/Library/Frameworks/Python.framework/Versions/2.6/bin/iptest
What happens if you cycle the the selection a couple of times? I am totally guessing here... someone with a better understanding of how "port select" works will probably have to provide some input.
Changing the order of iptest and ipython in the files you had attached solves the problem. :-)
Apparently port select creates a link to a line in these files with the line number being specified elsewhere!?
I'll attach the updated files now.
Changed 13 years ago by cdeil (Christoph Deil)
Attachment: | ipython26.2 added |
---|
iptest and ipython lines switched
Changed 13 years ago by cdeil (Christoph Deil)
Attachment: | ipython27.2 added |
---|
iptest and ipython lines switched
comment:21 Changed 13 years ago by cdeil (Christoph Deil)
Note: Trac changed the filename from ipython26 to ipython26.2 when I uploaded, it should of course still be ipython26 .
comment:22 Changed 13 years ago by jjstickel@…
Replying to Deil.Christoph@…:
Changing the order of iptest and ipython in the files you had attached solves the problem. :-)
Apparently port select creates a link to a line in these files with the line number being specified elsewhere!?
I'll attach the updated files now.
Figured it out... files for the ipython_select port need updating. I'll attach them shortly. With these corrections to ipython_select, you should use the files I uploaded (no reversal of iptest and ipython). BTW, I determined the contents of those files by doing:
$ port contents py26-ipython | grep bin $ port contents py26-ipython | grep man1
Changed 13 years ago by jjstickel@…
corrected ipython_select file for ipython 0.11
Changed 13 years ago by jjstickel@…
corrected ipython_select file for ipython 0.11
Changed 13 years ago by jjstickel@…
Attachment: | Portfile_pyxx-ipython.2 added |
---|
updated unified portfile
comment:23 follow-up: 24 Changed 13 years ago by jjstickel@…
I just uploaded a revised unified Portfile based on the suggestions by macsforever2000. Please test it out (I only tested py26).
comment:24 follow-up: 26 Changed 13 years ago by cdeil (Christoph Deil)
Replying to jjstickel@…:
I just uploaded a revised unified Portfile based on the suggestions by macsforever2000. Please test it out (I only tested py26).
It works for 2.6 and 2.7.
For 3.1 and 3.2 the checksums are different, so I changed the Portfile like this:
if { $subport == "py31-ipython" || $subport == "py32-ipython" } { master_sites http://archive.ipython.org/release/${version}/py3 distname ${my_name}-${version}-py3 checksums md5 d4a83d38401c6c8c6768cba8a63341db \ sha1 8204a5f05f97de2f0f434b7ffc751749b4407f38 \ rmd160 6dd414f5e85f2d96c94974fe67c06699f123e360 }
After this change the install still fails in some cd command:
:notice:build ---> Building py31-ipython :debug:build Executing proc-pre-org.macports.build-build-0 :debug:build Executing org.macports.build (py31-ipython) :debug:build Environment: CFLAGS='' CXXFLAGS='' CPATH='/opt/local/include' MACOSX_DEPLOYMENT_TARGET='10.7' LIBRARY_PATH='/opt/local/lib' F90FLAGS='' CC_PRINT_OPTIONS_FILE='/opt/local/var/macports/build/_opt_local_var_macports_sources_svn.macports.org_trunk_dports_python_pyxx-ipython/py31-ipython/work/.CC_PRINT_OPTIONS' LDFLAGS='' FCFLAGS='' OBJCFLAGS='' FFLAGS='' CC_PRINT_OPTIONS='YES' :debug:build Assembled command: 'cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_svn.macports.org_trunk_dports_python_pyxx-ipython/py31-ipython/work/ipython-0.11-py3" && /opt/local/Library/Frameworks/Python.framework/Versions/3.1/bin/python3.1 setup.py --no-user-cfg build' :debug:build Executing command line: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_svn.macports.org_trunk_dports_python_pyxx-ipython/py31-ipython/work/ipython-0.11-py3" && /opt/local/Library/Frameworks/Python.framework/Versions/3.1/bin/python3.1 setup.py --no-user-cfg build :info:build sh: line 0: cd: /opt/local/var/macports/build/_opt_local_var_macports_sources_svn.macports.org_trunk_dports_python_pyxx-ipython/py31-ipython/work/ipython-0.11-py3: No such file or directory :info:build shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_svn.macports.org_trunk_dports_python_pyxx-ipython/py31-ipython/work/ipython-0.11-py3" && /opt/local/Library/Frameworks/Python.framework/Versions/3.1/bin/python3.1 setup.py --no-user-cfg build " returned error 1 :error:build Target org.macports.build returned: shell command failed (see log for details) :debug:build Backtrace: shell command failed (see log for details) while executing "command_exec build" (procedure "portbuild::build_main" line 8) invoked from within "$procedure $targetname" :info:build Warning: the following items did not execute (for py31-ipython): org.macports.activate org.macports.build org.macports.destroot org.macports.install :notice:build Log for py31-ipython is at: /opt/local/var/macports/logs/_opt_local_var_macports_sources_svn.macports.org_trunk_dports_python_pyxx-ipython/py31-ipython/main.log
And one more issue: The pyxx-ipython Portfile generates py-ipython, py24-ipython and py25-ipython ports as well (I don't know why since these are not listed subparts in the Portfile):
$ port search ipython ipython_select @0.1 (python) common files for selecting default ipython version py-ipython @0.11 (python) An enhanced Interactive Python shell py24-ipython @0.11 (python) An enhanced Interactive Python shell py25-ipython @0.11 (python) An enhanced Interactive Python shell py26-ipython @0.11 (python) An enhanced Interactive Python shell py27-ipython @0.11 (python) An enhanced Interactive Python shell py31-ipython @0.11 (python) An enhanced Interactive Python shell py32-ipython @0.11 (python) An enhanced Interactive Python shell Found 8 ports. christoph-deils-macbook:dports deil$ port file py26-ipython /opt/local/var/macports/sources/svn.macports.org/trunk/dports/python/pyxx-ipython/Portfile christoph-deils-macbook:dports deil$ port file py25-ipython /opt/local/var/macports/sources/svn.macports.org/trunk/dports/python/pyxx-ipython/Portfile
Trying to install py25-ipython fails:
---> Staging py25-ipython into destroot . missing (directory not created: File exists) ./Applications missing (directory not created: File exists) ./Developer missing (directory not created: File exists) ./Library missing (directory not created: File exists) sh: /opt/local/var/macports/build/_opt_local_var_macports_sources_svn.macports.org_trunk_dports_python_pyxx-ipython/py25-ipython/work/destroot/opt/local/share/doc/py-ipython/README: No such file or directory shell command "echo py-ipython is a stub port > /opt/local/var/macports/build/_opt_local_var_macports_sources_svn.macports.org_trunk_dports_python_pyxx-ipython/py25-ipython/work/destroot/opt/local/share/doc/py-ipython/README" returned error 1 Error: Target org.macports.destroot returned: shell command failed (see log for details) Warning: the following items did not execute (for py25-ipython): org.macports.activate org.macports.destroot org.macports.install Log for py25-ipython is at: /opt/local/var/macports/logs/_opt_local_var_macports_sources_svn.macports.org_trunk_dports_python_pyxx-ipython/py25-ipython/main.log Error: Status 1 encountered during processing. To report a bug, see <http://guide.macports.org/#project.tickets>
comment:25 follow-up: 28 Changed 13 years ago by jjstickel@…
Following the conventions of other unified python portfiles I have looked at, the folder name should be "py-ipython" and the portfile name should be (of course) "Portfile". I appended pyxx-ipython for the upload just to distinguish that it is a unified portfile and not simply one for py24. When I do a search, I get:
$ port search ipython ipython_select @0.1 (python) common files for selecting default ipython version py-ipython @0.9.1 (python) An enhanced Interactive Python shell py-ipython @0.11 (python) An enhanced Interactive Python shell py25-ipython @0.10.2 (python) An enhanced Interactive Python shell py26-ipython @0.10.1 (python) An enhanced Interactive Python shell py26-ipython @0.11 (python) An enhanced Interactive Python shell py27-ipython @0.10.2 (python) An enhanced Interactive Python shell py27-ipython @0.11 (python) An enhanced Interactive Python shell py31-ipython @0.11 (python) An enhanced Interactive Python shell py32-ipython @0.11 (python) An enhanced Interactive Python shell
I get double-entries for some since I have not deleted the mono-portfiles from my primary macports tree. However, I do not get a py25-ipython @0.11, as you do. Have you made sure that you do not have some extraneous files laying around?
comment:26 follow-up: 27 Changed 13 years ago by jjstickel@…
Replying to Deil.Christoph@…:
For 3.1 and 3.2 the checksums are different, so I changed the Portfile like this: ... After this change the install still fails in some cd command: ...
Looks like the $worksrcdir needs to be specified. Try the Portfile I just uploaded.
comment:27 Changed 13 years ago by cdeil (Christoph Deil)
Replying to jjstickel@…:
Looks like the $worksrcdir needs to be specified. Try the Portfile I just uploaded.
The new portfile works for 26, 27, 31, 32.
I added the files ipython31 and ipython32 to the files directory, which I'll upload now.
Note that the binaries are called ipcluster3 etc for the python 3 versions, so I don't know if these four (almost identical) files ipython26, ipython27, ipython31, ipython32 can be replaced by one file and the version distinction made in the py-ipython or ipython_select portfiles?
Changed 13 years ago by cdeil (Christoph Deil)
Changed 13 years ago by cdeil (Christoph Deil)
comment:28 Changed 13 years ago by cdeil (Christoph Deil)
Replying to jjstickel@…:
Following the conventions of other unified python portfiles I have looked at, the folder name should be "py-ipython" and the portfile name should be (of course) "Portfile". I appended pyxx-ipython for the upload just to distinguish that it is a unified portfile and not simply one for py24. [...] I get double-entries for some since I have not deleted the mono-portfiles from my primary macports tree. However, I do not get a py25-ipython @0.11, as you do. Have you made sure that you do not have some extraneous files laying around?
I now renamed the pyxx-ipython directory I had created to py-ipython. I have deleted the old py-ipython, py24-ipython, py25-ipython, py26-ipython and py27-ipython directories completely and also uninstalled all ports before trying the new Portfile. I also think there must be "some extraneous files laying around", because I still get e.g. a py25-ipython port in port search:
ipython_select @0.1 (python) common files for selecting default ipython version py-ipython @0.11 (python) An enhanced Interactive Python shell py25-ipython @0.11 (python) An enhanced Interactive Python shell py26-ipython @0.11 (python) An enhanced Interactive Python shell py27-ipython @0.11 (python) An enhanced Interactive Python shell py31-ipython @0.11 (python) An enhanced Interactive Python shell py32-ipython @0.11 (python) An enhanced Interactive Python shell Found 7 ports.
Of course py-ipython and py25-ipython shoudn't be there and don't install.
Maybe this gives a clue as to the problem?
$ port file py25-ipython can't create directory "/opt/local/var/macports/portdirs": permission denied while executing "file mkdir $fetchdir" (procedure "macports::fetch_port" line 4) invoked from within "macports::fetch_port $path 1" (procedure "macports::getportdir" line 12) invoked from within "macports::getportdir $porturl" ("uplevel" body line 21) invoked from within "uplevel 1 $block" (procedure "foreachport" line 20) invoked from within "foreachport $portlist { array unset portinfo # If we have a url, use that, since it's most specific, otherwise try to map the portname..." (procedure "action_portcmds" line 12) invoked from within "$action_proc $action $portlist [array get global_options]" (procedure "process_cmd" line 95) invoked from within "process_cmd $remaining_args" invoked from within "if { [llength $remaining_args] > 0 } { # If there are remaining arguments, process those as a command set exit_status [process_cmd $remaining..." (file "/opt/local/bin/port" line 4664)
Anyways, if you don't see the problem, I think we should ignore this problem? It could very well be that I messed up my port ipython stuff during the last days while playing with the new Portfile.
Changed 13 years ago by jjstickel@…
Attachment: | Portfile_pyxx-ipython.diff added |
---|
add python.default_version
comment:29 Changed 13 years ago by jjstickel@…
Based on the suggestion stated here: http://lists.macosforge.org/pipermail/macports-dev/2011-August/015645.html; I just uploaded a minor patch to the Porfile that adds python.default_version.
comment:30 Changed 13 years ago by jjstickel@…
I think these changes are ready for developer/commiter review. Summary of changes that will need to be commited:
- Unified py-ipython portfile; note: py24 and py25 are no longer supported. py25-ipython @0.10.2 is probably OK with existing standalone port, but my understanding is that py24 will be clobbered since its standalone port has the same name as the unified port. Perhaps there is a workaround that I don't know about.
- New sets of files are needed to make "port select ipython ..." work properly. These are the "ipythonXX" files for py-ipython and the "base" and "none" files for ipython_select. Probably should increment the revision of ipython_select.
comment:33 Changed 13 years ago by stromnov (Andrey Stromnov)
Resolution: | → fixed |
---|---|
Status: | new → closed |
Committed in r83528.
Note that openmaintainer@… is not a valid email address.
This is a perfect opportunity to change these ports into a single port using the new unified python portgroup.