rbanffy/pip-chill

pip-chill should not be shown in the list

cjerrington opened this issue · 5 comments

Environment

  • PIP Chill version:1.0.0
  • Python version: 3.8,6
  • Operating System: Windows 10 Pro X64

Description

According to the main line "Make requirements with only the packages you need" pip-chill should not be listed when running pip-chill to not bloat the requirements.txt with this module. It is not needed in the virtual environment except to list the parent modules needed to install.

What I Did

pip-chill > .\requirements.txt

Still shows pip-chill==1.0.0 in the output. I have to install pip-chill in the virtual environment then I get the packages for the virtual environment I'm working in. If I install it globally and activate the virtual environment and run pip-chill I get the packages in the global environment.

Would this be added to the ignored_packages?

if show_all:
        ignored_packages = ()
    else:
        ignored_packages = {"pip", "wheel", "setuptools", "pkg-resources", "pip-chill"}

i added a PR so this was possible as an option ...
#31

I'm not saying that this feature isn't a good idea, but here's how I've gotten around this situation in the past:

$ pip-chill | grep --invert-match pip-chill

Which will return all packages your environment requires that is not pip-chill

I'm not saying that this feature isn't a good idea, but here's how I've gotten around this situation in the past:

$ pip-chill | grep --invert-match pip-chill

Which will return all packages your environment requires that is not pip-chill

Indeed grep is handy on Unix devices...

Findstr exists on Windows but is much lesser known. ( Actually I didn't know until I just now searched 'grep for Windows :-P )