Skip to content

Commit

Permalink
Initial feedstock commit with conda-smithy 1.6.1.
Browse files Browse the repository at this point in the history
  • Loading branch information
Travis-CI on github.com/conda-forge/staged-recipes committed Dec 9, 2016
0 parents commit 9f84ecd
Show file tree
Hide file tree
Showing 13 changed files with 384 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
* text=auto

meta.yaml text eol=lf
build.sh text eol=lf
bld.bat text eol=crlf
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*.pyc

build_artefacts
34 changes: 34 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# This file was generated automatically from conda-smithy. To update this configuration,
# update the conda-forge.yml and/or the recipe/meta.yaml.

language: generic

os: osx
osx_image: beta-xcode6.1




before_install:
# Remove homebrew.
- brew remove --force $(brew list)
- brew cleanup -s
- rm -rf $(brew --cache)

install:
- |
MINICONDA_URL="https://repo.continuum.io/miniconda"
MINICONDA_FILE="Miniconda3-latest-MacOSX-x86_64.sh"
curl -L -O "${MINICONDA_URL}/${MINICONDA_FILE}"
bash $MINICONDA_FILE -b
source /Users/travis/miniconda3/bin/activate root
conda config --add channels conda-forge
conda config --set show_channel_urls true
conda install --yes --quiet conda-forge-build-setup
source run_conda_forge_build_setup
script:
- conda build ./recipe

- upload_or_check_non_existence ./recipe conda-forge --channel=main
13 changes: 13 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
BSD 3-clause license
Copyright (c) conda-forge
All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
108 changes: 108 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
About go-spatial
================

Home: https://github.com/jblindsay/go-spatial

Package license: MIT

Feedstock license: BSD 3-Clause

Summary: GoSpatial is a command-line interface program written in Go for analyzing and manipulating geospatial data written in Go

GoSpatial is a command-line interface program for analyzing and manipulating geospatial data.
It has been developed by John Lindsay using the Go programming language and is compiled to
native code. The project is experimental and is intended to provide additional analytical
support for the Whitebox Geospatial Analysis Tools open-source GIS software. GoSpatial
can however be run completely independent of any other software.


Current build status
====================

