How to properly manage Pipfile.lock

311 Views Asked by At

This is my scenario:

  • I am using pipenv
  • I have private sources:
[[source]]
url = "http://devpi.mine/something/dev/+simple"
verify_ssl = false
name = "mysource"
  • I have different environments: dev for development, with a private devpi where packages are upload, and int / preprod / prod with a shared devpi.
  • Generating Pipfile.lock takes time (5min)

My problem: the Pipfile.lock that I am generating in dev is not usable in int, because the hashes do not match (different devpi)

Possible solutions:

  1. Generate Pipfile.lock.dev and Pipfile.lock.int, and manage that myself (symlinks or renaming the file): a bit cumbersome
  2. Generate Pipfile.lock as part of the release process: I don't like this because that means that Pipfile.lock is not used as reference, since each time it will be re-generated. Besides, this would slow down release.

Do you have any other idea how to manage different environments in the context of pipenv?

0

There are 0 best solutions below