Commit f9493926 authored by André Anjos's avatar André Anjos 💬
Browse files

Remove a bunch of outdated packages; More clean-up

parent 90426a8b
......@@ -96,7 +96,7 @@ ipdb:
kaldi:
- r7271.1a4dbf6
keras:
- 2.0.8
- 2.1.2
libblitz:
- 1.0.1
libmatio:
......@@ -116,11 +116,13 @@ menpowidgets:
mne:
- 0.14.1
opencv:
- 3.1.0
- 3.3.1
pkg_config:
- 0.28
- 0.29.2
pkgtools:
- 0.7.3
protobuf:
- 3.4.1
pyedflib:
- 0.1.9
schema:
......@@ -158,11 +160,7 @@ pin_run_as_build:
max_pin: x
kaldi:
max_pin: x
keras:
max_pin: x
libogg:
max_pin: x
madmom:
max_pin: x
sox:
max_pin: x.x.x
%PYTHON% setup.py install --single-version-externally-managed --root=/
if errorlevel 1 exit 1
#!/bin/bash
$PYTHON setup.py install --single-version-externally-managed --root=/
{% set version = "2.0.8" %}
package:
name: keras
version: {{ version }}
source:
git_url: https://github.com/fchollet/keras.git
git_tag: {{ version }}
build:
number: 1
skip: true # [not linux]
requirements:
build:
- python
- setuptools
run:
- python
- h5py
- numpy
- pyyaml
- scipy
- six
- tensorflow
# test:
# imports:
# - keras
# - keras.backend
# - keras.datasets
# - keras.engine
# - keras.layers
# - keras.legacy
# - keras.preprocessing
# - keras.utils
# - keras.wrappers
about:
home: https://github.com/fchollet/keras
license: MIT
license_family: MIT
license_file: LICENSE
summary: Deep Learning Library for Theano and TensorFlow
description: |
Keras is a minimalist, highly modular neural networks library
written in Python and capable on running on top of either
TensorFlow or Theano. It was developed with a focus on enabling
fast experimentation. Being able to go from idea to result with
the least possible delay is key to doing good research.
doc_url: http://keras.io
dev_url: https://github.com/fchollet/keras
extra:
recipe-maintainers: amohammadi
@echo ON
setlocal enabledelayedexpansion
curl -L -O "https://github.com/opencv/opencv_contrib/archive/%PKG_VERSION%.tar.gz"
%PYTHON% -c "import tarfile, os; tar = tarfile.open(os.environ['PKG_VERSION'] + '.tar.gz', 'r:gz'); tar.extractall(); tar.close()"
%PYTHON% -c "import hashlib, os; print(hashlib.sha256(open(os.environ['PKG_VERSION'] + '.tar.gz', 'rb').read()).hexdigest())" > sha256.out
SET /p CONTRIB_SHA256=<sha256.out
if NOT "%CONTRIB_SHA256%" == "ef2084bcd4c3812eb53c21fa81477d800e8ce8075b68d9dedec90fef395156e5" (
exit 1
)
rem Patches apply only to opencv_contrib so we have to apply them now (after source download above)
rem Fixed: https://github.com/opencv/opencv_contrib/blob/6cd8e9f556c8c55c05178dec05d5277ae00020d9/modules/tracking/src/trackerKCF.cpp#L669
git apply --whitespace=fix -p0 "%RECIPE_DIR%\kcftracker.patch"
rem Fixed: https://github.com/opencv/opencv_contrib/blob/master/modules/text/src/ocr_beamsearch_decoder.cpp#L569
git apply --whitespace=fix -p0 "%RECIPE_DIR%\ocr_beamsearch_decoder.patch"
rem Fixed: https://github.com/opencv/opencv_contrib/blob/master/modules/text/src/ocr_hmm_decoder.cpp#L985
git apply --whitespace=fix -p0 "%RECIPE_DIR%\ocr_hmm_decoder.patch"
rem Fixed: https://github.com/opencv/opencv_contrib/blob/master/modules/dpm/src/dpm_nms.cpp#L43
git apply --whitespace=fix -p0 "%RECIPE_DIR%\dpm.patch"
mkdir build
cd build
if "%PY3K%" == "0" (
echo "Copying stdint.h for windows"
copy "%LIBRARY_INC%\stdint.h" %SRC_DIR%\modules\calib3d\include\stdint.h
copy "%LIBRARY_INC%\stdint.h" %SRC_DIR%\modules\videoio\include\stdint.h
copy "%LIBRARY_INC%\stdint.h" %SRC_DIR%\modules\highgui\include\stdint.h
)
for /F "tokens=1,2 delims=. " %%a in ("%PY_VER%") do (
set "PY_MAJOR=%%a"
set "PY_MINOR=%%b"
)
set PY_LIB=python%PY_MAJOR%%PY_MINOR%.lib
:: CMake/OpenCV like Unix-style paths for some reason.
set UNIX_PREFIX=%PREFIX:\=/%
set UNIX_LIBRARY_PREFIX=%LIBRARY_PREFIX:\=/%
set UNIX_LIBRARY_BIN=%LIBRARY_BIN:\=/%
set UNIX_SP_DIR=%SP_DIR:\=/%
set UNIX_SRC_DIR=%SRC_DIR:\=/%
cmake .. -LAH -G "NMake Makefiles" ^
-DWITH_EIGEN=1 ^
-DBUILD_TESTS=0 ^
-DBUILD_DOCS=0 ^
-DBUILD_PERF_TESTS=0 ^
-DBUILD_ZLIB=0 ^
-DBUILD_opencv_bioinspired=0 ^
-DBUILD_TIFF=0 ^
-DBUILD_PNG=0 ^
-DBUILD_OPENEXR=1 ^
-DBUILD_JASPER=1 ^
-DBUILD_JPEG=0 ^
-DWITH_CUDA=0 ^
-DWITH_OPENCL=0 ^
-DWITH_OPENNI=0 ^
-DWITH_FFMPEG=0 ^
-DWITH_VTK=0 ^
-DINSTALL_C_EXAMPLES=0 ^
-DOPENCV_EXTRA_MODULES_PATH=%UNIX_SRC_DIR%/opencv_contrib-%PKG_VERSION%/modules ^
-DCMAKE_BUILD_TYPE="Release" ^
-DCMAKE_INSTALL_PREFIX=%UNIX_LIBRARY_PREFIX% ^
-DEXECUTABLE_OUTPUT_PATH=%UNIX_LIBRARY_BIN% ^
-DLIBRARY_OUTPUT_PATH=%UNIX_LIBRARY_BIN% ^
-DPYTHON_EXECUTABLE="" ^
-DPYTHON_INCLUDE_DIR="" ^
-DPYTHON_PACKAGES_PATH="" ^
-DPYTHON_LIBRARY="" ^
-DPYTHON_NUMPY_INCLUDE_DIRS="" ^
-DBUILD_opencv_python2=0 ^
-DPYTHON2_EXECUTABLE="" ^
-DPYTHON2_INCLUDE_DIR="" ^
-DPYTHON2_NUMPY_INCLUDE_DIRS="" ^
-DPYTHON2_LIBRARY="" ^
-DPYTHON2_PACKAGES_PATH="" ^
-DBUILD_opencv_python3=0 ^
-DPYTHON3_EXECUTABLE="" ^
-DPYTHON3_INCLUDE_DIR="" ^
-DPYTHON3_NUMPY_INCLUDE_DIRS="" ^
-DPYTHON3_LIBRARY="" ^
-DPYTHON3_PACKAGES_PATH=""
if errorlevel 1 exit 1
cmake .. -LAH -G "NMake Makefiles" ^
-DPYTHON_EXECUTABLE=%UNIX_PREFIX%/python ^
-DPYTHON_INCLUDE_DIR=%UNIX_PREFIX%/include ^
-DPYTHON_PACKAGES_PATH=%UNIX_SP_DIR% ^
-DPYTHON_LIBRARY=%UNIX_PREFIX%/libs/%PY_LIB% ^
-DPYTHON_NUMPY_INCLUDE_DIRS=%UNIX_SP_DIR%/numpy/core/include ^
-DBUILD_opencv_python%PY_MAJOR%=1 ^
-DPYTHON%PY_MAJOR%_EXECUTABLE=%UNIX_PREFIX%/python ^
-DPYTHON%PY_MAJOR%_INCLUDE_DIR=%UNIX_PREFIX%/include ^
-DPYTHON%PY_MAJOR%_NUMPY_INCLUDE_DIRS=%UNIX_SP_DIR%/numpy/core/include ^
-DPYTHON%PY_MAJOR%_LIBRARY=%UNIX_PREFIX%/libs/%PY_LIB% ^
-DPYTHON%PY_MAJOR%_PACKAGES_PATH=%UNIX_SP_DIR%
if errorlevel 1 exit 1
cmake --build . --target INSTALL --config Release
if errorlevel 1 exit 1
if "%ARCH%" == "32" ( set "OPENCV_ARCH=86")
if "%ARCH%" == "64" ( set "OPENCV_ARCH=64")
robocopy %LIBRARY_PREFIX%\x%OPENCV_ARCH%\vc%VS_MAJOR%\ %LIBRARY_PREFIX%\ *.* /E
if %ERRORLEVEL% GEQ 8 exit 1
rem Remove files installed in the wrong locations
rd /S /Q "%LIBRARY_BIN%\Release"
rd /S /Q "%LIBRARY_PREFIX%\x%OPENCV_ARCH%"
rem RD is a bit horrible and doesn't return an errorcode properly, so
rem the errorcode from robocopy is propagated (which is non-zero), so we
rem forcibly exit 0 here
exit 0
#!/bin/bash
SHORT_OS_STR=$(uname -s)
if [ "${SHORT_OS_STR:0:5}" == "Linux" ]; then
SHLIB_EXT=".so"
OPENMP="-DWITH_OPENMP=1"
fi
if [ "${SHORT_OS_STR}" == "Darwin" ]; then
SHLIB_EXT=".dylib"
OPENMP=""
fi
INC_PYTHON="${PREFIX}/include/python${PY_VER}"
curl -L -O "https://github.com/opencv/opencv_contrib/archive/$PKG_VERSION.tar.gz"
test `openssl sha256 $PKG_VERSION.tar.gz | awk '{print $2}'` = "ef2084bcd4c3812eb53c21fa81477d800e8ce8075b68d9dedec90fef395156e5"
tar -zxf $PKG_VERSION.tar.gz
mkdir build
cd build
# For some reason OpenCV just won't see hdf5.h without updating the CFLAGS
export CFLAGS="$CFLAGS -I$PREFIX/include"
export CXXFLAGS="$CXXFLAGS -I$PREFIX/include"
cmake .. -LAH \
$OPENMP \
-DWITH_EIGEN=1 \
-DBUILD_TESTS=0 \
-DBUILD_DOCS=0 \
-DBUILD_PERF_TESTS=0 \
-DBUILD_ZLIB=0 \
-DZLIB_LIBRARY_RELEASE=$PREFIX/lib/libz${SHLIB_EXT} \
-DZLIB_INCLUDE_DIR=$PREFIX/include \
-DHDF5_z_LIBRARY_RELEASE=$PREFIX/lib/libz${SHLIB_EXT} \
-DBUILD_TIFF=0 \
-DBUILD_PNG=0 \
-DBUILD_OPENEXR=1 \
-DBUILD_JPEG=0 \
-DWITH_CUDA=0 \
-DWITH_GTK=0 \
-DWITH_OPENCL=0 \
-DWITH_OPENNI=0 \
-DWITH_FFMPEG=0 \
-DWITH_MATLAB=0 \
-DWITH_VTK=0 \
-DINSTALL_C_EXAMPLES=0 \
-DOPENCV_EXTRA_MODULES_PATH="../opencv_contrib-$PKG_VERSION/modules" \
-DCMAKE_BUILD_TYPE="Release" \
-DCMAKE_SKIP_RPATH:bool=ON \
-DCMAKE_INSTALL_PREFIX=$PREFIX \
-DBUILD_opencv_python2=0 \
-DPYTHON2_EXECUTABLE="" \
-DPYTHON2_INCLUDE_DIR="" \
-DPYTHON2_NUMPY_INCLUDE_DIRS="" \
-DPYTHON2_LIBRARY="" \
-DPYTHON_INCLUDE_DIR2="" \
-DPYTHON2_PACKAGES_PATH="" \
-DBUILD_opencv_python3=0 \
-DPYTHON3_EXECUTABLE="" \
-DPYTHON3_NUMPY_INCLUDE_DIRS="" \
-DPYTHON3_INCLUDE_DIR="" \
-DPYTHON3_LIBRARY="" \
-DPYTHON3_PACKAGES_PATH=""
IFS='.' read -ra PY_VER_ARR <<< "${PY_VER}"
PY_MAJOR="${PY_VER_ARR[0]}"
if [ $PY3K -eq 1 ]; then
LIB_PYTHON="${PREFIX}/lib/libpython${PY_VER}m${SHLIB_EXT}"
INC_PYTHON="$PREFIX/include/python${PY_VER}m"
else
LIB_PYTHON="${PREFIX}/lib/libpython${PY_VER}${SHLIB_EXT}"
INC_PYTHON="$PREFIX/include/python${PY_VER}"
fi
cmake .. -LAH \
-DPYTHON_EXECUTABLE="${PYTHON}" \
-DPYTHON_INCLUDE_DIR="${INC_PYTHON}" \
-DPYTHON_LIBRARY="${LIB_PYTHON}" \
-DPYTHON_PACKAGES_PATH="${SP_DIR}" \
-DBUILD_opencv_python${PY_MAJOR}=1 \
-DPYTHON${PY_MAJOR}_EXECUTABLE=${PYTHON} \
-DPYTHON${PY_MAJOR}_INCLUDE_DIR=${INC_PYTHON} \
-DPYTHON${PY_MAJOR}_NUMPY_INCLUDE_DIRS=${SP_DIR}/numpy/core/include \
-DPYTHON${PY_MAJOR}_LIBRARY=${LIB_PYTHON} \
-DPYTHON${PY_MAJOR}_PACKAGES_PATH=${SP_DIR}
make -j6
make install
--- modules/videoio/src/cap_mjpeg_decoder.cpp
+++ modules/videoio/src/cap_mjpeg_decoder.cpp
@@ -790,7 +790,7 @@
result.reserve(chunk.m_size);
result.resize(chunk.m_size);
- m_file_stream.read(result.data(), chunk.m_size);
+ m_file_stream.read(&result.front(), chunk.m_size);
return result;
}
--- opencv_contrib-3.1.0\modules\dpm\src\dpm_nms.cpp
+++ opencv_contrib-3.1.0\modules\dpm\src\dpm_nms.cpp
@@ -40,6 +40,7 @@
//M*/
#include "dpm_nms.hpp"
+#include <algorithm>
using namespace std;
--- opencv_contrib-3.1.0/modules/tracking/src/trackerKCF.cpp
+++ opencv_contrib-3.1.0/modules/tracking/src/trackerKCF.cpp
@@ -666,7 +666,7 @@
for(int i=0;i<patch_data.rows;i++){
for(int j=0;j<patch_data.cols;j++){
pixel=patch_data.at<Vec3b>(i,j);
- index=(unsigned)(floor(pixel[2]/8)+32*floor(pixel[1]/8)+32*32*floor(pixel[0]/8));
+ index=(unsigned)(floor((float)pixel[2]/8)+32*floor((float)pixel[1]/8)+32*32*floor((float)pixel[0]/8));
//copy the values
for(int _k=0;_k<10;_k++){
{% set version = "3.1.0" %}
package:
name: opencv
version: {{ version }}
source:
fn: opencv-{{ version }}.tar.gz
url: https://github.com/opencv/opencv/archive/{{ version }}.tar.gz
sha256: f00b3c4f42acda07d89031a2ebb5ebe390764a133502c03a511f67b78bbd4fbf
patches:
# Fixed: https://github.com/opencv/opencv/blob/master/modules/videoio/src/cap_mjpeg_decoder.cpp#L793
- cap_mpjpeg_decoder.patch # [win]
build:
number: 4
skip: true # [linux]
requirements:
build:
- python
- toolchain {{ toolchain }}
# For sha256 comparisons of opencv_contrib
- openssl 1.0.* # [unix]
# For downloading opencv_contrib
- curl
# For applying patches
- git # [win]
- cmake
- numpy {{ numpy }}
- hdf5 {{ hdf5 }} # [unix]
- eigen 3.*
- zlib {{ zlib }}
- jpeg {{ jpeg }}
- libtiff {{ libtiff }}
- libpng {{ libpng }}
- msinttypes # [win and py<35]
- gcc {{ gcc }} # [linux]
- libgcc {{ libgcc }} # [linux]
run:
- python
- {{ pin_compatible('numpy', min_pin='x.x', max_pin='x.x') }}
- hdf5 # [unix]
- zlib
- libpng
- jpeg
- libtiff
- libgcc # [linux]
test:
imports:
- cv2
- cv2.xfeatures2d
commands:
# Verify dynamic libraries.
# "bioinspired", Not working in 3.1.0
{% set opencv_libs = [
"xfeatures2d",
"ximgproc",
"xobjdetect",
"xphoto",
"aruco",
"bgsegm",
"calib3d",
"ccalib",
"core",
"datasets",
"dnn",
"dpm",
"face",
"features2d",
"flann",
"fuzzy",
"highgui",
"imgcodecs",
"imgproc",
"line_descriptor",
"ml",
"objdetect",
"optflow",
"photo",
"plot",
"reg",
"rgbd",
"saliency",
"shape",
"stereo",
"stitching",
"structured_light",
"superres",
"surface_matching",
"text",
"tracking",
"video",
"videoio",
"videostab"
] %}
{% for each_opencv_lib in opencv_libs %}
- test -f $PREFIX/lib/libopencv_{{ each_opencv_lib }}.dylib # [osx]
- test -f $PREFIX/lib/libopencv_{{ each_opencv_lib }}.so # [linux]
- if not exist %PREFIX%\\Library\\bin\\opencv_{{ each_opencv_lib }}310.dll exit 1 # [win]
{% endfor %}
about:
home: http://opencv.org/
license: BSD 3-clause
summary: Computer vision and machine learning software library.
extra:
recipe-maintainers:
- jakirkham
- msarahan
- patricksnape
--- opencv_contrib-3.1.0/modules/text/src/ocr_beamsearch_decoder.cpp
+++ opencv_contrib-3.1.0/modules/text/src/ocr_beamsearch_decoder.cpp
@@ -566,7 +566,7 @@
nr_feature = weights.rows;
nr_class = weights.cols;
- patch_size = (int)sqrt(kernels.cols);
+ patch_size = (int)sqrt((float)kernels.cols);
window_size = 4*patch_size;
step_size = 4;
quad_size = 12;
--- opencv_contrib-3.1.0/modules/text/src/ocr_hmm_decoder.cpp
+++ opencv_contrib-3.1.0/modules/text/src/ocr_hmm_decoder.cpp
@@ -982,7 +982,7 @@
nr_feature = weights.rows;
nr_class = weights.cols;
- patch_size = (int)sqrt(kernels.cols);
+ patch_size = (int)sqrt((float)kernels.cols);
// algorithm internal parameters
window_size = 32;
num_quads = 25;
g++ $RECIPE_DIR/test.cpp -I$PREFIX/include -L$PREFIX/lib -o test
[ $(./test) != "$PKG_VERSION" ] && exit 1
[ $($PYTHON -c 'import cv2; print(cv2.__version__)') != "$PKG_VERSION" ] && exit 1
#include <opencv/cv.h>
#include <iostream>
int main()
{
std::cout << CV_VERSION << std::endl;
return 0;
}
#!/bin/bash
if [[ "$(uname)" == "Darwin" ]]; then
# for Mac OSX
export CC=gcc
export CXX=g++
export MACOSX_VERSION_MIN="10.9"
export MACOSX_DEPLOYMENT_TARGET="${MACOSX_VERSION_MIN}"
export CMAKE_OSX_DEPLOYMENT_TARGET="${MACOSX_VERSION_MIN}"
export CFLAGS="${CFLAGS} -mmacosx-version-min=${MACOSX_VERSION_MIN}"
export CXXFLAGS="${CXXFLAGS} -mmacosx-version-min=${MACOSX_VERSION_MIN}"
export LDFLAGS="${LDFLAGS} -headerpad_max_install_names"
export LDFLAGS="${LDFLAGS} -mmacosx-version-min=${MACOSX_VERSION_MIN}"
export LINKFLAGS="${LDFLAGS}"
# tell boost not to cxx11 refrenes
export CPPFLAGS="${CPPFLAGS} -DBOOST_NO_CXX11_RVALUE_REFERENCES"
export CFLAGS="${CFLAGS} -stdlib=libstdc++"
export CXXFLAGS="${CXXFLAGS} -stdlib=libstdc++"
export LDFLAGS="${LDFLAGS} -stdlib=libstdc++"
elif [[ "$(uname)" == "Linux" ]]; then
# for Linux
export CC=gcc
export CXX=g++
export CFLAGS="${CFLAGS}"
export LDFLAGS="${LDFLAGS}"
export LINKFLAGS="${LDFLAGS}"
else
echo "This system is unsupported by the toolchain."
exit 1
fi
if [ -n "${CONDA_BUILD}" ]; then
export CFLAGS="${CFLAGS} -m${ARCH}"
export CXXFLAGS="${CXXFLAGS} -m${ARCH}"
fi
export CFLAGS="${CFLAGS} -D_GLIBCXX_USE_CXX11_ABI=0"
export CXXFLAGS="${CXXFLAGS} -D_GLIBCXX_USE_CXX11_ABI=0"
export CFLAGS="${CFLAGS} -O3 -g -DNDEBUG -mtune=native"
export CXXFLAGS="${CXXFLAGS} -O3 -g -DNDEBUG -mtune=native"
# GCC 4.8.5 does not support the following command:
export CXXFLAGS=${CXXFLAGS/-Wabi=2/}
setlocal EnableDelayedExpansion
:: Copy the [de]activate scripts to %LIBRARY_PREFIX%\etc\conda\[de]activate.d.
:: This will allow them to be run on environment activation.
FOR %%F IN (activate deactivate) DO (
IF NOT EXIST %LIBRARY_PREFIX%\etc\conda\%%F.d MKDIR %LIBRARY_PREFIX%\etc\conda\%%F.d
COPY %RECIPE_DIR%/%%F.bat %LIBRARY_PREFIX%\etc\conda\%%F.d\toolchain_%%F.bat
)
#!/bin/bash
# Copy the [de]activate scripts to $PREFIX/etc/conda/[de]activate.d.
# This will allow them to be run on environment activation.
for CHANGE in "activate" "deactivate"
do
mkdir -p "${PREFIX}/etc/conda/${CHANGE}.d"
cp "${RECIPE_DIR}/${CHANGE}.sh" "${PREFIX}/etc/conda/${CHANGE}.d/toolchain_${CHANGE}.sh"
done
#!/bin/bash
if [[ "$(uname)" == "Darwin" ]]; then
# for Mac OSX
unset CC
unset CXX
unset MACOSX_VERSION_MIN
unset MACOSX_DEPLOYMENT_TARGET
unset CMAKE_OSX_DEPLOYMENT_TARGET
unset CFLAGS
unset CXXFLAGS
unset LDFLAGS
unset LINKFLAGS
elif [[ "$(uname)" == "Linux" ]]; then
# for Linux
unset CC
unset CXX
unset CFLAGS
unset CXXFLAGS
unset LDFLAGS
unset LINKFLAGS
else
echo "This system is unsupported by our toolchain."
exit 1
fi
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment