Speaker
Kenneth Reitz
Material
Note
- Packaging History
- unzip and install from
setup.py
easy_install
pip
,virtualenv
,requirements.txt
- unzip and install from
- Python has no lock files!
- Pipenv
- Pipfile
- TOML: easy to read/ write manually
- Two groups:
[package]
,[dev-package]
- Pipfile.lock
- JSON: machine readable
- transitive dependencies pinned with all acceptable hashes for each releases
- Two groups:
default
,develop
- Install packages concurrently
- Support multiple source
pipenv --venv
: show you the venv createdpipenv --graph
: show dependency treepipenv check
: check the vulnerability of packages- e.g.,
pipenv install django==1.4.2
- e.g.,
pipenv install --deploy
pipenv install --ignore-pipfile
pipenv --python <version>
: automatically install certain python version if you have pyenv installedpipenv lock -r
: generaterequirements.txt
- We should put the lock file on source control.
pipenv uninstall
uninstall only the package.pipenv sync
is needed to uninstall all its transitive dependencies.- Pipenv finds created venv through path of the directory. Thus, if you move the directory, you'll have to create a new virtual environment.
- Pipenv won't be a replacement for
setup.py
- Pipenv is for application.
setup.py
is for lib.
- Pipfile