sarugaku / passa

Resolver implementation and toolset for generating and interacting with Pipfile and Pipfile.lock.
ISC License
53 stars 12 forks source link

Add prefix-comment option freeze command #37

Closed greysteil closed 1 year ago

greysteil commented 6 years ago

Allows a comment to be passed to the freeze command which is used to prefix the output requirements file.

Forgive me if I have mangled any Pythons in the writing of this PR - it's not my first language.

uranusjr commented 6 years ago

I agree a configurable prefix is desired, but not sure I want to expose this as an option 🤔 Probably better to do this with an environment variable instead, since the prefix probably would be platform-dependent and not changing between each call.

Something like os.environ.get('PASSA_FREEZE_FORMAT', '{lines}') maybe… I’ll need to ponder on this a bit.

greysteil commented 6 years ago

Interesting. I went for fully configurable because I wasn't sure whether your intention was for tools other than Pipenv to use Passa. If not then the text should be pretty constant - something like:

# This file is autogenerated by Pipenv.
# To update, run `pipenv lock -r`
#

Command would need to change depending on whether dev deps were being included, but that should be pretty easy.