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

show packages version with new switch: pipsi list --versions #78

Merged
merged 1 commit into from
Jun 25, 2017

Conversation

msztolcman
Copy link
Contributor

New switch for list command: --versions
Added versions to list of packages. Version is determined in time of install, and saved in venv_path/package_info.json

It's cause is that i don't know good method to determine package versions - i'm using result of pip freeze command, and I don't think calling and parsing it every pipsi list call is good enough.

def get_package_version(self, venv_path, package):
from subprocess import Popen, PIPE

args = [os.path.join(venv_path, BIN_DIR, 'pip'), 'freeze']
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

at first glance it seems possible that this one might break on windows

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why? It's used in the same way as in install:

args = [os.path.join(venv_path, BIN_DIR, 'pip'), 'install']

I have no easy way to test it on windows, but it should work fine.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indeed, my mistake, sorry for buzzing on that

@RonnyPfannschmidt
Copy link
Contributor

could you please try to accompany this one with a test, at first glance i like what i see,
its nice starting point for many more things to come (yay for per env metadata)

@msztolcman
Copy link
Contributor Author

Is there some special way to test pipsi? Tests included in testing directory fails, and I don't what convention should I follow.

@msztolcman
Copy link
Contributor Author

@RonnyPfannschmidt Is there anything about existing tests, how to run them etc? Or this tests doesn't work and I should create some from the scratch?

@RonnyPfannschmidt
Copy link
Contributor

@msztolcman atm i don't recall (i haven't touched the code/tests in a while and there is no travis setup)

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