Merge pull request #18406 from edx/jmbowman/TE-2593
TE-2593 Make pip-compile output whitespace consistent
This commit is contained in:
17
Makefile
17
Makefile
@@ -38,17 +38,18 @@ pull_translations: ## pull translations from Transifex
|
||||
requirements: ## install development environment requirements
|
||||
pip install -qr requirements/edx/development.txt --exists-action w
|
||||
|
||||
upgrade: export CUSTOM_COMPILE_COMMAND=make upgrade
|
||||
upgrade: ## update the pip requirements files to use the latest releases satisfying our constraints
|
||||
pip install -qr requirements/edx/pip-tools.txt
|
||||
# Make sure to compile files after any other files they include!
|
||||
pip-compile --upgrade -o requirements/edx/pip-tools.txt requirements/edx/pip-tools.in
|
||||
pip-compile --upgrade -o requirements/edx/coverage.txt requirements/edx/coverage.in
|
||||
pip-compile --upgrade -o requirements/edx/paver.txt requirements/edx/paver.in
|
||||
pip-compile --upgrade -o requirements/edx-sandbox/shared.txt requirements/edx-sandbox/shared.in
|
||||
pip-compile --upgrade -o requirements/edx-sandbox/base.txt requirements/edx-sandbox/base.in
|
||||
pip-compile --upgrade -o requirements/edx/base.txt requirements/edx/base.in
|
||||
pip-compile --upgrade -o requirements/edx/testing.txt requirements/edx/testing.in
|
||||
pip-compile --upgrade -o requirements/edx/development.txt requirements/edx/development.in
|
||||
pip-compile --no-emit-trusted-host --no-index --upgrade -o requirements/edx/pip-tools.txt requirements/edx/pip-tools.in
|
||||
pip-compile --no-emit-trusted-host --no-index --upgrade -o requirements/edx/coverage.txt requirements/edx/coverage.in
|
||||
pip-compile --no-emit-trusted-host --no-index --upgrade -o requirements/edx/paver.txt requirements/edx/paver.in
|
||||
pip-compile --no-emit-trusted-host --no-index --upgrade -o requirements/edx-sandbox/shared.txt requirements/edx-sandbox/shared.in
|
||||
pip-compile --no-emit-trusted-host --no-index --upgrade -o requirements/edx-sandbox/base.txt requirements/edx-sandbox/base.in
|
||||
pip-compile --no-emit-trusted-host --no-index --upgrade -o requirements/edx/base.txt requirements/edx/base.in
|
||||
pip-compile --no-emit-trusted-host --no-index --upgrade -o requirements/edx/testing.txt requirements/edx/testing.in
|
||||
pip-compile --no-emit-trusted-host --no-index --upgrade -o requirements/edx/development.txt requirements/edx/development.in
|
||||
# Post process all of the files generated above to work around open pip-tools issues
|
||||
scripts/post-pip-compile.sh \
|
||||
requirements/edx/pip-tools.txt \
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
#
|
||||
# make upgrade
|
||||
#
|
||||
|
||||
common/lib/calc
|
||||
common/lib/chem
|
||||
common/lib/sandbox-packages
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
#
|
||||
# make upgrade
|
||||
#
|
||||
|
||||
-e common/lib/calc
|
||||
-e common/lib/chem
|
||||
-e common/lib/sandbox-packages
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
#
|
||||
# make upgrade
|
||||
#
|
||||
|
||||
-e git+https://github.com/edx/acid-block.git@e46f9cda8a03e121a00c7e347084d142d22ebfb7#egg=acid-xblock
|
||||
-e common/lib/calc
|
||||
-e common/lib/capa
|
||||
@@ -93,7 +92,7 @@ django-require==1.0.11
|
||||
django-rest-swagger==2.2.0
|
||||
django-sekizai==0.10.0
|
||||
django-ses==0.8.4
|
||||
django-simple-history==2.1.0
|
||||
django-simple-history==2.1.1
|
||||
django-splash==0.2.2
|
||||
django-statici18n==1.4.0
|
||||
django-storages==1.4.1
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
#
|
||||
# make upgrade
|
||||
#
|
||||
|
||||
coverage==4.2
|
||||
diff-cover==0.9.8
|
||||
inflect==0.3.1 # via jinja2-pluralize
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
#
|
||||
# make upgrade
|
||||
#
|
||||
|
||||
-e git+https://github.com/edx/acid-block.git@e46f9cda8a03e121a00c7e347084d142d22ebfb7#egg=acid-xblock
|
||||
-e common/lib/calc
|
||||
-e common/lib/capa
|
||||
@@ -44,7 +43,7 @@ git+https://github.com/edx-solutions/xblock-drag-and-drop-v2@v2.1.6#egg=xblock-d
|
||||
git+https://github.com/open-craft/xblock-poll@add89e14558c30f3c8dc7431e5cd6536fff6d941#egg=xblock-poll==1.5.1
|
||||
git+https://github.com/edx/xblock-utils.git@v1.1.1#egg=xblock-utils==1.1.1
|
||||
-e common/lib/xmodule
|
||||
alabaster==0.7.10 # via sphinx
|
||||
alabaster==0.7.11 # via sphinx
|
||||
amqp==1.4.9
|
||||
analytics-python==1.1.0
|
||||
anyjson==0.3.3
|
||||
@@ -113,7 +112,7 @@ django-require==1.0.11
|
||||
django-rest-swagger==2.2.0
|
||||
django-sekizai==0.10.0
|
||||
django-ses==0.8.4
|
||||
django-simple-history==2.1.0
|
||||
django-simple-history==2.1.1
|
||||
django-splash==0.2.2
|
||||
django-statici18n==1.4.0
|
||||
django-storages==1.4.1
|
||||
@@ -156,7 +155,7 @@ event-tracking==0.2.4
|
||||
execnet==1.5.0
|
||||
extras==1.0.0
|
||||
factory_boy==2.8.1
|
||||
faker==0.8.15
|
||||
faker==0.8.16
|
||||
feedparser==5.1.3
|
||||
firebase-token-generator==1.3.2
|
||||
first==2.0.1
|
||||
@@ -316,7 +315,7 @@ sqlparse==0.2.4 # via django-debug-toolbar
|
||||
stevedore==1.10.0
|
||||
sure==1.4.11
|
||||
sympy==0.7.1
|
||||
testfixtures==6.1.0
|
||||
testfixtures==6.2.0
|
||||
testtools==2.3.0
|
||||
text-unidecode==1.2
|
||||
tox-battery==0.5.1
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
#
|
||||
# make upgrade
|
||||
#
|
||||
|
||||
argh==0.26.2 # via watchdog
|
||||
argparse==1.4.0 # via stevedore
|
||||
edx-opaque-keys==0.4.4
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
#
|
||||
# make upgrade
|
||||
#
|
||||
|
||||
click==6.7 # via pip-tools
|
||||
first==2.0.1 # via pip-tools
|
||||
pip-tools==2.0.2
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
#
|
||||
# make upgrade
|
||||
#
|
||||
|
||||
-e git+https://github.com/edx/acid-block.git@e46f9cda8a03e121a00c7e347084d142d22ebfb7#egg=acid-xblock
|
||||
-e common/lib/calc
|
||||
-e common/lib/capa
|
||||
@@ -109,7 +108,7 @@ django-require==1.0.11
|
||||
django-rest-swagger==2.2.0
|
||||
django-sekizai==0.10.0
|
||||
django-ses==0.8.4
|
||||
django-simple-history==2.1.0
|
||||
django-simple-history==2.1.1
|
||||
django-splash==0.2.2
|
||||
django-statici18n==1.4.0
|
||||
django-storages==1.4.1
|
||||
@@ -150,7 +149,7 @@ event-tracking==0.2.4
|
||||
execnet==1.5.0 # via pytest-xdist
|
||||
extras==1.0.0 # via python-subunit, testtools
|
||||
factory_boy==2.8.1
|
||||
faker==0.8.15 # via factory-boy
|
||||
faker==0.8.16 # via factory-boy
|
||||
feedparser==5.1.3
|
||||
firebase-token-generator==1.3.2
|
||||
fixtures==3.0.0 # via testtools
|
||||
@@ -300,7 +299,7 @@ splinter==0.8.0
|
||||
stevedore==1.10.0
|
||||
sure==1.4.11
|
||||
sympy==0.7.1
|
||||
testfixtures==6.1.0
|
||||
testfixtures==6.2.0
|
||||
testtools==2.3.0 # via fixtures, python-subunit
|
||||
text-unidecode==1.2 # via faker
|
||||
tox-battery==0.5.1
|
||||
|
||||
@@ -1,25 +1,19 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
# Remove any cruft from a requirements file generated by pip-tools which we don't want to keep
|
||||
# Remove any cruft from a requirements file generated by pip-compile which we don't want to keep
|
||||
|
||||
function show_help {
|
||||
echo "Usage: post-pip-compile.sh file ..."
|
||||
echo "Remove any cruft left behind by pip-compile in the given requirements file(s)."
|
||||
echo ""
|
||||
echo "Removes devstack-specific pip options and \"-e\" prefixes which were"
|
||||
echo "added to GitHub URLs only so that pip-compile could process them"
|
||||
echo "correctly."
|
||||
echo "Removes \"-e\" prefixes which were added to GitHub URLs only so that"
|
||||
echo "pip-compile could process them correctly."
|
||||
}
|
||||
|
||||
function clean_file {
|
||||
FILE_PATH=$1
|
||||
TEMP_FILE=${FILE_PATH}.tmp
|
||||
# pip-compile captures the devpi-related settings from devstack's pip.conf, remove them
|
||||
sed '/^--index-url/d' ${FILE_PATH} > ${TEMP_FILE}
|
||||
mv ${TEMP_FILE} ${FILE_PATH}
|
||||
sed '/^--trusted-host/d' ${FILE_PATH} > ${TEMP_FILE}
|
||||
mv ${TEMP_FILE} ${FILE_PATH}
|
||||
# If an editable VCS URL has a version number suffix, it was only editable for pip-compile's benefit;
|
||||
# this is a workaround for https://github.com/jazzband/pip-tools/issues/355
|
||||
sed 's/-e \(.*==.*\)/\1/' ${FILE_PATH} > ${TEMP_FILE}
|
||||
@@ -42,10 +36,6 @@ function clean_file {
|
||||
sed "s|-e common/lib/|common/lib/|" ${FILE_PATH} > ${TEMP_FILE}
|
||||
mv ${TEMP_FILE} ${FILE_PATH}
|
||||
fi
|
||||
# Replace the instructions for regenerating the output file.
|
||||
INPUT_FILE=${FILE_PATH/\.txt/\.in}
|
||||
sed "s/pip-compile --output-file.*/make upgrade/" ${FILE_PATH} > ${TEMP_FILE}
|
||||
mv ${TEMP_FILE} ${FILE_PATH}
|
||||
}
|
||||
|
||||
for i in "$@"; do
|
||||
|
||||
Reference in New Issue
Block a user