Skip to content

Commit

Permalink
fix: Install pip and pip-tools in upgrade script (#168)
Browse files Browse the repository at this point in the history
  • Loading branch information
edx-requirements-bot authored Jun 24, 2022
1 parent 6b38761 commit 6a07fd9
Show file tree
Hide file tree
Showing 11 changed files with 272 additions and 127 deletions.
13 changes: 11 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,19 @@ clean: ## delete generated byte code and coverage reports
coverage erase
rm -rf cover htmlcov

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 "$(@)"

export CUSTOM_COMPILE_COMMAND = make upgrade
upgrade: ## update the requirements/*.txt files with the latest packages satisfying requirements/*.in
pip3 install -q -r requirements/pip_tools.txt
upgrade: $(COMMON_CONSTRAINTS_TXT)
## update the requirements/*.txt files with the latest packages satisfying requirements/*.in
pip install -q -r requirements/pip_tools.txt
pip-compile --allow-unsafe --rebuild --upgrade -o requirements/pip.txt requirements/pip.in
pip-compile --rebuild --upgrade -o requirements/pip_tools.txt requirements/pip_tools.in
pip install -q -r requirements/pip.txt
pip install -q -r requirements/pip_tools.txt
pip-compile --upgrade -o requirements/tox.txt requirements/tox.in
pip-compile --upgrade -o requirements/base.txt requirements/base.in
pip-compile --upgrade -o requirements/test.txt requirements/test.in
Expand Down
59 changes: 39 additions & 20 deletions requirements/base.txt
Original file line number Diff line number Diff line change
@@ -1,55 +1,72 @@
#
# This file is autogenerated by pip-compile
# This file is autogenerated by pip-compile with python 3.8
# To update, run:
#
# make upgrade
#
amqp==2.6.1
# via kombu
asgiref==3.4.1
asgiref==3.5.2
# via django
async-timeout==4.0.2
# via redis
billiard==3.6.4.0
# via celery
celery==4.4.7
# via
# -c requirements/constraints.txt
# -r requirements/base.in
certifi==2021.5.30
certifi==2022.6.15
# via requests
charset-normalizer==2.0.6
cffi==1.15.0
# via pynacl
charset-normalizer==2.0.12
# via requests
django-crum==0.7.9
# via edx-django-utils
django-waffle==2.2.1
click==8.1.3
# via edx-django-utils
django==3.2.8
deprecated==1.2.13
# via redis
django==3.2.13
# via
# -c requirements/common_constraints.txt
# -c requirements/constraints.txt
# django-crum
# edx-django-utils
edx-django-utils==4.4.0
django-crum==0.7.9
# via edx-django-utils
django-waffle==2.5.0
# via edx-django-utils
edx-django-utils==5.0.0
# via edx-rest-api-client
edx-rest-api-client==5.4.0
edx-rest-api-client==5.5.0
# via -r requirements/base.in
idna==3.2
idna==3.3
# via requests
kombu==4.6.11
# via celery
newrelic==7.0.0.166
newrelic==7.12.0.176
# via edx-django-utils
pbr==5.6.0
packaging==21.3
# via redis
pbr==5.9.0
# via stevedore
psutil==5.8.0
psutil==5.9.1
# via edx-django-utils
pyjwt==2.2.0
pycparser==2.21
# via cffi
pyjwt==2.4.0
# via edx-rest-api-client
pytz==2021.3
pynacl==1.5.0
# via edx-django-utils
pyparsing==3.0.9
# via packaging
pytz==2022.1
# via
# celery
# django
redis==3.5.3
redis==4.3.3
# via -r requirements/base.in
requests==2.26.0
requests==2.28.0
# via
# edx-rest-api-client
# slumber
Expand All @@ -59,11 +76,13 @@ slumber==0.7.1
# via edx-rest-api-client
sqlparse==0.4.2
# via django
stevedore==3.4.0
stevedore==3.5.0
# via edx-django-utils
urllib3==1.26.7
urllib3==1.26.9
# via requests
vine==1.3.0
# via
# amqp
# celery
wrapt==1.14.1
# via deprecated
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
1 change: 1 addition & 0 deletions requirements/constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
# pin when possible. Writing an issue against the offending project and
# linking to it here is good.

-c common_constraints.txt
# These were previously pinned in ecommerce-worker, and will stay that way
# until we go through the process of relaxing them gradually.

Expand Down
4 changes: 2 additions & 2 deletions requirements/optional.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#
# This file is autogenerated by pip-compile
# This file is autogenerated by pip-compile with python 3.8
# To update, run:
#
# make upgrade
#
newrelic==7.0.0.166
newrelic==7.12.0.176
# via -r requirements/optional.in
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

16 changes: 16 additions & 0 deletions requirements/pip.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#
# 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==22.1.2
# via -r requirements/pip.in
setuptools==59.8.0
# via
# -c requirements/common_constraints.txt
# -r requirements/pip.in
12 changes: 6 additions & 6 deletions requirements/pip_tools.txt
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
#
# This file is autogenerated by pip-compile
# This file is autogenerated by pip-compile with python 3.8
# To update, run:
#
# make upgrade
#
click==8.0.1
click==8.1.3
# via pip-tools
pep517==0.11.0
pep517==0.12.0
# via pip-tools
pip-tools==6.3.0
pip-tools==6.6.2
# via -r requirements/pip_tools.in
tomli==1.2.1
tomli==2.0.1
# via pep517
wheel==0.37.0
wheel==0.37.1
# via pip-tools

# The following packages are considered to be unsafe in a requirements file:
Expand Down
79 changes: 58 additions & 21 deletions requirements/production.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# This file is autogenerated by pip-compile
# This file is autogenerated by pip-compile with python 3.8
# To update, run:
#
# make upgrade
Expand All @@ -8,10 +8,14 @@ amqp==2.6.1
# via
# -r requirements/base.txt
# kombu
asgiref==3.4.1
asgiref==3.5.2
# via
# -r requirements/base.txt
# django
async-timeout==4.0.2
# via
# -r requirements/base.txt
# redis
billiard==3.6.4.0
# via
# -r requirements/base.txt
Expand All @@ -20,68 +24,97 @@ celery==4.4.7
# via
# -c requirements/constraints.txt
# -r requirements/base.txt
certifi==2021.5.30
certifi==2022.6.15
# via
# -r requirements/base.txt
# requests
charset-normalizer==2.0.6
cffi==1.15.0
# via
# -r requirements/base.txt
# pynacl
charset-normalizer==2.0.12
# via
# -r requirements/base.txt
# requests
django-crum==0.7.9
click==8.1.3
# via
# -r requirements/base.txt
# edx-django-utils
django-waffle==2.2.1
deprecated==1.2.13
# via
# -r requirements/base.txt
# edx-django-utils
django==3.2.8
# redis
django==3.2.13
# via
# -c requirements/common_constraints.txt
# -c requirements/constraints.txt
# -r requirements/base.txt
# django-crum
# edx-django-utils
edx-django-utils==4.4.0
django-crum==0.7.9
# via
# -r requirements/base.txt
# edx-django-utils
django-waffle==2.5.0
# via
# -r requirements/base.txt
# edx-django-utils
edx-django-utils==5.0.0
# via
# -r requirements/base.txt
# edx-rest-api-client
edx-rest-api-client==5.4.0
edx-rest-api-client==5.5.0
# via -r requirements/base.txt
idna==3.2
idna==3.3
# via
# -r requirements/base.txt
# requests
kombu==4.6.11
# via
# -r requirements/base.txt
# celery
newrelic==7.0.0.166
newrelic==7.12.0.176
# via
# -r requirements/base.txt
# edx-django-utils
pbr==5.6.0
packaging==21.3
# via
# -r requirements/base.txt
# redis
pbr==5.9.0
# via
# -r requirements/base.txt
# stevedore
psutil==5.8.0
psutil==5.9.1
# via
# -r requirements/base.txt
# edx-django-utils
pyjwt==2.2.0
pycparser==2.21
# via
# -r requirements/base.txt
# cffi
pyjwt==2.4.0
# via
# -r requirements/base.txt
# edx-rest-api-client
pytz==2021.3
pynacl==1.5.0
# via
# -r requirements/base.txt
# edx-django-utils
pyparsing==3.0.9
# via
# -r requirements/base.txt
# packaging
pytz==2022.1
# via
# -r requirements/base.txt
# celery
# django
pyyaml==5.4.1
pyyaml==6.0
# via -r requirements/production.in
redis==3.5.3
redis==4.3.3
# via -r requirements/base.txt
requests==2.26.0
requests==2.28.0
# via
# -r requirements/base.txt
# edx-rest-api-client
Expand All @@ -96,11 +129,11 @@ sqlparse==0.4.2
# via
# -r requirements/base.txt
# django
stevedore==3.4.0
stevedore==3.5.0
# via
# -r requirements/base.txt
# edx-django-utils
urllib3==1.26.7
urllib3==1.26.9
# via
# -r requirements/base.txt
# requests
Expand All @@ -109,3 +142,7 @@ vine==1.3.0
# -r requirements/base.txt
# amqp
# celery
wrapt==1.14.1
# via
# -r requirements/base.txt
# deprecated
Loading

0 comments on commit 6a07fd9

Please sign in to comment.