nokia / PyVenvManage

PyVenvManage is a plugin for managing the Python interpreter of Pycharm Projects
BSD 3-Clause "New" or "Revised" License
16 stars 2 forks source link

Provide compatibility with CLion #9

Open mrh1997 opened 5 years ago

mrh1997 commented 5 years ago

Is there a general show-stopper for providing this really helpful plugin also for CLion? If not so, please add CLion to the list of supported IDEs.

andrask commented 5 years ago

I've never used CLion. Seems like someone else ran into this issue too: https://intellij-support.jetbrains.com/hc/en-us/community/posts/360000058630-Allow-my-plugin-to-install-on-IDEA I'll try to build a version that installs on other IDEs. Meanwhile, could you try manually installing the plugin in you tool? The jar is available in the releases https://github.com/nokia/PyVenvManage/releases/tag/v1.1

andrask commented 5 years ago

I found project with similar build requirements: https://github.com/JesusFreke/fusionIdea/blob/master/build.gradle They made changes related to this issue recently: https://github.com/JesusFreke/fusionIdea/commit/9bb2fb7eebd68f9224f2b0192b3d965cd11253c4

mrh1997 commented 5 years ago

I'll try to build a version that installs on other IDEs. Meanwhile, could you try manually installing the plugin in you tool? The jar is available in the releases https://github.com/nokia/PyVenvManage/releases/tag/v1.1

I tested the jar on CLion 2019.1.2 (most up-to-date version) on Windows:

When doing the same tests with PyCharm everything works as expected... If I shall help you to find out why switching venv does not work please let me know what I can do...

andrask commented 5 years ago

@mrh1997 I finished the update and created a new release. As soon as the update is approved by Jetbrains, you'll be able to install the plugin in other IDEs. (Hopefully :) I tested as much as possible but there is no way to tell if it works completely until the release becomes available in your local environment.)

andrask commented 5 years ago

@mrh1997 The new version has been released a while ago. Have you been able to test it? I'd highly appreciate your feedback.

mrh1997 commented 5 years ago

I tested Version 1.2 right now:

Still the same problem in CLion. Can create virtual environments with the Plugin, but not change the current environment :-(

andrask commented 5 years ago

Hmm it may be because clion does not handle python projects the same way as pycharm. Actually, it does not realize the PYTHON_MODULE type

4:41 PM Unknown Module Type
                    Cannot determine module type ("PYTHON_MODULE") for the following module:"heat"
                    The module will be treated as a Unknown module.

I'll try to look at it but this is kind of a bug in the underlying platform that the same APIs do not work the same way in the different products.

But I'm happy that the issue is solved at least partially.