Skip to content

spyder: 2.2.5 -> 2.3.6#9174

Closed
FRidh wants to merge 1 commit intoNixOS:masterfrom
FRidh:spyder
Closed

spyder: 2.2.5 -> 2.3.6#9174
FRidh wants to merge 1 commit intoNixOS:masterfrom
FRidh:spyder

Conversation

@FRidh
Copy link
Member

@FRidh FRidh commented Aug 9, 2015

This upgrades spyder to the latest version.

Currently, spyder on Nix is only available for Python 2 while it can work with Python 3 as well.
Therefore, I added spyder = callPackage ../applications/science/spyder {};.

The module rope is recommended but not (yet) ported to Python 3. Therefore, I removed it from the list of requirements. It might be nice to optionally add it for Python 2. Also, how to handle the rope option on the top?

It built and worked fine on Python 3. However, on Python 2 installation failed with error: option --old-and-unmanageable not recognized.

@bjornfor
Copy link
Contributor

bjornfor commented Aug 9, 2015

So this changes spyder (effectively) from a python2 app to a python3 app?

@FRidh
Copy link
Member Author

FRidh commented Aug 9, 2015

Well, it gives the possibility to have it as both Python 2 and Python 3 app. However, in this PR Python 2 is broken, therefore, still WIP. So effectively, yes.

@FRidh FRidh changed the title spyder: 2.2.5 -> 2.3.5.2 - WIP spyder: 2.2.5 -> 2.3.6 - WIP Aug 29, 2015
Set environment variable to use setuptools.
@FRidh FRidh changed the title spyder: 2.2.5 -> 2.3.6 - WIP spyder: 2.2.5 -> 2.3.6 Aug 29, 2015
@FRidh
Copy link
Member Author

FRidh commented Aug 29, 2015

@bjornfor Builds and runs on 2.7, 3.3 and 3.4

@bjornfor
Copy link
Contributor

I thought this would work:

  spyder = callPackage ../applications/science/spyder {
    rope = if isPy3k then null else rope;
  };

but it didn't:

$ time nox-review wip --against HEAD~1
error: while querying the derivation named ‘spyder-2.3.6’:
while evaluating the attribute ‘propagatedNativeBuildInputs’ of the derivation ‘spyder-2.3.6’ at /home/bfo/proj/code/forks/nixpkgs/pkgs/development/python-modules/generic/default.nix:65:3:
undefined variable ‘rope’ at /home/bfo/proj/code/forks/nixpkgs/pkgs/top-level/python-packages.nix:13276:37

@bjornfor
Copy link
Contributor

Doh, I just had to use "self.rope" instead of "rope" :-)

@bjornfor
Copy link
Contributor

Spyder with python3 fails to start:

$ /nix/store/s3ipql0iijfir98akcv53wa4mb66079x-spyder-2.3.6/bin/spyder3
Traceback (most recent call last):
  File "/nix/store/s3ipql0iijfir98akcv53wa4mb66079x-spyder-2.3.6/bin/.spyder3-wrapped", line 3, in <module>
    from spyderlib import start_app
  File "/nix/store/s3ipql0iijfir98akcv53wa4mb66079x-spyder-2.3.6/lib/python3.3/site-packages/spyderlib/start_app.py", line 13, in <module>
    from spyderlib.config import CONF
  File "/nix/store/s3ipql0iijfir98akcv53wa4mb66079x-spyder-2.3.6/lib/python3.3/site-packages/spyderlib/config.py", line 22, in <module>
    from spyderlib.utils import iofuncs, codeanalysis
  File "/nix/store/s3ipql0iijfir98akcv53wa4mb66079x-spyder-2.3.6/lib/python3.3/site-packages/spyderlib/utils/iofuncs.py", line 163, in <module>
    import scipy.io as spio
  File "/nix/store/6spjrd6ypf3fdx55fpnj6xikln9mrgav-python3.3-scipy-0.15.1/lib/python3.3/site-packages/scipy/io/__init__.py", line 85, in <module>
    from .matlab import loadmat, savemat, whosmat, byteordercodes
  File "/nix/store/6spjrd6ypf3fdx55fpnj6xikln9mrgav-python3.3-scipy-0.15.1/lib/python3.3/site-packages/scipy/io/matlab/__init__.py", line 13, in <module>
    from .mio import loadmat, savemat, whosmat
  File "/nix/store/6spjrd6ypf3fdx55fpnj6xikln9mrgav-python3.3-scipy-0.15.1/lib/python3.3/site-packages/scipy/io/matlab/mio.py", line 12, in <module>
    from .miobase import get_matfile_version, docfiller
  File "/nix/store/6spjrd6ypf3fdx55fpnj6xikln9mrgav-python3.3-scipy-0.15.1/lib/python3.3/site-packages/scipy/io/matlab/miobase.py", line 22, in <module>
    from scipy.misc import doccer
  File "/nix/store/6spjrd6ypf3fdx55fpnj6xikln9mrgav-python3.3-scipy-0.15.1/lib/python3.3/site-packages/scipy/misc/__init__.py", line 58, in <module>
    from .pilutil import *
  File "/nix/store/6spjrd6ypf3fdx55fpnj6xikln9mrgav-python3.3-scipy-0.15.1/lib/python3.3/site-packages/scipy/misc/pilutil.py", line 19, in <module>
    from PIL import Image, ImageFilter
  File "/nix/store/09mp30m5fpp0dmi3nvp5abxlqi4gsy09-python2.7-PIL-1.1.7/lib/python2.7/site-packages/PIL/Image.py", line 57
    except ImportError, v:
                      ^
SyntaxError: invalid syntax

@bjornfor
Copy link
Contributor

No, that was my bad, I had PYTHONPATH pointing to python2 stuff. It starts fine.

@bjornfor
Copy link
Contributor

I split the commit in two and pushed to master (dbc7e0f, ab6af31). Thanks.

@bjornfor bjornfor closed this Aug 29, 2015
@FRidh
Copy link
Member Author

FRidh commented Aug 30, 2015

Thanks for merging. I see you now added rope to the Py2 version. That's indeed a bit nicer for the Py2 users :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants