From c3b24b9a530d7444d39152cc4562e77d987d56c3 Mon Sep 17 00:00:00 2001 From: Cosimo Lupo Date: Fri, 27 Nov 2020 15:51:18 +0000 Subject: [PATCH] Add requirements/ dir ... containing all top-level (*.in) and concrete requirements.txt, the latter parametrized by python version. We have a bunch of dependencies that are only needed on specific python versions (e.g. backports like dataclasses, importlib_resources, etc). We use conditional environment markers for those in the top-level requirements.in files. pip-compile does not yet support generating a combined requirements.txt file where differences across python versions/platforms/archs are reconciled using environmet markers: https://github.com/jazzband/pip-tools/issues/826 They currently recommend running pip-compile on each targeted python environment generating as many concrete requirements.txt files https://github.com/jazzband/pip-tools/pull/651 So this is what I have done here. --- dev-requirements.in | 11 -------- requirements/dev-requirements.in | 9 +++++++ requirements/install-requirements.in | 6 +++++ requirements/pythoh3.7-requirements.txt | 33 ++++++++++++++++++++++++ requirements/python3.6-requirements.txt | 34 +++++++++++++++++++++++++ requirements/python3.7-requirements.txt | 33 ++++++++++++++++++++++++ requirements/python3.8-requirements.txt | 31 ++++++++++++++++++++++ requirements/python3.9-requirements.txt | 25 ++++++++++++++++++ 8 files changed, 171 insertions(+), 11 deletions(-) delete mode 100644 dev-requirements.in create mode 100644 requirements/dev-requirements.in create mode 100644 requirements/install-requirements.in create mode 100644 requirements/pythoh3.7-requirements.txt create mode 100644 requirements/python3.6-requirements.txt create mode 100644 requirements/python3.7-requirements.txt create mode 100644 requirements/python3.8-requirements.txt create mode 100644 requirements/python3.9-requirements.txt diff --git a/dev-requirements.in b/dev-requirements.in deleted file mode 100644 index fd92443..0000000 --- a/dev-requirements.in +++ /dev/null @@ -1,11 +0,0 @@ -# This file only declares the top-level development requirements. -# Run `pip-compile --upgrade dev-requirements.in` to generate the dev-requirements.txt -# file, which is used to set up the CI environment. -# The pip-compile script is part of the pip-tools package: -# https://github.com/jazzband/pip-tools - -black -pytest -# As of November 2020, pytype requires: Python <3.9, >=3.6 -# https://pypi.org/project/pytype/2020.11.23 -pytype; python_version < '3.9' diff --git a/requirements/dev-requirements.in b/requirements/dev-requirements.in new file mode 100644 index 0000000..84715fe --- /dev/null +++ b/requirements/dev-requirements.in @@ -0,0 +1,9 @@ +# This file only declares the top-level development requirements. +# Run `pip-compile-all.sh` to generate the concrete py3*-requirements.txt +# files that are used to set up the tox and CI environments. + +black +pytest +# As of November 2020, pytype requires: Python <3.9, >=3.6 +# https://pypi.org/project/pytype/2020.11.23 +pytype; python_version < '3.9' diff --git a/requirements/install-requirements.in b/requirements/install-requirements.in new file mode 100644 index 0000000..c263826 --- /dev/null +++ b/requirements/install-requirements.in @@ -0,0 +1,6 @@ +# Only list here top-level runtime dependencies. +# Run `pip-compile-all.sh` to generate the concrete py3*-requirements.txt +# files that are used to set up the tox and CI environments. +dataclasses>=0.7; python_version < '3.7' +lxml>=4.0 +skia-pathops>=0.4.1 diff --git a/requirements/pythoh3.7-requirements.txt b/requirements/pythoh3.7-requirements.txt new file mode 100644 index 0000000..52bb2dc --- /dev/null +++ b/requirements/pythoh3.7-requirements.txt @@ -0,0 +1,33 @@ +# +# This file is autogenerated by pip-compile +# To update, run: +# +# pip-compile --output-file=requirements/py37-requirements.txt requirements/dev-requirements.in requirements/install-requirements.in +# +appdirs==1.4.4 # via black +attrs==20.3.0 # via pytest, pytype +black==20.8b1 # via -r requirements/dev-requirements.in +click==7.1.2 # via black +decorator==4.4.2 # via networkx +importlab==0.5.1 # via pytype +importlib-metadata==3.1.0 # via pluggy, pytest +iniconfig==1.1.1 # via pytest +lxml==4.6.2 # via -r requirements/install-requirements.in +mypy-extensions==0.4.3 # via black +networkx==2.5 # via importlab +ninja==1.10.0.post2 # via pytype +packaging==20.4 # via pytest +pathspec==0.8.1 # via black +pluggy==0.13.1 # via pytest +py==1.9.0 # via pytest +pyparsing==2.4.7 # via packaging +pytest==6.1.2 # via -r requirements/dev-requirements.in +pytype==2020.11.23 ; python_version < "3.9" # via -r requirements/dev-requirements.in +pyyaml==5.3.1 # via pytype +regex==2020.11.13 # via black +six==1.15.0 # via importlab, packaging, pytype +skia-pathops==0.5.1.post1 # via -r requirements/install-requirements.in +toml==0.10.2 # via black, pytest +typed-ast==1.4.1 # via black, pytype +typing-extensions==3.7.4.3 # via black +zipp==3.4.0 # via importlib-metadata diff --git a/requirements/python3.6-requirements.txt b/requirements/python3.6-requirements.txt new file mode 100644 index 0000000..0f15caa --- /dev/null +++ b/requirements/python3.6-requirements.txt @@ -0,0 +1,34 @@ +# +# This file is autogenerated by pip-compile +# To update, run: +# +# pip-compile --output-file=requirements/python3.6-requirements.txt requirements/dev-requirements.in requirements/install-requirements.in +# +appdirs==1.4.4 # via black +attrs==20.3.0 # via pytest, pytype +black==20.8b1 # via -r requirements/dev-requirements.in +click==7.1.2 # via black +dataclasses==0.8 ; python_version < "3.7" # via -r requirements/install-requirements.in, black +decorator==4.4.2 # via networkx +importlab==0.5.1 # via pytype +importlib-metadata==3.1.0 # via pluggy, pytest +iniconfig==1.1.1 # via pytest +lxml==4.6.2 # via -r requirements/install-requirements.in +mypy-extensions==0.4.3 # via black +networkx==2.5 # via importlab +ninja==1.10.0.post2 # via pytype +packaging==20.4 # via pytest +pathspec==0.8.1 # via black +pluggy==0.13.1 # via pytest +py==1.9.0 # via pytest +pyparsing==2.4.7 # via packaging +pytest==6.1.2 # via -r requirements/dev-requirements.in +pytype==2020.11.23 ; python_version < "3.9" # via -r requirements/dev-requirements.in +pyyaml==5.3.1 # via pytype +regex==2020.11.13 # via black +six==1.15.0 # via importlab, packaging, pytype +skia-pathops==0.5.1.post1 # via -r requirements/install-requirements.in +toml==0.10.2 # via black, pytest +typed-ast==1.4.1 # via black, pytype +typing-extensions==3.7.4.3 # via black +zipp==3.4.0 # via importlib-metadata diff --git a/requirements/python3.7-requirements.txt b/requirements/python3.7-requirements.txt new file mode 100644 index 0000000..17c1989 --- /dev/null +++ b/requirements/python3.7-requirements.txt @@ -0,0 +1,33 @@ +# +# This file is autogenerated by pip-compile +# To update, run: +# +# pip-compile --output-file=requirements/python3.7-requirements.txt requirements/dev-requirements.in requirements/install-requirements.in +# +appdirs==1.4.4 # via black +attrs==20.3.0 # via pytest, pytype +black==20.8b1 # via -r requirements/dev-requirements.in +click==7.1.2 # via black +decorator==4.4.2 # via networkx +importlab==0.5.1 # via pytype +importlib-metadata==3.1.0 # via pluggy, pytest +iniconfig==1.1.1 # via pytest +lxml==4.6.2 # via -r requirements/install-requirements.in +mypy-extensions==0.4.3 # via black +networkx==2.5 # via importlab +ninja==1.10.0.post2 # via pytype +packaging==20.4 # via pytest +pathspec==0.8.1 # via black +pluggy==0.13.1 # via pytest +py==1.9.0 # via pytest +pyparsing==2.4.7 # via packaging +pytest==6.1.2 # via -r requirements/dev-requirements.in +pytype==2020.11.23 ; python_version < "3.9" # via -r requirements/dev-requirements.in +pyyaml==5.3.1 # via pytype +regex==2020.11.13 # via black +six==1.15.0 # via importlab, packaging, pytype +skia-pathops==0.5.1.post1 # via -r requirements/install-requirements.in +toml==0.10.2 # via black, pytest +typed-ast==1.4.1 # via black, pytype +typing-extensions==3.7.4.3 # via black +zipp==3.4.0 # via importlib-metadata diff --git a/requirements/python3.8-requirements.txt b/requirements/python3.8-requirements.txt new file mode 100644 index 0000000..ca0381e --- /dev/null +++ b/requirements/python3.8-requirements.txt @@ -0,0 +1,31 @@ +# +# This file is autogenerated by pip-compile +# To update, run: +# +# pip-compile --output-file=requirements/python3.8-requirements.txt requirements/dev-requirements.in requirements/install-requirements.in +# +appdirs==1.4.4 # via black +attrs==20.3.0 # via pytest, pytype +black==20.8b1 # via -r requirements/dev-requirements.in +click==7.1.2 # via black +decorator==4.4.2 # via networkx +importlab==0.5.1 # via pytype +iniconfig==1.1.1 # via pytest +lxml==4.6.2 # via -r requirements/install-requirements.in +mypy-extensions==0.4.3 # via black +networkx==2.5 # via importlab +ninja==1.10.0.post2 # via pytype +packaging==20.4 # via pytest +pathspec==0.8.1 # via black +pluggy==0.13.1 # via pytest +py==1.9.0 # via pytest +pyparsing==2.4.7 # via packaging +pytest==6.1.2 # via -r requirements/dev-requirements.in +pytype==2020.11.23 ; python_version < "3.9" # via -r requirements/dev-requirements.in +pyyaml==5.3.1 # via pytype +regex==2020.11.13 # via black +six==1.15.0 # via importlab, packaging, pytype +skia-pathops==0.5.1.post1 # via -r requirements/install-requirements.in +toml==0.10.2 # via black, pytest +typed-ast==1.4.1 # via black, pytype +typing-extensions==3.7.4.3 # via black diff --git a/requirements/python3.9-requirements.txt b/requirements/python3.9-requirements.txt new file mode 100644 index 0000000..4a44d4a --- /dev/null +++ b/requirements/python3.9-requirements.txt @@ -0,0 +1,25 @@ +# +# This file is autogenerated by pip-compile +# To update, run: +# +# pip-compile --output-file=requirements/python3.9-requirements.txt requirements/dev-requirements.in requirements/install-requirements.in +# +appdirs==1.4.4 # via black +attrs==20.3.0 # via pytest +black==20.8b1 # via -r requirements/dev-requirements.in +click==7.1.2 # via black +iniconfig==1.1.1 # via pytest +lxml==4.6.2 # via -r requirements/install-requirements.in +mypy-extensions==0.4.3 # via black +packaging==20.4 # via pytest +pathspec==0.8.1 # via black +pluggy==0.13.1 # via pytest +py==1.9.0 # via pytest +pyparsing==2.4.7 # via packaging +pytest==6.1.2 # via -r requirements/dev-requirements.in +regex==2020.11.13 # via black +six==1.15.0 # via packaging +skia-pathops==0.5.1.post1 # via -r requirements/install-requirements.in +toml==0.10.2 # via black, pytest +typed-ast==1.4.1 # via black +typing-extensions==3.7.4.3 # via black