Skip to content

Commit

Permalink
fix: Install pip and pip-tools in upgrade script (#102)
Browse files Browse the repository at this point in the history
  • Loading branch information
edx-requirements-bot authored Jul 29, 2022
1 parent aea42a5 commit 4316b91
Show file tree
Hide file tree
Showing 10 changed files with 91 additions and 38 deletions.
11 changes: 10 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,20 @@ install: clean ## install the package to the active Python's site-packages
# Define PIP_COMPILE_OPTS=-v to get more information during make upgrade.
PIP_COMPILE = pip-compile --rebuild --upgrade $(PIP_COMPILE_OPTS)

COMMON_CONSTRAINTS_TXT=requirements/common_constraints.txt
.PHONY: $(COMMON_CONSTRAINTS_TXT)
$(COMMON_CONSTRAINTS_TXT):
wget -O "$(@)" https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt || touch "$(@)"

upgrade: export CUSTOM_COMPILE_COMMAND=make upgrade
upgrade: ## update the requirements/*.txt files with the latest packages satisfying requirements/*.in
upgrade: $(COMMON_CONSTRAINTS_TXT)
## update the requirements/*.txt files with the latest packages satisfying requirements/*.in
pip install -qr requirements/pip-tools.txt
# Make sure to compile files after any other files they include!
$(PIP_COMPILE) --allow-unsafe -o requirements/pip.txt requirements/pip.in
$(PIP_COMPILE) -o requirements/pip-tools.txt requirements/pip-tools.in
pip install -qr requirements/pip.txt
pip install -qr requirements/pip-tools.txt
$(PIP_COMPILE) -o requirements/base.txt requirements/base.in
$(PIP_COMPILE) -o requirements/test.txt requirements/test.in
$(PIP_COMPILE) -o requirements/quality.txt requirements/quality.in
Expand Down
6 changes: 3 additions & 3 deletions requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
#
# make upgrade
#
certifi==2021.10.8
certifi==2022.6.15
# via requests
charset-normalizer==2.0.12
# via requests
idna==3.3
# via requests
lxml==4.8.0
lxml==4.9.0
# via -r requirements/base.in
requests==2.27.1
requests==2.28.0
# via -r requirements/base.in
urllib3==1.26.9
# via requests
Expand Down
10 changes: 5 additions & 5 deletions requirements/ci.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@
#
# make upgrade
#
certifi==2021.10.8
certifi==2022.6.15
# via requests
charset-normalizer==2.0.12
# via requests
codecov==2.1.12
# via -r requirements/ci.in
coverage==6.3.2
coverage==6.4.1
# via
# -r requirements/ci.in
# codecov
distlib==0.3.4
# via virtualenv
filelock==3.6.0
filelock==3.7.1
# via
# tox
# virtualenv
Expand All @@ -30,9 +30,9 @@ pluggy==1.0.0
# via tox
py==1.11.0
# via tox
pyparsing==3.0.8
pyparsing==3.0.9
# via packaging
requests==2.27.1
requests==2.28.0
# via codecov
six==1.16.0
# via
Expand Down
25 changes: 25 additions & 0 deletions requirements/common_constraints.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# A central location for most common version constraints
# (across edx repos) for pip-installation.
#
# Similar to other constraint files this file doesn't install any packages.
# It specifies version constraints that will be applied if a package is needed.
# When pinning something here, please provide an explanation of why it is a good
# idea to pin this package across all edx repos, Ideally, link to other information
# that will help people in the future to remove the pin when possible.
# Writing an issue against the offending project and linking to it here is good.
#
# Note: Changes to this file will automatically be used by other repos, referencing
# this file from Github directly. It does not require packaging in edx-lint.


# using LTS django version
Django<4.0

# elasticsearch>=7.14.0 includes breaking changes in it which caused issues in discovery upgrade process.
# elastic search changelog: https://www.elastic.co/guide/en/enterprise-search/master/release-notes-7.14.0.html
elasticsearch<7.14.0

setuptools<60

# django-simple-history>3.0.0 adds indexing and causes a lot of migrations to be affected
django-simple-history==3.0.0
30 changes: 15 additions & 15 deletions requirements/dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ bleach==5.0.0
# via readme-renderer
bump2version==1.0.1
# via -r requirements/dev.in
certifi==2021.10.8
certifi==2022.6.15
# via
# -r requirements/ci.txt
# -r requirements/quality.txt
Expand All @@ -24,7 +24,7 @@ charset-normalizer==2.0.12
# -r requirements/ci.txt
# -r requirements/quality.txt
# requests
click==8.1.2
click==8.1.3
# via
# -r requirements/pip-tools.txt
# -r requirements/quality.txt
Expand All @@ -34,7 +34,7 @@ codecov==2.1.12
# via -r requirements/ci.txt
commonmark==0.9.1
# via rich
coverage[toml]==6.3.2
coverage[toml]==6.4.1
# via
# -r requirements/ci.txt
# -r requirements/quality.txt
Expand All @@ -46,7 +46,7 @@ distlib==0.3.4
# virtualenv
docutils==0.18.1
# via readme-renderer
filelock==3.6.0
filelock==3.7.1
# via
# -r requirements/ci.txt
# tox
Expand All @@ -58,17 +58,17 @@ idna==3.3
# -r requirements/ci.txt
# -r requirements/quality.txt
# requests
importlib-metadata==4.11.3
importlib-metadata==4.11.4
# via
# keyring
# twine
iniconfig==1.1.1
# via
# -r requirements/quality.txt
# pytest
keyring==23.5.0
keyring==23.6.0
# via twine
lxml==4.8.0
lxml==4.9.0
# via -r requirements/quality.txt
mccabe==0.6.1
# via
Expand All @@ -92,9 +92,9 @@ pep517==0.12.0
# via
# -r requirements/pip-tools.txt
# pip-tools
pip-tools==6.6.0
pip-tools==6.6.2
# via -r requirements/pip-tools.txt
pkginfo==1.8.2
pkginfo==1.8.3
# via twine
platformdirs==2.5.2
# via
Expand Down Expand Up @@ -122,16 +122,16 @@ pyflakes==2.4.0
# via
# -r requirements/quality.txt
# flake8
pygments==2.11.2
pygments==2.12.0
# via
# readme-renderer
# rich
pyparsing==3.0.8
pyparsing==3.0.9
# via
# -r requirements/ci.txt
# -r requirements/quality.txt
# packaging
pytest==7.1.1
pytest==7.1.2
# via
# -r requirements/quality.txt
# pytest-cov
Expand All @@ -142,7 +142,7 @@ pytest-mock==3.7.0
# via -r requirements/quality.txt
readme-renderer==35.0
# via twine
requests==2.27.1
requests==2.28.0
# via
# -r requirements/ci.txt
# -r requirements/quality.txt
Expand All @@ -153,7 +153,7 @@ requests-toolbelt==0.9.1
# via twine
rfc3986==2.0.0
# via twine
rich==12.2.0
rich==12.4.4
# via twine
six==1.16.0
# via
Expand All @@ -175,7 +175,7 @@ tomli==2.0.1
# pytest
tox==3.25.0
# via -r requirements/ci.txt
twine==4.0.0
twine==4.0.1
# via -r requirements/dev.in
typing-extensions==4.2.0
# via
Expand Down
2 changes: 1 addition & 1 deletion requirements/pip-tools.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
# make upgrade
#
click==8.1.2
click==8.1.3
# via pip-tools
pep517==0.12.0
# via pip-tools
Expand Down
7 changes: 7 additions & 0 deletions requirements/pip.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
-c constraints.txt
# Core dependencies for installing other packages

pip
setuptools
wheel

12 changes: 12 additions & 0 deletions requirements/pip.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#
# This file is autogenerated by pip-compile with python 3.8
# To update, run:
#
# make upgrade
#
wheel==0.37.1
# via -r requirements/pip.in

# The following packages are considered to be unsafe in a requirements file:
# pip
# setuptools
14 changes: 7 additions & 7 deletions requirements/quality.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@ attrs==21.4.0
# pytest
black==22.3.0
# via -r requirements/quality.in
certifi==2021.10.8
certifi==2022.6.15
# via
# -r requirements/test.txt
# requests
charset-normalizer==2.0.12
# via
# -r requirements/test.txt
# requests
click==8.1.2
click==8.1.3
# via black
coverage[toml]==6.3.2
coverage[toml]==6.4.1
# via
# -r requirements/test.txt
# pytest-cov
Expand All @@ -34,7 +34,7 @@ iniconfig==1.1.1
# via
# -r requirements/test.txt
# pytest
lxml==4.8.0
lxml==4.9.0
# via -r requirements/test.txt
mccabe==0.6.1
# via flake8
Expand All @@ -60,11 +60,11 @@ pycodestyle==2.8.0
# via flake8
pyflakes==2.4.0
# via flake8
pyparsing==3.0.8
pyparsing==3.0.9
# via
# -r requirements/test.txt
# packaging
pytest==7.1.1
pytest==7.1.2
# via
# -r requirements/test.txt
# pytest-cov
Expand All @@ -73,7 +73,7 @@ pytest-cov==3.0.0
# via -r requirements/test.txt
pytest-mock==3.7.0
# via -r requirements/test.txt
requests==2.27.1
requests==2.28.0
# via -r requirements/test.txt
tomli==2.0.1
# via
Expand Down
12 changes: 6 additions & 6 deletions requirements/test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
#
attrs==21.4.0
# via pytest
certifi==2021.10.8
certifi==2022.6.15
# via
# -r requirements/base.txt
# requests
charset-normalizer==2.0.12
# via
# -r requirements/base.txt
# requests
coverage[toml]==6.3.2
coverage[toml]==6.4.1
# via
# -r requirements/test.in
# pytest-cov
Expand All @@ -24,17 +24,17 @@ idna==3.3
# requests
iniconfig==1.1.1
# via pytest
lxml==4.8.0
lxml==4.9.0
# via -r requirements/base.txt
packaging==21.3
# via pytest
pluggy==1.0.0
# via pytest
py==1.11.0
# via pytest
pyparsing==3.0.8
pyparsing==3.0.9
# via packaging
pytest==7.1.1
pytest==7.1.2
# via
# -r requirements/test.in
# pytest-cov
Expand All @@ -43,7 +43,7 @@ pytest-cov==3.0.0
# via -r requirements/test.in
pytest-mock==3.7.0
# via -r requirements/test.in
requests==2.27.1
requests==2.28.0
# via -r requirements/base.txt
tomli==2.0.1
# via
Expand Down

0 comments on commit 4316b91

Please sign in to comment.