From 4ebd01233e39c97c74925f902008af7f37bc04f3 Mon Sep 17 00:00:00 2001 From: Viacheslav Greshilov Date: Sat, 20 Feb 2021 22:12:14 +0200 Subject: [PATCH] Use pip-sync tool by default. --- .gitignore | 2 +- CHANGES/5470.bugfix | 1 + Makefile | 26 ++++++++++++-------------- requirements/cython.txt | 3 +-- requirements/dev.txt | 2 +- 5 files changed, 16 insertions(+), 18 deletions(-) create mode 100644 CHANGES/5470.bugfix diff --git a/.gitignore b/.gitignore index 8556509c6f7..1a3ce62a45c 100644 --- a/.gitignore +++ b/.gitignore @@ -22,7 +22,7 @@ .gitconfig .hash .idea -.install-cython +.install-pip-tools .install-deps .installed.cfg .mypy_cache diff --git a/CHANGES/5470.bugfix b/CHANGES/5470.bugfix new file mode 100644 index 00000000000..52751d68a45 --- /dev/null +++ b/CHANGES/5470.bugfix @@ -0,0 +1 @@ +Use the same command for dependencies installation in Makefile. Use pip-sync tool by default. diff --git a/Makefile b/Makefile index 12572c65042..4e3be6beef5 100644 --- a/Makefile +++ b/Makefile @@ -46,10 +46,6 @@ endif .SECONDARY: $(call to-hash,$(ALLS)) -.install-cython: $(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) ./tools/gen.py @@ -57,14 +53,17 @@ aiohttp/_find_header.c: $(call to-hash,aiohttp/hdrs.py ./tools/gen.py) aiohttp/%.c: aiohttp/%.pyx $(call to-hash,$(CYS)) aiohttp/_find_header.c cython -3 -o $@ $< -I aiohttp +.install-pip-tools: + @pip install pip-tools + @touch .install-pip-tools -.PHONY: cythonize -cythonize: .install-cython $(PYXS:.pyx=.c) - -.install-deps: .install-cython $(PYXS:.pyx=.c) $(call to-hash,$(CYS) $(REQS)) - pip install -r requirements/dev.txt +.install-deps: .install-pip-tools $(call to-hash,$(REQS)) + @pip-sync requirements/dev.txt requirements/cython.txt @touch .install-deps +.PHONY: cythonize +cythonize: .install-deps $(PYXS:.pyx=.c) $(call to-hash,$(CYS)) + .PHONY: lint lint: fmt mypy @@ -77,7 +76,7 @@ mypy: mypy .develop: .install-deps $(call to-hash,$(PYS) $(CYS) $(CS)) - pip install -e . + @pip install -e . @touch .develop .PHONY: test @@ -124,7 +123,7 @@ clean: @rm -f .flake @rm -rf aiohttp.egg-info @rm -f .install-deps - @rm -f .install-cython + @rm -f .install-pip-tools .PHONY: doc doc: @@ -139,13 +138,12 @@ doc-spelling: @pip install -U 'pip' .PHONY: compile-deps -compile-deps: .update-pip - @pip install pip-tools +compile-deps: .update-pip .install-pip-tools @pip-compile --allow-unsafe -q requirements/dev.in .PHONY: install install: .update-pip - @pip install -r requirements/dev.in -c requirements/dev.txt + @pip-sync requirements/dev.txt .PHONY: install-dev install-dev: .develop diff --git a/requirements/cython.txt b/requirements/cython.txt index 2d3627402e8..d766a11afdb 100644 --- a/requirements/cython.txt +++ b/requirements/cython.txt @@ -1,3 +1,2 @@ --r multidict.txt +-c dev.txt cython==0.29.21 -typing_extensions==3.7.4.3 # required for parsing aiohttp/hdrs.py by tools/gen.py diff --git a/requirements/dev.txt b/requirements/dev.txt index 32da97b0adb..a6855b967d1 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -190,7 +190,7 @@ six==1.15.0 # virtualenv snowballstemmer==2.0.0 # via sphinx -sphinx==3.5.0 +sphinx==3.5.1 # via # -r requirements/doc.txt # sphinxcontrib-asyncio