[Distutils] pipenv best practices?

Brett Cannon brett at python.org
Mon Jan 15 14:46:09 EST 2018


On Mon, 15 Jan 2018 at 00:33 Chris Withers <chris at withers.org> wrote:

> Hi All,
>
> Couldn't find an obviously better discussion forum than this for pipenv
> stuff, but please point me to where the rest of the discussions are
> happening...
>

Not here from what I can tell. :) Probably your best bet is to ask on the
pipenv GitHub project and file an issue so the pipenv docs can give you
guidance. I know for me personally it's getting a bit hazy between this
list and pypa-dev where stuff should go (I'm personally starting to shift
towards pypa-dev and considering this actually for distutils proper).

But I happen to know the answer to your pipenv questions, Chris, so I'll
answer them here.


>
> So, with pipenv, what files do we version control for a project? both
> Pipfile and Pipfile.lock?
>

Yes.


> Hopefully one I missed from the docs: with the correct files source
> controlled, how do I reproduce the environment on another machine?
>

pipenv install --ignore-pipfile



>
> Continuing on the deployment theme: I'm used to being able to put
> /path/to/some/ve/bin/some_script in crontabs and the like, where
> some_script comes form a setuptools entry point.
> What's the canonical way of doing this with pipenv?
>

Beats me. I think there's a command to get back to the venv that pipenv
created on your behalf.


>
> Last up, how should pipenv be used for library development? (ie: where
> dependencies and minimal constraints are expressed in setup.py and where
> you want to test against as many python versions and library
> combinations as you support).
>

That doesn't fall under pipenv's purview. Think of pipenv as trying to make
venv + pip easier to work with. Since you don't use pip to express
dependencies for your library then you shouldn't with pipenv either. Or put
another way, think of your pipfile as just a different format for a
requirements.txt file, not a replacement for flit or setuptools.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/distutils-sig/attachments/20180115/8056f99e/attachment.html>


More information about the Distutils-SIG mailing list