Commit 38074385 authored by Sylvain Herlédan's avatar Sylvain Herlédan

Adapt version of GDAL Python bindings to the version of the underlying C library.

parent 5635ab57
......@@ -11,12 +11,26 @@ Setup script for cerbere package. See package documentation for information.
import os
import sys
from distutils.core import setup
try:
import subprocess32 as subprocess
except ImportError:
import subprocess
from numpy import get_include
gdal_deps = 'gdal>=1.7.0'
try:
output = subprocess.check_output(['gdal-config', '--version'])
major, minor, _ = output.split('.')
gdal_deps = 'gdal>={}.{},<{}.{}'.format(major, minor, major, (int(minor) + 1))
except subprocess.CalledProcessError:
# Silenced
pass
with open("CONTRIBUTORS.txt", "r") as f:
authors_email = ', '.join(f.readlines())
setup(
name = "cerbere",
version = "0.1.1",
......@@ -43,7 +57,7 @@ setup(
, 'pygrib>=1.9.6'
, 'Shapely==1.2.18'
, 'python-dateutil>=2.1'
, 'GDAL>=1.7.0,<2.0.0'
, gdal_deps
, 'pyresample>=1.1.0'
],
classifiers=[
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment