Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add py-fann2 recipe #4528

Merged
merged 11 commits into from
Dec 12, 2017
53 changes: 53 additions & 0 deletions recipes/py-fann2/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
{% set name = "fann2" %}
{% set version = "1.1.2" %}
{% set file_ext = "tar.gz" %}
{% set hash_type = "sha256" %}
{% set hash_value = "0f2ae9e14630d4d652ffb58f9239ca488e5c15c38e9302f204c24d8c2f7cf0d8" %}

package:
name: 'py-{{ name|lower }}'
version: '{{ version }}'

source:
fn: '{{ name }}-{{ version }}.{{ file_ext }}'
url: https://github.com/FutureLinkCorporation/{{ name }}/archive/{{ version }}.{{ file_ext }}
'{{ hash_type }}': '{{ hash_value }}'
patches:
- setup.py.patch

build:
number: 0
script: python setup.py install --single-version-externally-managed --record=record.txt
skip: True # [win]

requirements:
build:
- python
- setuptools
- fann2
- toolchain
- swig
run:
- python
- fann2

test:
imports:
- fann2

about:
home: https://github.com/FutureLinkCorporation/fann2
license: LGPL-2.1
license_family: LGPL
license_file: 'LICENSE'
summary: Fast Artificial Neural Network Library (fann) python bindings.
description: |
Python bindings for Fast Artificial Neural Networks (FANN) library that
implements multilayer artificial neural networks with support for both
fully-connected and sparsely-connected networks. It includes a framework for
easy handling of training data sets. It is easy to use, versatile, well-
documented, and fast.

extra:
recipe-maintainers:
- smithsp
11 changes: 11 additions & 0 deletions recipes/py-fann2/setup.py.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- a/setup.py
+++ b/setup.py
@@ -65,7 +65,7 @@ def find_fann():
return True
raise Exception("Couldn't find FANN source libs!")
else:
- dirs = ['/lib', '/usr/lib', '/usr/lib64', '/usr/local/lib', '/usr/pkg/lib']
+ dirs = [os.environ.get('PREFIX','')+'/lib','/lib', '/usr/lib', '/usr/lib64', '/usr/local/lib', '/usr/pkg/lib']
for path in dirs:
if os.path.isdir(path):
if find_x(path):