Skip to content
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

How to set python path for Kover #53

Open
Morteza-M-Saber opened this issue Jul 3, 2020 · 3 comments
Open

How to set python path for Kover #53

Morteza-M-Saber opened this issue Jul 3, 2020 · 3 comments
Assignees

Comments

@Morteza-M-Saber
Copy link

We want to incorporate Kover in an environment fully working with python3 and we were wondering if there is any way to assign the path to python2.7 to be used by kover. Thanks for the great tool by the way.

@aldro61
Copy link
Owner

aldro61 commented Jul 5, 2020

Hi there!

As you said, Kover only works with Python 2.7 at the moment, but this is mostly due to minor incompatibility issues (e.g., using print without parenthesis). You have a few options:

  1. Get Kover to run in Python 3 by making modifications to the code and make a pull request (your contribution would be very appreciated)

  2. Use the docker image: obtain it by pulling docker pull https://hub.docker.com/r/aldro61/kover and then docker run [OPTIONS] aldro61/kover sh -c 'kover [COMMAND]'. This will run Kover inside the docker image (configured with Python 2.7) and output the result to your filesystem. You would need to add arguments to the docker run command to mount the appropriate directories (-v localpath:containerpath).

  3. Execute the command line interface with Python 2.7. By default, Kover will be run using your system's default python distribution (the one you see when running which python). Instead, you could install a separate Python 2.7 environment and use it's Python executable to run the command line interface, which is a normal Python file (https://github.com/aldro61/kover/blob/kover2/interfaces/command_line.py).

I hope this helps!

Alex

@aldro61
Copy link
Owner

aldro61 commented Jul 8, 2020

@Morteza-M-Saber if you're willing to wait a little bit, I can convert Kover to Python 3. That work is well overdue :)

@Morteza-M-Saber
Copy link
Author

@aldro61 Thanks Alexander. That would be great. I would also be so happy to contribute to this upgrade if you need an extra hand.

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

No branches or pull requests

2 participants