Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Complete pip-tools setup #5486

Merged
merged 1 commit into from Feb 28, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Expand Up @@ -31,7 +31,7 @@ repos:
^docs/[^/]*\.svg$
- id: requirements-txt-fixer
exclude: >-
^requirements/dev.txt$
^requirements/(cython|dev|doc-spelling|lint).txt$
- id: trailing-whitespace
- id: file-contents-sorter
files: |
Expand Down
1 change: 1 addition & 0 deletions CHANGES/5470.bugfix
@@ -0,0 +1 @@
Complete pip-tools setup.
Copy link
Member

@webknjaz webknjaz Feb 28, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Urgh... This is not a bugfix but a misc change because it's not a user-facing fix but something that would only affect the core devs and contributors.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, my bad!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not a big deal, I guess this can be fixed by a follow-up PR with git mv.

18 changes: 10 additions & 8 deletions Makefile
Expand Up @@ -9,6 +9,9 @@ CS := $(wildcard aiohttp/*.c)
PYS := $(wildcard aiohttp/*.py)
REQS := $(wildcard requirements/*.txt)
ALLS := $(sort $(CYS) $(CS) $(PYS) $(REQS))
IN := doc-spelling lint cython dev
REQIN := $(foreach fname,$(IN),requirements/$(fname).in)


.PHONY: all
all: test
Expand Down Expand Up @@ -45,9 +48,11 @@ endif
# Enumerate intermediate files to don't remove them automatically.
.SECONDARY: $(call to-hash,$(ALLS))

.update-pip:
@pip install -U 'pip'

.install-cython: $(call to-hash,requirements/cython.txt)
pip install -r requirements/cython.txt
.install-cython: .update-pip $(call to-hash,requirements/cython.txt)
@pip install -r requirements/cython.txt
@touch .install-cython

aiohttp/_find_header.c: $(call to-hash,aiohttp/hdrs.py ./tools/gen.py)
Expand All @@ -62,7 +67,7 @@ aiohttp/%.c: aiohttp/%.pyx $(call to-hash,$(CYS)) aiohttp/_find_header.c
cythonize: .install-cython $(PYXS:.pyx=.c)

.install-deps: .install-cython $(PYXS:.pyx=.c) $(call to-hash,$(CYS) $(REQS))
pip install -r requirements/dev.txt
@pip install -r requirements/dev.txt
@touch .install-deps

.PHONY: lint
Expand Down Expand Up @@ -135,17 +140,14 @@ doc:
doc-spelling:
@make -C docs spelling SPHINXOPTS="-W -E"

.update-pip:
@pip install -U 'pip'

.PHONY: compile-deps
compile-deps: .update-pip
@pip install pip-tools
@pip-compile --allow-unsafe -q requirements/dev.in
@$(foreach fname,$(REQIN),pip-compile --allow-unsafe -q $(fname);)

.PHONY: install
install: .update-pip
@pip install -r requirements/dev.in -c requirements/dev.txt
@pip install -r requirements/dev.txt

.PHONY: install-dev
install-dev: .develop
3 changes: 3 additions & 0 deletions requirements/cython.in
@@ -0,0 +1,3 @@
-r multidict.txt
cython==0.29.21
typing_extensions==3.7.4.3 # required for parsing aiohttp/hdrs.py by tools/gen.py
13 changes: 11 additions & 2 deletions requirements/cython.txt
@@ -1,3 +1,12 @@
-r multidict.txt
#
# This file is autogenerated by pip-compile
# To update, run:
#
# pip-compile --allow-unsafe requirements/cython.in
#
cython==0.29.21
typing_extensions==3.7.4.3 # required for parsing aiohttp/hdrs.py by tools/gen.py
webknjaz marked this conversation as resolved.
Show resolved Hide resolved
# via -r requirements/cython.in
multidict==5.1.0
# via -r requirements/multidict.txt
typing_extensions==3.7.4.3
# via -r requirements/cython.in
77 changes: 58 additions & 19 deletions requirements/dev.txt
Expand Up @@ -14,12 +14,14 @@ alabaster==0.7.12
# via sphinx
appdirs==1.4.4
# via
# -r requirements/lint.txt
# black
# virtualenv
async-timeout==4.0.0a3
# via -r requirements/base.txt
attrs==20.3.0
# via
# -r requirements/lint.txt
# flake8-pyi
# pytest
babel==2.9.0
Expand All @@ -41,7 +43,9 @@ cffi==1.14.4
# cryptography
# pycares
cfgv==3.2.0
# via pre-commit
# via
# -r requirements/lint.txt
# pre-commit
chardet==4.0.0
# via
# -r requirements/base.txt
Expand All @@ -50,6 +54,7 @@ cherry_picker==1.3.2 ; python_version >= "3.6"
# via -r requirements/dev.in
click==7.1.2
# via
# -r requirements/lint.txt
# black
# cherry-picker
# towncrier
Expand All @@ -62,11 +67,15 @@ cryptography==3.3.1
# pyjwt
# trustme
distlib==0.3.1
# via virtualenv
# via
# -r requirements/lint.txt
# virtualenv
docutils==0.16
# via sphinx
filelock==3.0.12
# via virtualenv
# via
# -r requirements/lint.txt
# virtualenv
flake8-pyi==20.10.0
# via -r requirements/lint.txt
flake8==3.8.4
Expand All @@ -85,8 +94,10 @@ gidgethub==5.0.0
# via cherry-picker
gunicorn==20.0.4
# via -r requirements/base.txt
identify==1.5.12
# via pre-commit
identify==1.5.14
# via
# -r requirements/lint.txt
# pre-commit
idna==2.10
# via
# requests
Expand All @@ -97,7 +108,9 @@ imagesize==1.2.0
incremental==17.5.0
# via towncrier
iniconfig==1.1.1
# via pytest
# via
# -r requirements/lint.txt
# pytest
isort==5.7.0
# via -r requirements/lint.txt
jinja2==2.11.2
Expand All @@ -107,13 +120,16 @@ jinja2==2.11.2
markupsafe==1.1.1
# via jinja2
mccabe==0.6.1
# via flake8
# via
# -r requirements/lint.txt
# flake8
multidict==5.1.0
# via
# -r requirements/multidict.txt
# yarl
mypy-extensions==0.4.3 ; implementation_name == "cpython"
# via
# -r requirements/lint.txt
# -r requirements/test.txt
# black
# mypy
Expand All @@ -122,29 +138,41 @@ mypy==0.790 ; implementation_name == "cpython"
# -r requirements/lint.txt
# -r requirements/test.txt
nodeenv==1.5.0
# via pre-commit
packaging==20.8
# via
# -r requirements/lint.txt
# pre-commit
packaging==20.9
# via
# -r requirements/lint.txt
# pytest
# sphinx
pathspec==0.8.1
# via black
# via
# -r requirements/lint.txt
# black
pillow==8.1.0
# via blockdiag
pluggy==0.13.1
# via pytest
# via
# -r requirements/lint.txt
# pytest
pre-commit==2.9.3
# via -r requirements/lint.txt
py==1.10.0
# via pytest
# via
# -r requirements/lint.txt
# pytest
pycares==3.1.1
# via aiodns
pycodestyle==2.6.0
# via flake8
# via
# -r requirements/lint.txt
# flake8
pycparser==2.20
# via cffi
pyflakes==2.2.0
# via
# -r requirements/lint.txt
# flake8
# flake8-pyi
pygments==2.8.0
Expand All @@ -154,7 +182,9 @@ pygments==2.8.0
pyjwt[crypto]==2.0.0
# via gidgethub
pyparsing==2.4.7
# via packaging
# via
# -r requirements/lint.txt
# packaging
pytest-cov==2.11.1
# via -r requirements/test.txt
pytest-mock==3.5.1
Expand All @@ -169,12 +199,15 @@ python-dateutil==2.8.1
# via freezegun
pytz==2020.5
# via babel
pyyaml==5.3.1
# via pre-commit
pyyaml==5.4.1
# via
# -r requirements/lint.txt
# pre-commit
re-assert==1.1.0
# via -r requirements/test.txt
regex==2020.11.13
# via
# -r requirements/lint.txt
# black
# re-assert
requests==2.25.1
Expand All @@ -185,12 +218,13 @@ setuptools-git==1.2
# via -r requirements/test.txt
six==1.15.0
# via
# -r requirements/lint.txt
# cryptography
# python-dateutil
# virtualenv
snowballstemmer==2.0.0
# via sphinx
sphinx==3.5.0
sphinx==3.5.1
# via
# -r requirements/doc.txt
# sphinxcontrib-asyncio
Expand All @@ -213,6 +247,7 @@ sphinxcontrib-serializinghtml==1.1.4
# via sphinx
toml==0.10.2
# via
# -r requirements/lint.txt
# black
# cherry-picker
# pre-commit
Expand All @@ -224,20 +259,24 @@ trustme==0.7.0 ; platform_machine != "i686"
# via -r requirements/test.txt
typed-ast==1.4.2
# via
# -r requirements/lint.txt
# black
# mypy
typing-extensions==3.7.4.3
# via
# -r requirements/base.txt
# -r requirements/lint.txt
# async-timeout
# black
# mypy
uritemplate==3.0.1
# via gidgethub
urllib3==1.26.2
# via requests
virtualenv==20.3.1
# via pre-commit
virtualenv==20.4.2
# via
# -r requirements/lint.txt
# pre-commit
webcolors==1.11.1
# via blockdiag
yarl==1.6.3
Expand Down
2 changes: 2 additions & 0 deletions requirements/doc-spelling.in
@@ -0,0 +1,2 @@
-r doc.txt
sphinxcontrib-spelling==7.1.0; platform_system!="Windows" # We only use it in Travis CI