Skip to main content

dirty hack of pipenv

Project description

pipenv-d: A dirty hack of pipenv

pipenv-d is a dirty hack of pipenv.

TL;DR, I want this feature, so pipenv can support multiple platform-specific lock files.

Why? Because some of my colleagues are using x86_64 machine and some are using Apple silicon (such as m1). As a result, when some of them lock dependencies on one machine, high chances is that the lock file may not work on the others, especially for machine learning applications which heavily rely on extension modules (Cython, pybind11, Numba..etc) and are very platform-specific.

I am just so tired of fixing dependency issues for them. I NEED platform-specific lock file support ASAP.

Installation

  • via pip
$ python3 -m pip install pipenv-d

Usage

Simple, whenever you want to run pipenv in the console, replace it with pipenv-d.

pipenv-d works exactly the same as pipenv except that it will create platform-specific lock file in your project instead of single Pipfile.lock.

Demo

  • install packages in your project with pipenv-d install-packages

  • platform-specific lock file will be generated in .pipenv.d/ lock-files

  • To regenerate the virtual environment, simply run pipenv-d install again, just like what you would do with pipenv. reinstall shell

How it works?

Simple, everytime pipenv generate a Pipfile.lock, move it to .pipenv.d directory and give it a platform-specific name.

If any platform-specific-named lock file found in .pipenv.d when pipenv-d is executed, copy the content to Pipfile.lock in the working directory and invoke pipenv command afterward.

After pipenv exits, move Pipfile.lock back to .pipenv.d.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pipenv-d-0.0.4.tar.gz (3.0 kB view hashes)

Uploaded Source

Built Distribution

pipenv_d-0.0.4-py3-none-any.whl (3.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page