Skip to content

dboyliao/pipenv-d

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages