-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added gdal as setup.py programatically inferred dependency small fixes
- Loading branch information
1 parent
540d725
commit 845b623
Showing
7 changed files
with
27 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,4 +15,3 @@ python-swiftclient<5.0.0 | |
jsonfield | ||
gunicorn | ||
mapscript | ||
gdal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
from setuptools import setup | ||
import subprocess | ||
import pkg_resources | ||
|
||
|
||
with open('requirements.txt', 'r') as reqs: | ||
install_requires = [ | ||
str(requirement) | ||
for requirement | ||
in pkg_resources.parse_requirements(reqs) | ||
] | ||
|
||
try: | ||
gdal_version = subprocess.check_output(['gdal-config','--version']).decode('utf-8').strip() | ||
except FileNotFoundError: | ||
gdal_version = subprocess.check_output(['gdalinfo','--version']).decode('utf-8').split(' ')[1].strip(',') | ||
|
||
install_requires.append(f'gdal=={gdal_version}') | ||
|
||
if __name__ == "__main__": | ||
setup(install_requires=install_requires) |