Skip to content

Commit

Permalink
Turn on curl support in GDAL
Browse files Browse the repository at this point in the history
  • Loading branch information
Sean Gillies committed Mar 30, 2016
1 parent 7e3cfa2 commit b5bc03a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/travis_gdal_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ GDALOPTS=" --with-ogr \
--without-ingres \
--without-xerces \
--without-odbc \
--without-curl \
--with-curl \
--without-sqlite3 \
--without-dwgdirect \
--without-idb \
Expand Down
13 changes: 13 additions & 0 deletions tests/test_aws.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,16 @@ def test_open_with_session():
aws_secret_access_key=aws_secret_access_key)
with s.open("s3://landsat-pds/L8/139/045/LC81390452014295LGN00/LC81390452014295LGN00_B1.TIF") as f:
assert f.count == 1


@pytest.mark.xfail(
not(os.environ.get('GDALVERSION', '2.1').startswith('2.1')),
reason="S3 raster access requires GDAL 2.1")
def test_open_with_session_minus_mode():
"""Enter and exit a session, reading in 'r-' mode"""
aws_access_key_id = os.environ.get('AWS_ACCESS_KEY_ID')
aws_secret_access_key = os.environ.get('AWS_SECRET_ACCESS_KEY')
s = Session(aws_access_key_id=aws_access_key_id,
aws_secret_access_key=aws_secret_access_key)
with s.open("s3://landsat-pds/L8/139/045/LC81390452014295LGN00/LC81390452014295LGN00_B1.TIF", 'r-') as f:
assert f.count == 1

0 comments on commit b5bc03a

Please sign in to comment.