-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change plugins directory to spyplugins and make it a namespace package #2565
Conversation
@ccordoba12 when running Updating... spyderlib/locale/fr/LC_MESSAGES/spyderlib.po
merge...
spyderlib/locale/spyderlib.pot:2690: duplicate message definition...
spyderlib/locale/spyderlib.pot:6: ...this is the location of the first definition
msgmerge: found 1 fatal error
Updating... spyderlib/locale/es/LC_MESSAGES/spyderlib.po
merge...
spyderlib/locale/spyderlib.pot:2690: duplicate message definition...
spyderlib/locale/spyderlib.pot:6: ...this is the location of the first definition
msgmerge: found 1 fatal error
Updating... spyderlib/locale/pt_BR/LC_MESSAGES/spyderlib.po
merge...
spyderlib/locale/spyderlib.pot:2690: duplicate message definition...
spyderlib/locale/spyderlib.pot:6: ...this is the location of the first definition
msgmerge: found 1 fatal error |
No idea, I'll check this out after beta1 |
@ccordoba12 ... ok this was a bit longer than expected but I think it is now working. I need some testers... |
I'll test this weekend :-) |
@SylvainCorlay how should we handle icons in external plugins? I mean, we need to define some sane/easy way for people to define both a fontawesome icon and a normal image icon... |
This needs a rebase too. Also, I'm getting this traceback in Python 3 (Python 2 works just fine ;-): ERROR: 3rd party plugin import failed for `spyplugins.io.hdf5`
Traceback (most recent call last):
File "/home/carlos/Projects/spyder/github-repo/spyderlib/otherplugins.py", line 53, in _import_plugin
submodule = imp.load_module(submodule_name, *info)
File "/home/carlos/.virtualenvs/test-ipy3-stable/lib/python3.4/imp.py", line 235, in load_module
return load_source(name, filename, file)
File "/home/carlos/.virtualenvs/test-ipy3-stable/lib/python3.4/imp.py", line 171, in load_source
module = methods.load()
File "<frozen importlib._bootstrap>", line 1220, in load
File "<frozen importlib._bootstrap>", line 1200, in _load_unlocked
File "<frozen importlib._bootstrap>", line 1129, in _exec
File "<frozen importlib._bootstrap>", line 1444, in exec_module
File "<frozen importlib._bootstrap>", line 1554, in get_code
File "<frozen importlib._bootstrap>", line 672, in _code_to_bytecode
ValueError: unmarshallable object
ERROR: 3rd party plugin import failed for `spyplugins.io.dicom`
Traceback (most recent call last):
File "/home/carlos/Projects/spyder/github-repo/spyderlib/otherplugins.py", line 53, in _import_plugin
submodule = imp.load_module(submodule_name, *info)
File "/home/carlos/.virtualenvs/test-ipy3-stable/lib/python3.4/imp.py", line 235, in load_module
return load_source(name, filename, file)
File "/home/carlos/.virtualenvs/test-ipy3-stable/lib/python3.4/imp.py", line 171, in load_source
module = methods.load()
File "<frozen importlib._bootstrap>", line 1220, in load
File "<frozen importlib._bootstrap>", line 1200, in _load_unlocked
File "<frozen importlib._bootstrap>", line 1129, in _exec
File "<frozen importlib._bootstrap>", line 1444, in exec_module
File "<frozen importlib._bootstrap>", line 1554, in get_code
File "<frozen importlib._bootstrap>", line 672, in _code_to_bytecode
ValueError: unmarshallable object
ERROR: 3rd party plugin import failed for `spyplugins.io.hdf5`
Traceback (most recent call last):
File "/home/carlos/Projects/spyder/github-repo/spyderlib/otherplugins.py", line 53, in _import_plugin
submodule = imp.load_module(submodule_name, *info)
File "/home/carlos/.virtualenvs/test-ipy3-stable/lib/python3.4/imp.py", line 235, in load_module
return load_source(name, filename, file)
File "/home/carlos/.virtualenvs/test-ipy3-stable/lib/python3.4/imp.py", line 171, in load_source
module = methods.load()
File "<frozen importlib._bootstrap>", line 1220, in load
File "<frozen importlib._bootstrap>", line 1200, in _load_unlocked
File "<frozen importlib._bootstrap>", line 1129, in _exec
File "<frozen importlib._bootstrap>", line 1444, in exec_module
File "<frozen importlib._bootstrap>", line 1554, in get_code
File "<frozen importlib._bootstrap>", line 672, in _code_to_bytecode
ValueError: unmarshallable object
ERROR: 3rd party plugin import failed for `spyplugins.io.dicom`
Traceback (most recent call last):
File "/home/carlos/Projects/spyder/github-repo/spyderlib/otherplugins.py", line 53, in _import_plugin
submodule = imp.load_module(submodule_name, *info)
File "/home/carlos/.virtualenvs/test-ipy3-stable/lib/python3.4/imp.py", line 235, in load_module
return load_source(name, filename, file)
File "/home/carlos/.virtualenvs/test-ipy3-stable/lib/python3.4/imp.py", line 171, in load_source
module = methods.load()
File "<frozen importlib._bootstrap>", line 1220, in load
File "<frozen importlib._bootstrap>", line 1200, in _load_unlocked
File "<frozen importlib._bootstrap>", line 1129, in _exec
File "<frozen importlib._bootstrap>", line 1444, in exec_module
File "<frozen importlib._bootstrap>", line 1554, in get_code
File "<frozen importlib._bootstrap>", line 672, in _code_to_bytecode
ValueError: unmarshallable object This is printed in both the internal console and also the terminal from which Spyder was started. @goanpeca, can you reproduce it? |
@ccordoba12 will try to work on this tomorrow |
@ccordoba12 so I think this one is fixed now and should be working on Py2.7 3.3 and 3.4 Can you test it ? |
@ccordoba12 this will not work unless we use setuptools.... distutils cannot handle namespace packages... |
@ccordoba12 now it is ready, can you test? |
'spyderplugins': | ||
get_package_data('spyderplugins', EXTLIST)}, | ||
'spyplugins': | ||
get_package_data('spyplugins', EXTLIST+['.py']), |
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.
Isn't .py
part of EXTLIST?
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.
Another thing: doesn't get_package_data
works recursively? It would seem like that given that before it was only necessary to pass spyderplugins
to it :-)
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.
Probably :-)
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.
Ok, please check that out before merging
Ok, first review done. It's working without errors on Python 3, but I still have to:
Thanks a lot for this @goanpeca and @Nodd. It seems a lot of work, I mean, from the design and implementation point of view. |
@ccordoba12 I organized the code a bit better and addressed your questions. |
Ok, thanks. I'll give another review later today, and also test this on Windows. |
@ccordoba12 have you had time to review and test this? |
Change plugins directory to spyplugins and make it a namespace package
👍, now I will push the plugin manager PR :-) |
Side note: conda-manager plugin is a bit broken right now.... |
Ok, no biggie. There are the other plugins to test :-) |
Cool, thanks to @goanpeca for finishing the work and @ccordoba12 for the review ! |
This works builds on top of the work made by @Nodd (dont worry, your commits are all there ;-) )
I still have an issue when running the translation scriptsTodo
spyderplugins
tospyplugins/ui
spyderplugins
tospyplugins/io
p_
prefix from plugins