Closed mcab closed 5 years ago
Wow, that sucked.
For the record, CircleCI's Postgres images do install gdal-dev and gdal, but Django specifically looks for library files that GDAL uses.
This leads to having to install libgdal-dev so that Django does not fail when trying to execute.
django.core.exceptions.ImproperlyConfigured: Could not find the GDAL library (tried "gdal", "GDAL", "gdal2.2.0", "gdal2.1.0", "gdal2.0.0", "gdal1.11.0", "gdal1.10.0", "gdal1.9.0"). Is GDAL installed? If it is, try setting GDAL_LIBRARY_PATH in your settings.
ERROR: InvocationError for command '/home/circleci/repo/.tox/py37/bin/pytest' (exited with code 1)
Would it be easier to use another image? Yes. But none suits the needs currently.
Right now, python-gdal seemed to be the best bet (same Python version we're testing against, newest GDAL), but does not have the tools CircleCI installs in their default images.
docker-geodjango installs a similar toolset to CircleCI's (as noted on StackOverflow), but uses Python 3.6. We could downgrade, but that's another can of worms to not open.
It's probably easiest to include a pull request to have Python 3.7 installed and not 3.6 to docker-geodjango, but it's even easier to just install the dependencies at run time, for now.
I tried:
GDAL_LIBRARY_PATH
not found)With that change, this closes #20, once it's merged in.
Addresses #5.