This repository has been archived by the owner on Jun 4, 2022. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 7
/
meta.yaml
137 lines (122 loc) · 4.27 KB
/
meta.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
{% set name = "shogun" %}
{% set version = "6.1.3" %}
{% set commit = 'shogun_' + version %}
{% set sha256 = "75f4d555efe06eaa7c4c12a1dc942f6e4d41a8ed495777a790b9bd9df936c19c" %}
# Shogun doesn't produce a single tarball you can build from anymore;
# need to get the gpl-shogun tarball too. Remember to update this when updating
# the version!
{% set gpl_commit = "29ca2ff930cd5d963b3a78e79160cc04d48970c2" %}
{% set gpl_sha256 = "ff8a46b7775e784f07e9ffb02e7cd9b101f508c1c7b7d8cdbf1024a2efacdb22" %}
{% set blas_variant = "openblas" %}
package:
name: {{ name|lower }}
version: {{ version }}
source:
- url: https://github.com/shogun-toolbox/shogun/archive/{{ commit }}.tar.gz
sha256: {{ sha256 }}
patches:
# https://github.com/shogun-toolbox/shogun/issues/4068
- libpython-linking.patch
- url: https://github.com/shogun-toolbox/shogun-gpl/archive/{{ gpl_commit }}.tar.gz
sha256: {{ gpl_sha256 }}
folder: src/gpl
{% set lc, vs, ve, prefix, parbuild = "\\", "$", "", "$PREFIX", "-j $CPU_COUNT" %} # [unix]
{% set lc, vs, ve, prefix, parbuild = "^", "%", "%", "%LIBRARY_PREFIX%", "" %} # [win]
build:
number: 3
features:
- blas_{{ blas_variant }} # [not win]
skip: true # [win32 or (win and vc<14)]
script: |
mkdir build
cd build
# figure out include / library paths
# https://github.com/conda/conda-build/issues/2130 will be proper solution
pyinc=$($PYTHON -c "from distutils import sysconfig; print(sysconfig.get_python_inc())") # [unix]
pylib=$(otool -L $PYTHON | grep 'libpython.*\.dylib' | tr '\t' ' ' | cut -d' ' -f2 | sed "s|@rpath|$PREFIX/lib|") # [osx]
pylib=$(ldd $PYTHON | grep $PREFIX | grep 'libpython.*\.so' | cut -d' ' -f3) # [linux]
cmake .. {{ lc }}
-G"{{vs}}CMAKE_GENERATOR{{ve}}" {{ lc }}
-DCMAKE_PREFIX_PATH="{{ prefix }}" {{ lc }}
-DCMAKE_INSTALL_PREFIX="{{ prefix }}" {{ lc }}
-DCMAKE_BUILD_TYPE=Release {{ lc }}
-DBUILD_EXAMPLES=OFF {{ lc }}
-DBUILD_META_EXAMPLES=OFF {{ lc }}
-DENABLE_TESTING=OFF {{ lc }}
-DENABLE_COVERAGE=OFF {{ lc }}
-DUSE_SVMLIGHT=OFF {{ lc }}
-DPYTHON_EXECUTABLE={{vs}}PYTHON{{ve}} {{ lc }}
-DPYTHON_INCLUDE_DIR=$pyinc \ # [unix]
-DPYTHON_LIBRARY=$pylib \ # [unix]
-DLIBSHOGUN=OFF {{ lc }}
-DINTERFACE_PYTHON=ON
if errorlevel 1 exit 1 # [win]
cmake --build . --target _interface_python --config Release -- {{ parbuild }}
if errorlevel 1 exit 1 # [win]
cmake --build . --target install --config Release -- {{ parbuild }}
if errorlevel 1 exit 1 # [win]
requirements:
build:
- {{ compiler('c') }}
- {{ compiler('cxx') }}
- cmake
- swig
host:
- python
- setuptools
- numpy
- shogun-cpp {{ version }}
- arpack # [not win]
- bzip2
- ctags
- curl
- eigen
- glpk
- hdf5
- json-c # [not win]
- libxml2
- lzo
- openblas # [not win]
- libprotobuf # [not win] # conda-forge doesn't have shared lib yet
- rxcpp 4.0.0
- snappy
- xz
- zlib
run:
- python
- {{ pin_compatible('numpy') }}
- {{ pin_compatible('shogun-cpp', max_pin='x.x.x') }}
- arpack # [not win]
- bzip2
- ctags
- curl
- glpk
- hdf5
- json-c # [not win]
- libxml2
- lzo
- openblas # [not win]
- libprotobuf # [not win]
- snappy
- xz
- zlib
test:
imports:
- shogun
commands:
- conda inspect linkages -p $PREFIX shogun # [not win]
- conda inspect objects -p $PREFIX shogun # [osx]
about:
home: http://shogun.ml
license: GPL-3.0
license_family: GPL
license_file: COPYING
summary: 'Unified and efficient Machine Learning'
description: |
The Shogun Machine learning toolbox offers a wide range of efficient and
unified Machine Learning methods.
doc_url: http://shogun.ml/examples/latest/index.html
dev_url: https://github.com/shogun-toolbox/shogun/wiki
extra:
recipe-maintainers:
- djsutherland