Linux: [![Circle CI](https://circleci.com/gh/conda-forge/go-spatial-feedstock.svg?style=shield)](https://circleci.com/gh/conda-forge/go-spatial-feedstock)
OSX: [![TravisCI](https://travis-ci.org/conda-forge/go-spatial-feedstock.svg?branch=master)](https://travis-ci.org/conda-forge/go-spatial-feedstock)
Windows: [![AppVeyor](https://ci.appveyor.com/api/projects/status/github/conda-forge/go-spatial-feedstock?svg=True)](https://ci.appveyor.com/project/conda-forge/go-spatial-feedstock/branch/master)

Current release info
====================
Version: [![Anaconda-Server Badge](https://anaconda.org/conda-forge/go-spatial/badges/version.svg)](https://anaconda.org/conda-forge/go-spatial)
Downloads: [![Anaconda-Server Badge](https://anaconda.org/conda-forge/go-spatial/badges/downloads.svg)](https://anaconda.org/conda-forge/go-spatial)

Installing go-spatial
=====================

Installing `go-spatial` from the `conda-forge` channel can be achieved by adding `conda-forge` to your channels with:

```
conda config --add channels conda-forge
```

Once the `conda-forge` channel has been enabled, `go-spatial` can be installed with:

```
conda install go-spatial
```

It is possible to list all of the versions of `go-spatial` available on your platform with:

```
conda search go-spatial --channel conda-forge
```


About conda-forge
=================

conda-forge is a community-led conda channel of installable packages.
In order to provide high-quality builds, the process has been automated into the
conda-forge GitHub organization. The conda-forge organization contains one repository
for each of the installable packages. Such a repository is known as a *feedstock*.

A feedstock is made up of a conda recipe (the instructions on what and how to build
the package) and the necessary configurations for automatic building using freely
available continuous integration services. Thanks to the awesome service provided by
[CircleCI](https://circleci.com/), [AppVeyor](http://www.appveyor.com/)
and [TravisCI](https://travis-ci.org/) it is possible to build and upload installable
packages to the [conda-forge](https://anaconda.org/conda-forge)
[Anaconda-Cloud](http://docs.anaconda.org/) channel for Linux, Windows and OSX respectively.

To manage the continuous integration and simplify feedstock maintenance
[conda-smithy](http://github.com/conda-forge/conda-smithy) has been developed.
Using the ``conda-forge.yml`` within this repository, it is possible to re-render all of
this feedstock's supporting files (e.g. the CI configuration files) with ``conda smithy rerender``.


Terminology
===========

**feedstock** - the conda recipe (raw material), supporting scripts and CI configuration.

**conda-smithy** - the tool which helps orchestrate the feedstock.
Its primary use is in the construction of the CI ``.yml`` files
and simplify the management of *many* feedstocks.

**conda-forge** - the place where the feedstock and smithy live and work to
produce the finished article (built conda distributions)


Updating go-spatial-feedstock
=============================

If you would like to improve the go-spatial recipe or build a new
package version, please fork this repository and submit a PR. Upon submission,
your changes will be run on the appropriate platforms to give the reviewer an
opportunity to confirm that the changes result in a successful build. Once
merged, the recipe will be re-built and uploaded automatically to the
`conda-forge` channel, whereupon the built conda packages will be available for
everybody to install and use from the `conda-forge` channel.
Note that all branches in the conda-forge/go-spatial-feedstock are
immediately built and any created packages are uploaded, so PRs should be based
on branches in forks and branches in the main repository should only be used to
build distinct package versions.

In order to produce a uniquely identifiable distribution:
* If the version of a package **is not** being increased, please add or increase
the [``build/number``](http://conda.pydata.org/docs/building/meta-yaml.html#build-number-and-string).
* If the version of a package **is** being increased, please remember to return
the [``build/number``](http://conda.pydata.org/docs/building/meta-yaml.html#build-number-and-string)
back to 0.
70 changes: 70 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# This file was automatically generated by conda-smithy. To update a component of this
# file, make changes to conda-forge.yml and/or recipe/meta.yaml, and run
# "conda smithy rerender".

environment:

# SDK v7.0 MSVC Express 2008's SetEnv.cmd script will fail if the
# /E:ON and /V:ON options are not enabled in the batch script intepreter
# See: http://stackoverflow.com/a/13751649/163740
CMD_IN_ENV: "cmd /E:ON /V:ON /C obvci_appveyor_python_build_env.cmd"



matrix:
- TARGET_ARCH: x86
CONDA_PY: 27
CONDA_INSTALL_LOCN: C:\\Miniconda

- TARGET_ARCH: x64
CONDA_PY: 27
CONDA_INSTALL_LOCN: C:\\Miniconda-x64


# We always use a 64-bit machine, but can build x86 distributions
# with the TARGET_ARCH variable.
platform:
- x64

install:
# If there is a newer build queued for the same PR, cancel this one.
# The AppVeyor 'rollout builds' option is supposed to serve the same
# purpose but it is problematic because it tends to cancel builds pushed
# directly to master instead of just PR builds (or the converse).
# credits: JuliaLang developers.
- ps: if ($env:APPVEYOR_PULL_REQUEST_NUMBER -and $env:APPVEYOR_BUILD_NUMBER -ne ((Invoke-RestMethod `
https://ci.appveyor.com/api/projects/$env:APPVEYOR_ACCOUNT_NAME/$env:APPVEYOR_PROJECT_SLUG/history?recordsNumber=50).builds | `
Where-Object pullRequestId -eq $env:APPVEYOR_PULL_REQUEST_NUMBER)[0].buildNumber) { `
throw "There are newer queued builds for this pull request, failing early." }

# Cywing's git breaks conda-build. (See https://github.com/conda-forge/conda-smithy-feedstock/pull/2.)
- cmd: rmdir C:\cygwin /s /q

# Add our channels.
- cmd: set "OLDPATH=%PATH%"
- cmd: set "PATH=%CONDA_INSTALL_LOCN%\\Scripts;%CONDA_INSTALL_LOCN%\\Library\\bin;%PATH%"
- cmd: conda config --set show_channel_urls true
- cmd: conda config --add channels conda-forge

# Add a hack to switch to `conda` version `4.1.12` before activating.
# This is required to handle a long path activation issue.
# Please see PR ( https://github.com/conda/conda/pull/3349 ).
- cmd: conda install --yes --quiet conda=4.1.12
- cmd: set "PATH=%OLDPATH%"
- cmd: set "OLDPATH="

# Actually activate `conda`.
- cmd: call %CONDA_INSTALL_LOCN%\Scripts\activate.bat
- cmd: set PYTHONUNBUFFERED=1

- cmd: conda install -n root --quiet --yes obvious-ci
- cmd: conda install -n root --quiet --yes conda-forge-build-setup
- cmd: run_conda_forge_build_setup

# Skip .NET project specific build phase.
build: off

test_script:
- "%CMD_IN_ENV% conda build recipe --quiet"
deploy_script:
- cmd: upload_or_check_non_existence .\recipe conda-forge --channel=main
27 changes: 27 additions & 0 deletions ci_support/checkout_merge_commit.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/bin/bash


# Update PR refs for testing.
if [[ -n "${CIRCLE_PR_NUMBER}" ]]
then
FETCH_REFS="${FETCH_REFS} +refs/pull/${CIRCLE_PR_NUMBER}/head:pr/${CIRCLE_PR_NUMBER}/head"
FETCH_REFS="${FETCH_REFS} +refs/pull/${CIRCLE_PR_NUMBER}/merge:pr/${CIRCLE_PR_NUMBER}/merge"
fi

# Retrieve the refs.
if [[ -n "${CIRCLE_PR_NUMBER}" ]]
then
git fetch -u origin ${FETCH_REFS}
fi

# Checkout the PR merge ref.
if [[ -n "${CIRCLE_PR_NUMBER}" ]]
then
git checkout -qf "pr/${CIRCLE_PR_NUMBER}/merge"
fi

# Check for merge conflicts.
if [[ -n "${CIRCLE_PR_NUMBER}" ]]
then
git branch --merged | grep "pr/${CIRCLE_PR_NUMBER}/head" > /dev/null
fi
47 changes: 47 additions & 0 deletions ci_support/run_docker_build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
#!/usr/bin/env bash

# PLEASE NOTE: This script has been automatically generated by conda-smithy. Any changes here
# will be lost next time ``conda smithy rerender`` is run. If you would like to make permanent
# changes to this script, consider a proposal to conda-smithy so that other feedstocks can also
# benefit from the improvement.

FEEDSTOCK_ROOT=$(cd "$(dirname "$0")/.."; pwd;)
RECIPE_ROOT=$FEEDSTOCK_ROOT/recipe

docker info

config=$(cat <<CONDARC
channels:
- conda-forge
- defaults # As we need conda-build
conda-build:
root-dir: /feedstock_root/build_artefacts
show_channel_urls: true
CONDARC
)

cat << EOF | docker run -i \
-v ${RECIPE_ROOT}:/recipe_root \
-v ${FEEDSTOCK_ROOT}:/feedstock_root \
-a stdin -a stdout -a stderr \
condaforge/linux-anvil \
bash || exit $?
export BINSTAR_TOKEN=${BINSTAR_TOKEN}
export PYTHONUNBUFFERED=1
echo "$config" > ~/.condarc
# A lock sometimes occurs with incomplete builds. The lock file is stored in build_artefacts.
conda clean --lock
conda install --yes --quiet conda-forge-build-setup
source run_conda_forge_build_setup
# Embarking on 1 case(s).
conda build /recipe_root --quiet || exit 1
upload_or_check_non_existence /recipe_root conda-forge --channel=main || exit 1
EOF
18 changes: 18 additions & 0 deletions circle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
checkout:
post:
- ./ci_support/checkout_merge_commit.sh

machine:
services:
- docker

dependencies:
# Note, we used to use the naive caching of docker images, but found that it was quicker
# just to pull each time. #rollondockercaching
override:
- docker pull condaforge/linux-anvil

test:
override:
# Run, test and (if we have a BINSTAR_TOKEN) upload the distributions.
- ./ci_support/run_docker_build.sh
1 change: 1 addition & 0 deletions conda-forge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[]
2 changes: 2 additions & 0 deletions recipe/bld.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
copy go-spatial.exe "%LIBRARY_BIN%"
if errorlevel 1 exit 1
6 changes: 6 additions & 0 deletions recipe/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash

mkdir -vp ${PREFIX}/bin;

cp -v go-spatial ${PREFIX}/bin/ || exit 1;
chmod -v 755 ${PREFIX}/bin/go-spatial || exit 1;
50 changes: 50 additions & 0 deletions recipe/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{% set name = "go-spatial" %}
{% set version = "0.1.0" %}
{% set gittree = "08fdff56633f90dd76c38c4b13be0ae17ed9e045" %}

package:
name: {{ name|lower }}
version: {{ version }}

source:
fn: go-spatial_darwin_amd64.zip # [osx]
url: https://github.com/jblindsay/go-spatial/raw/{{ gittree }}/go-spatial_darwin_amd64.zip # [osx]
sha256: "1532c2b1af6bf12adcfde4c993b04664c33b5736b8f72e69e42563ab171607e3" # [osx]
fn: go-spatial_linux_386.zip # [linux32]
url: https://github.com/jblindsay/go-spatial/raw/{{ gittree }}//go-spatial_linux_386.zip # [linux32]
sha256: "e2bc1e3c687111be41e55fd15878f9c37b7a666336b767316f9bfac1d1bce39a" # [linux32]
fn: go-spatial_linux_amd64.zip # [linux64]
url: https://github.com/jblindsay/go-spatial/raw/{{ gittree }}//go-spatial_linux_amd64.zip # [linux64]
sha256: "4469f7c2b0862a3d6b072eb7b69aeda257614d0711038eec4ab5d6df96b2a345" # [linux64]
fn: go-spatial_win_386.zip # [win32]
url: https://github.com/jblindsay/go-spatial/raw/{{ gittree }}//go-spatial_win_386.zip # [win32]
sha256: "2772f5b448707c0eed1a3aabfa526f9f2dfc1c80dc44efb2e04d02375aae6ca0" # [win32]
fn: go-spatial_win_amd64.zip # [win64]
url: https://github.com/jblindsay/go-spatial/raw/{{ gittree }}//go-spatial_win_amd64.zip # [win64]
sha256: "3db8c9b24d15f7769a57a8b8a8e057c32ca1f080d01617923d7c8bf925dcd4d5" # [win64]

build:
number: 0

test:
commands:
- go-spatial -v 2>&1 >/dev/null | grep 'Usage' # [not win]
- go-spatial.exe -v 2>&1 | FINDSTR /b "Usage" # [win]

about:
home: https://github.com/jblindsay/go-spatial
license: MIT
license_family: MIT
summary: 'GoSpatial is a command-line interface program written in Go for analyzing and manipulating geospatial data written in Go'
description: |
GoSpatial is a command-line interface program for analyzing and manipulating geospatial data.
It has been developed by John Lindsay using the Go programming language and is compiled to
native code. The project is experimental and is intended to provide additional analytical
support for the Whitebox Geospatial Analysis Tools open-source GIS software. GoSpatial
can however be run completely independent of any other software.
doc_url: https://github.com/jblindsay/go-spatial
dev_url: https://github.com/jblindsay/go-spatial

extra:
recipe-maintainers:
- dharhas

0 comments on commit 9f84ecd

Please sign in to comment.