Previously the contents of the file being searched was not output,
making it hard to know how to fix a test so that it would pass.
Before:
```
$ make test-heroku-16
...
testCffi
ASSERT:Expected </tmp/shunit.ayVGAO/tmp/output.6gMs/stdout> to contain <ZZZZZZZ>
testPylibmc
```
After:
```
$ make test-heroku-16
...
testCffi
ASSERT:Expected </tmp/shunit.FXWeuI/tmp/output.7Vfx/stdout> to contain <ZZZZZZZ>
! Warning: Your application is missing a Procfile. This file tells Heroku how to run your application.
! Learn more: https://devcenter.heroku.com/articles/procfile
-----> Installing python-3.6.2
-----> Installing pip
-----> Installing requirements with pip
Collecting cffi (from -r /tmp/testBoLG0/requirements.txt (line 1))
Downloading cffi-1.10.0-cp36-cp36m-manylinux1_x86_64.whl (406kB)
Collecting pycparser (from cffi->-r /tmp/testBoLG0/requirements.txt (line 1))
Downloading pycparser-2.18.tar.gz (245kB)
Installing collected packages: pycparser, cffi
Running setup.py install for pycparser: started
Running setup.py install for pycparser: finished with status 'done'
Successfully installed cffi-1.10.0 pycparser-2.18
testPylibmc
```
* NLTK support: Update test to use multiple corpora
So that the incorrect handling of multiple IDs seen in #444 would
have been caught.
Also switches to some of the smaller corpora, to reduce time spent
downloading during tests (see sizes on http://www.nltk.org/nltk_data/).
* NLTK support: Fix passing of multiple corpora identifiers
As part of fixing the shellcheck warnigns in #438, double quotes had
been placed around `$nltk_packages` passed to the `nltk.downloader`,
which causes multiple identifiers to be treated as though it were just
one identifier that contains spaces.
The docs for the shellcheck warning in question recommend using arrays
if the intended behaviour really is to split on spaces:
https://github.com/koalaman/shellcheck/wiki/SC2086#exceptions
As such, `readarray` has been used, which is present in bash >=4.
The `[*]` array form is used in the log message, to prevent shellcheck
warning SC2145, whereas `[@]` is used when passed to `nltk.downloader`
to ensure the array elements are unpacked as required.
Note: Both before and after this fix, using anything but unix line
endings in `nltk.txt` will also cause breakage.
Reduces the impact on Travis runtime caused by #438, by:
* Making the shellcheck job run on the container infra (`sudo: false`)
which has faster boot times.
* Running the heroku-16 and cedar-14 stack tests in parallel, since
previously they were separate stages (which are run in series by
design).
Reduces Travis end-to-end time from ~10 minutes to ~6 minutes.
* Test that the cache is invalidated when the stack changes
* Improve UX when clearing cache due to the stack changing
Now outputs a message informing that the cache was cleared, and
clears the cache first to avoid a redundant message about removing
an old Python version.
This copies the official Docker Python images approach of stripping
the Python test suite after building from source.
For Python 3.6.2 this reduces the output from 184MB to 121MB and
removes the following directories:
```
.heroku/python/lib/python3.6/tkinter/test
.heroku/python/lib/python3.6/ctypes/test
.heroku/python/lib/python3.6/unittest/test
.heroku/python/lib/python3.6/distutils/tests
.heroku/python/lib/python3.6/sqlite3/test
.heroku/python/lib/python3.6/lib2to3/tests
.heroku/python/lib/python3.6/test
```
For Python 2.7.13 this reduces the output from 127MB to 91MB and
removes the following directories:
```
.heroku/python/lib/python2.7/ctypes/test
.heroku/python/lib/python2.7/unittest/test
.heroku/python/lib/python2.7/distutils/tests
.heroku/python/lib/python2.7/bsddb/test
.heroku/python/lib/python2.7/lib-tk/test
.heroku/python/lib/python2.7/sqlite3/test
.heroku/python/lib/python2.7/lib2to3/tests
.heroku/python/lib/python2.7/json/tests
.heroku/python/lib/python2.7/email/test
.heroku/python/lib/python2.7/test
```
Fixes#424.
The pip-uninstall step stopped working when it was moved to after
the pip-install step in f27a84e.
This regression was temporarily fixed by part of #397, however that
PR was reverted in #404.
Adds a test to hopefully catch any future regressions :-)
Fixes#393.
* Revert "Fix pyyaml (#402)"
This reverts commit ff94908505.
* Revert "Don't install packages that could mess packaging up (#397)"
This reverts commit 5496c02f9f.
* Revert "use pkg_resources to check for distributions (#395)"
This reverts commit 9b185f99d5.
* use sp-grep for django detection
* sp-grep
* fix setuptools script
* Updates bob-builder to a version that clears out the previous
build directory, which prevents the stale files seen in #379.
* Adds a `buildenv-heroku-16` Make command to simplify the
building and use of the Heroku-16 binary build environment.
* Sets `S3_BUCKET` and `S3_PREFIX` in the Docker image, to save
having to do so manually each time.
* Removes the duplication of the bob-builder dependency between
`Dockerfile` and `requirements.txt`.
* Disables the pip version check during Docker build, to avoid the
noisy stderr warning about Ubuntu 16.04 pip being older (v8.1.1).
* Adds a `.dockerignore` to speed up the Docker build, by reducing
the build context transferred to the daemon from 60MB to 2MB.
* Applies some Dockerfile best practices like disabling/removing
cached files (since layer invalidation makes caching pointless).
In cases where there is no stderr there was previously no output,
which made it hard to find the cause. The assertion messages have
also been adjusted to remove the repetition (shunit2 already outputs
expected vs actual itself).
Before:
```
testPipenv
ASSERT:Expected captured exit code to be 0; was <2> expected:<0> but was:<2>
testPipenvVersion
```
After:
```
testPipenv
ASSERT:Captured exit code - expected:<0> but was:<2>
! Warning: Your application is missing a Procfile. This file tells Heroku how to run your application.
! Learn more: https://devcenter.heroku.com/articles/procfile
-----> Installing python-2.7.13
-----> Installing pip
-----> Generating 'requirements.txt' with pipenv
testPipenvVersion
```
Fixes#389.
So that any changes made to `.heroku/` within pre_compile (such as
installing additional libraries required for the later pip install) are
not clobbered by the cache being copied over afterwards.
Fixes#320.
* update python.gunicorn.sh to WEB_CONCURRENCY.sh
* don't remove WEB_CONCURRENCY for prefixed 0s
* split gunicorn functionality into its own file
* cleanup comments
* fix var ordering
* add retry to curl
* use proper url for buildpack stdlib