Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
heroku-buildpack-python
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Evili del Rio i Silvan
heroku-buildpack-python
Commits
eab957c8
Commit
eab957c8
authored
9 years ago
by
Kenneth Reitz
Browse files
Options
Downloads
Patches
Plain Diff
BUILD_WITH_GEO_LIBRARIES
parent
6e80c391
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
bin/compile
+3
-0
3 additions, 0 deletions
bin/compile
bin/steps/gdal
+1
-5
1 addition, 5 deletions
bin/steps/gdal
bin/steps/geo-libs
+41
-0
41 additions, 0 deletions
bin/steps/geo-libs
with
45 additions
and
5 deletions
bin/compile
+
3
−
0
View file @
eab957c8
...
...
@@ -201,6 +201,9 @@ source $BIN_DIR/steps/pylibmc
# Libffi support.
source
$BIN_DIR
/steps/cryptography
# Support for Geo libraries.
sub-env
$BIN_DIR
/steps/geo-libs
# GDAL support.
source
$BIN_DIR
/steps/gdal
...
...
This diff is collapsed.
Click to expand it.
bin/steps/gdal
+
1
−
5
View file @
eab957c8
...
...
@@ -11,8 +11,6 @@
# The location of the pre-compiled cryptography binary.
VENDORED_GDAL
=
"https://lang-python.s3.amazonaws.com/
$STACK
/libraries/vendor/gdal.tar.gz"
VENDORED_GEOS
=
"https://lang-python.s3.amazonaws.com/
$STACK
/libraries/vendor/geos.tar.gz"
VENDORED_PROJ
=
"https://lang-python.s3.amazonaws.com/
$STACK
/libraries/vendor/proj.tar.gz"
PKG_CONFIG_PATH
=
"/app/.heroku/vendor/lib/pkgconfig:
$PKG_CONFIG_PATH
"
...
...
@@ -27,12 +25,10 @@ if (pip-grep -s requirements.txt GDAL gdal pygdal &> /dev/null) then
if
[
-f
".heroku/vendor/bin/gdalserver"
]
;
then
export
GDAL
=
$(
pwd
)
/vendor
else
echo
"-----> Noticed GDAL. Bootstrapping gdal
, geos, proj
."
echo
"-----> Noticed GDAL. Bootstrapping gdal."
mkdir
-p
.heroku/vendor
# Download and extract cryptography into target vendor directory.
curl
$VENDORED_GDAL
-s
|
tar
zxv
-C
.heroku/vendor &> /dev/null
curl
$VENDORED_GEOS
-s
|
tar
zxv
-C
.heroku/vendor &> /dev/null
curl
$VENDORED_PROJ
-s
|
tar
zxv
-C
.heroku/vendor &> /dev/null
export
GDAL
=
$(
pwd
)
/vendor
fi
...
...
This diff is collapsed.
Click to expand it.
bin/steps/geo-libs
0 → 100755
+
41
−
0
View file @
eab957c8
#!/usr/bin/env bash
# This script serves as the GDAL build step of the
# [**Python Buildpack**](https://github.com/heroku/heroku-buildpack-python)
# compiler.
#
# A [buildpack](https://devcenter.heroku.com/articles/buildpacks) is an
# adapter between a Python application and Heroku's runtime.
#
# This script is invoked by [`bin/compile`](/).
# The location of the pre-compiled cryptography binary.
VENDORED_GDAL
=
"https://lang-python.s3.amazonaws.com/
$STACK
/libraries/vendor/gdal.tar.gz"
VENDORED_GEOS
=
"https://lang-python.s3.amazonaws.com/
$STACK
/libraries/vendor/geos.tar.gz"
VENDORED_PROJ
=
"https://lang-python.s3.amazonaws.com/
$STACK
/libraries/vendor/proj.tar.gz"
PKG_CONFIG_PATH
=
"/app/.heroku/vendor/lib/pkgconfig:
$PKG_CONFIG_PATH
"
# Syntax sugar.
source
$BIN_DIR
/utils
bpwatch start geo_libs_install
# If GDAL exists within requirements, use vendored gdal.
if
[[
"
$BUILD_WITH_GEO_LIBRARIES
"
]]
;
then
if
[
-f
".heroku/vendor/bin/gdalserver"
]
;
then
export
GDAL
=
$(
pwd
)
/vendor
else
echo
"-----> Bootstrapping gdal, geos, proj."
mkdir
-p
.heroku/vendor
# Download and extract cryptography into target vendor directory.
curl
$VENDORED_GDAL
-s
|
tar
zxv
-C
.heroku/vendor &> /dev/null
curl
$VENDORED_GEOS
-s
|
tar
zxv
-C
.heroku/vendor &> /dev/null
curl
$VENDORED_PROJ
-s
|
tar
zxv
-C
.heroku/vendor &> /dev/null
export
GDAL
=
$(
pwd
)
/vendor
fi
fi
bpwatch stop geo_libs_install
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment