Opened 13 years ago
Closed 7 years ago
#30626 closed defect (worksforme)
py-spyder can't find pylint and ipython out of the box
Reported by: | mbrethen@… | Owned by: | eborisch (Eric A. Borisch) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.0.1 |
Keywords: | Cc: | sewebster@…, dh@…, stromnov (Andrey Stromnov), petrrr, blair (Blair Zajac) | |
Port: | py-spyder py-pylint |
Description
Versions of pylint should probably use the select portgroup like the python_select port does. Ports such as py26-spyder look for pylint in the user's system path (e.g. /opt/local/bin).
Change History (16)
comment:1 Changed 13 years ago by mbrethen@…
comment:2 Changed 13 years ago by jmroot (Joshua Root)
Resolution: | → wontfix |
---|---|
Status: | new → closed |
This is not a solution to the problem. What if you have py27-lint selected and also want to install py26-spyder? The spyder ports either need to be patched to use pylint-X.Y, or to add ${python.prefix}/bin to their PATH.
comment:3 Changed 13 years ago by mbrethen@…
Resolution: | wontfix |
---|---|
Status: | closed → reopened |
If you install py26-spyder, you may be surprised to find that you can't analyze your python code because it can't find a pylint binary in your system path.
I had the same issue with ipython until I used 'port select'. Why do some modules have a default (ipython) and others do not? Unless you have a very good reason for not doing so, MacPorts should be consistent in the way it interacts with a developer's software.
comment:4 Changed 13 years ago by mbrethen@…
I thought I should expound on my last comment. Spyder had the same problem with ipython; in fact it would not even start after I installed the ipython port. IPython_select exists and so I issued a 'port select ipython ipython27' before Spyder would run correctly.
comment:5 Changed 13 years ago by jmroot (Joshua Root)
The approach is consistent. Any port that doesn't work until you port select
something is broken. I mentioned two possible fixes in comment:2.
comment:6 Changed 13 years ago by mbrethen@…
My main point is that the py26-spyder port is broken, neither ipython nor pylint work with spyder out-of-box, so to speak. It was a simple matter to run ipython_select to fix it, whereas I spent a couple weeks discussing pylint with MacPorts and the Spyder developers. The reason it's broken is due to differences bewteen the python environment on linux/windows versus MacPorts' python framework.
comment:8 Changed 13 years ago by sewebster@…
Isn't this a good example of where macports can patch the port in question (spyder) to make it work in our environment?
comment:9 Changed 13 years ago by mbrethen@…
If the intent is to have spyder run within a python framework, then I would say it's utter failure. Spyder's developer expects to find default python binaries in the user's path. The existing port, py26-spyder has no such patches and when installed will use whatever un-suffixed python binary (along with all the modules) it can find in PATH. If it does not find one, pylint for example, you get a message in spyder to install it.
As such, py26-spyder, py27-spyder, etc. seem irrelevant. It makes more sense (to me anyway) to have a single port of spyder with a default python (using the port select function). Otherwise have fun sifting through all the python scripts trying figure out which ones to patch.
comment:10 Changed 13 years ago by mbrethen@…
I must retract my last comment with an apology. It seems that the spyder.app is compiled with the correct python launcher, so it does run in the proper framework. However, the 'programs.py' script is where module existence is checked by spyder. There are 2 functions: 'is_program_installed' and 'is_module_installed'. The former uses PATH to find the binary, which will fail under the MacPorts python framework. The latter tries to import the module, which should work within the same framework that spyder is installed. According to the developer, the 'current implementation of pylint plugin call pylint in a separate process.'
comment:11 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)
Cc: | dh@… stromnov@… added |
---|---|
Owner: | changed from macports-tickets@… to blair@… |
Port: | py-pylint added |
Status: | reopened → new |
Summary: | pylint: use select portgroup → py-pylint: use the right python |
Is this still a problem with the current py-pylint port?
comment:14 Changed 7 years ago by jmroot (Joshua Root)
Cc: | blair added |
---|---|
Owner: | changed from blair to eborisch |
Port: | py-spyder added |
Status: | new → assigned |
Summary: | py-pylint: use the right python → py-spyder can't find pylint and ipython out of the box |
comment:15 Changed 7 years ago by jmroot (Joshua Root)
Type: | request → defect |
---|
comment:16 Changed 7 years ago by eborisch (Eric A. Borisch)
Resolution: | → worksforme |
---|---|
Status: | assigned → closed |
Closing out this old ticket; spyder should be detecting these correctly now.
Reference Ticket #30446: 'Add py27-spyder port'