Pipenv: Setup.py vs Pipfile

Created on 25 Sep 2017  路  8Comments  路  Source: pypa/pipenv

My current strategy is to add my requirements (generally pinned) to setup.py and then have a requirements.txt file that specifies particular versions.

The workflow I've migrated to is: pipenv install "-e ." and pipenv install "-e .[test]" --dev. Looking at requests's Pipfile this seems to be the same approach, with a couple caveats / notes:

  1. the dev dependencies contains more installation requirements than requests[text]. This is probably fine, as I assume it means you want even more packages installed when developing requests(?).
  2. your dependencies are "-e ." = {extras = ["socks"]}. This appears to be handcoded, as my output looks like: "e1839a8" = {path = ".", editable = true}. Is the first approach better? I.e. should I be manually adding "-e ." = {} to my dependencies?

Most helpful comment

Can you help me understand what "e1839a8" means? At first glance it looks like the short hash of something. But I'm not sure what.

All 8 comments

no, your approach is fine. you can add extras if you want.

looks like we have a bug when using the "e1839a8" = {path = ".", editable = true, extras=['anything']} syntax.

Fixed the bug

I've updated requests to use the proper and updated syntax.

Make sure you're using latest though!

Can you help me understand what "e1839a8" means? At first glance it looks like the short hash of something. But I'm not sure what.

it's a short hash of the path you provided. we have to call it something. you can call it whatever you want, though.

it's effectively nice filler content, that ensures no collisions.

Was this page helpful?
0 / 5 - 0 ratings