From 5f0df6325812764ff93d0a724a366235644a405a Mon Sep 17 00:00:00 2001 From: Anderson Bravalheri Date: Mon, 18 Jun 2018 22:34:49 +0000 Subject: [PATCH] Add pip-tools related-files to the project We have to use a `requirements.in` just to proxy `setup.cfg`, since an error occurs when we rely on the implicit dependency (ref: https://github.com/jazzband/pip-tools/issues/572). This way abstracted requirements are expressed via `setup.cfg` while concrete dependencies are expressed via `requirements.txt`. Basic workflow: - Add abstract dependencies to `setup.cfg` - Proxy `setup.cfg` using `requirements.in` - Write dev dependencies to `dev-requirements.in` - Use `pip-compile --output-file (dev-)requirements.txt (dev-)requirements.in` to compile the concrete dependencies - Add the `requirements.{in,txt}` files to source control for repeatable installations: https://caremad.io/posts/2013/07/setup-vs-requirement/ - Use `pip-sync dev-requirements.txt requirements.txt` to install the packages into the current virtualenv - Run commands normally inside the current virtualenv (e.g. `tox`) - Don't expose test requirements directly to pip-tools. Instead, just rely on tox/pytest-runner to install them inside the test venv. --- dev-requirements.in | 2 ++ dev-requirements.txt | 18 ++++++++++++++++++ requirements.in | 1 + requirements.txt | 15 ++++++++------- 4 files changed, 29 insertions(+), 7 deletions(-) create mode 100644 dev-requirements.in create mode 100644 dev-requirements.txt create mode 100644 requirements.in diff --git a/dev-requirements.in b/dev-requirements.in new file mode 100644 index 0000000..e9c627b --- /dev/null +++ b/dev-requirements.in @@ -0,0 +1,2 @@ +tox +ptpython diff --git a/dev-requirements.txt b/dev-requirements.txt new file mode 100644 index 0000000..faa914a --- /dev/null +++ b/dev-requirements.txt @@ -0,0 +1,18 @@ +# +# This file is autogenerated by pip-compile +# To update, run: +# +# pip-compile --output-file dev-requirements.txt dev-requirements.in +# +docopt==0.6.2 # via ptpython +jedi==0.12.0 # via ptpython +parso==0.2.1 # via jedi +pluggy==0.6.0 # via tox +prompt-toolkit==1.0.15 # via ptpython +ptpython==0.41 +py==1.5.3 # via tox +pygments==2.2.0 # via ptpython +six==1.11.0 # via prompt-toolkit, tox +tox==3.0.0 +virtualenv==16.0.0 # via tox +wcwidth==0.1.7 # via prompt-toolkit diff --git a/requirements.in b/requirements.in new file mode 100644 index 0000000..d6e1198 --- /dev/null +++ b/requirements.in @@ -0,0 +1 @@ +-e . diff --git a/requirements.txt b/requirements.txt index 0d4ed0a..8a52e8f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,8 @@ -# Add your pinned requirements so that they can be easily installed with: -# pip install -r requirements.txt -# Remember to also add them in setup.cfg but unpinned. -# Example: -# numpy==1.13.3 -# scipy==1.0 - +# +# This file is autogenerated by pip-compile +# To update, run: +# +# pip-compile --output-file requirements.txt requirements.in +# +-e file:///home/ab17624-l/workspace/dummy-pipenv-example-for-pyscaffold +appdirs==1.4.3