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

fix: Install pip and pip-tools in upgrade script #94

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,20 @@ docs: ## generate Sphinx HTML documentation, including API docs
# 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/doc.txt requirements/doc.in
Expand Down
39 changes: 23 additions & 16 deletions requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,20 @@
#
amqp==5.1.1
# via kombu
asgiref==3.5.1
asgiref==3.5.2
# via django
billiard==3.6.4.0
# via celery
celery==5.2.6
celery==5.2.7
# via
# -c requirements/constraints.txt
# edx-celeryutils
certifi==2021.10.8
certifi==2022.6.15
# via requests
cffi==1.15.0
# via cryptography
# via
# cryptography
# pynacl
charset-normalizer==2.0.12
# via requests
click==8.1.3
Expand All @@ -27,6 +29,7 @@ click==8.1.3
# click-plugins
# click-repl
# code-annotations
# edx-django-utils
click-didyoumean==0.3.0
# via celery
click-plugins==1.1.1
Expand All @@ -41,7 +44,7 @@ coreschema==0.0.4
# via
# coreapi
# drf-yasg
cryptography==37.0.1
cryptography==37.0.2
# via pyjwt
django==3.2.13
# via
Expand Down Expand Up @@ -70,8 +73,10 @@ django-model-utils==4.2.0
# -r requirements/base.in
# edx-celeryutils
django-simple-history==3.0.0
# via -r requirements/base.in
django-waffle==2.4.1
# via
# -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt
# -r requirements/base.in
django-waffle==2.5.0
# via
# edx-django-utils
# edx-drf-extensions
Expand All @@ -92,7 +97,7 @@ edx-api-doc-tools==1.6.0
# via -r requirements/base.in
edx-celeryutils==1.2.1
# via -r requirements/base.in
edx-django-utils==4.6.0
edx-django-utils==5.0.0
# via
# -r requirements/base.in
# django-config-models
Expand All @@ -102,7 +107,7 @@ edx-drf-extensions==8.0.1
# via -r requirements/base.in
edx-opaque-keys==2.3.0
# via edx-drf-extensions
edx-toggles==4.3.1
edx-toggles==5.0.0
# via -r requirements/base.in
future==0.18.2
# via
Expand All @@ -124,29 +129,31 @@ kombu==5.2.4
# via celery
markupsafe==2.1.1
# via jinja2
newrelic==7.10.0.175
newrelic==7.12.0.176
# via edx-django-utils
packaging==21.3
# via drf-yasg
pbr==5.8.1
pbr==5.9.0
# via stevedore
prompt-toolkit==3.0.29
# via click-repl
psutil==5.9.0
psutil==5.9.1
# via edx-django-utils
pycparser==2.21
# via cffi
pycryptodomex==3.14.1
# via pyjwkest
pyjwkest==1.4.2
# via edx-drf-extensions
pyjwt[crypto]==2.3.0
pyjwt[crypto]==2.4.0
# via
# drf-jwt
# edx-drf-extensions
pymongo==3.12.3
# via edx-opaque-keys
pyparsing==3.0.8
pynacl==1.5.0
# via edx-django-utils
pyparsing==3.0.9
# via packaging
python-dateutil==2.8.2
# via edx-drf-extensions
Expand All @@ -159,7 +166,7 @@ pytz==2022.1
# djangorestframework
pyyaml==6.0
# via code-annotations
requests==2.27.1
requests==2.28.0
# via
# coreapi
# edx-drf-extensions
Expand All @@ -168,7 +175,7 @@ ruamel-yaml==0.17.21
# via drf-yasg
ruamel-yaml-clib==0.2.6
# via ruamel-yaml
semantic-version==2.9.0
semantic-version==2.10.0
# via edx-drf-extensions
six==1.16.0
# via
Expand Down
2 changes: 1 addition & 1 deletion requirements/celery50.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ amqp==5.1.1
# via kombu
billiard==3.6.4.0
# via celery
celery==5.2.6
celery==5.2.7
# via -r requirements/celery50.in
click==8.1.3
# via
Expand Down
10 changes: 5 additions & 5 deletions requirements/ci.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@
#
# 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 codecov
distlib==0.3.4
# via virtualenv
filelock==3.6.0
filelock==3.7.1
# via
# tox
# virtualenv
Expand All @@ -28,9 +28,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
Loading