diff --git a/conda.recipe/build.sh b/conda.recipe/build.sh deleted file mode 100644 index 6bec7bb00c2c226e15615907839aae8cc68ccf31..0000000000000000000000000000000000000000 --- a/conda.recipe/build.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash - - -# install rsb-python -# Trick conda build to let rsb-python installation run -# The url to spread in there is not used, but will still raise a RuntimeError if -# not tricked like this... -#unset CONDA_BUILD -#pip install --no-dependencies rsb-python -#set CONDA_BUILD - -# Since we setup subfolders for ipaaca and proto, we want to step into the ipaaca folder here -cd ipaaca -echo "Installing ipaaca using setup.py" -python setup.py install --single-version-externally-managed --record=record.txt diff --git a/conda.recipe/cpp/build.sh b/conda.recipe/cpp/build.sh new file mode 100644 index 0000000000000000000000000000000000000000..5b6408edf500ab9d3b213cd57e4c81316b791b16 --- /dev/null +++ b/conda.recipe/cpp/build.sh @@ -0,0 +1,29 @@ +#!/bin/bash + +INCLUDE_PATH="${PREFIX}/include" +LIBRARY_PATH="${PREFIX}/lib" + +export CMAKE_INCLUDE_PATH=$INCLUDE_PATH +export CMAKE_LIBRARY_PATH=$LIBRARY_PATH + +if [[ "$(uname)" == "Linux" ]]; then + # Linus needs this lrt flag + export LDFLAGS="$LDFLAGS -lrt" +elif [[ "$(uname)" == "Darwin" ]]; then + echo "mac" +fi + +# build protobuf files +mkdir -p ipaaca-cpp/build/ipaaca +cd proto +protoc ipaaca.proto --cpp_out=../ipaaca-cpp/build/ipaaca + +# build ipaaca cpp +cd ../ipaaca-cpp/build +export VERBOSE=1 + +cmake .. -DBOOST_INCLUDEDIR=${INCLUDE_PATH} -DBOOST_LIBRARYDIR=${LIBRARY_PATH} +echo "Finished cmake, trying build now" +make +make install DESTDIR=${PREFIX} +cd ../../.. \ No newline at end of file diff --git a/conda.recipe/cpp/meta.yaml b/conda.recipe/cpp/meta.yaml new file mode 100644 index 0000000000000000000000000000000000000000..993ae6d240141ad117eab626cacacbe2f7c75a22 --- /dev/null +++ b/conda.recipe/cpp/meta.yaml @@ -0,0 +1,29 @@ +package: + name: ipaaca-cpp + version: "0.1.0" + +source: + - path: ../../ipaacalib/cpp/ + folder: ipaaca-cpp + - path: ../../ipaacalib/proto/ + folder: proto + +build: + number: 1 + +requirements: + build: + - {{ compiler('cxx') }} 7.3 # [linux] + - cmake >=3.10 + + host: + - libprotobuf + - mosquitto + - libboost +# - openssl 1.0.* + + run: + - mosquitto + - libprotobuf + - libboost +# - openssl 1.0.* diff --git a/conda.recipe/meta.yaml b/conda.recipe/meta.yaml index 9b728a6a7a8a032d7b5393b251e764c0fd5b1931..70b896df175ca43f1de50329033a319f55287008 100644 --- a/conda.recipe/meta.yaml +++ b/conda.recipe/meta.yaml @@ -2,24 +2,33 @@ package: name: ipaaca version: "0.1.0" -source: - - path: ../ipaacalib/python - folder: ipaaca - - path: ../ipaacalib/proto - folder: proto +# source: +# - path: ../ipaacalib/cpp/ +# folder: ipaaca-cpp +# - path: ../ipaacalib/python/ +# folder: ipaaca-py +# - path: ../ipaacalib/proto/ +# folder: proto build: number: 1 -requirements: - build: - - python - - pip - - setuptools +run: + - ipaaca-cpp + - ipaaca-py - run: - - python - - mosquitto - - protobuf - - paho-mqtt +# requirements: +# build: +# - {{ compiler('cxx') }} 7.3 # [linux] +# - cmake >=3.10 +# host: +# - libprotobuf +# - mosquitto +# - libboost +# - openssl 1.0.* +# run: +# - mosquitto +# - libprotobuf +# - libboost +# - openssl 1.0.* diff --git a/conda.recipe/python/build.sh b/conda.recipe/python/build.sh new file mode 100644 index 0000000000000000000000000000000000000000..549a6f59d9a59b98e01dea1a25858f472062ba0d --- /dev/null +++ b/conda.recipe/python/build.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +# Since we setup subfolders for ipaaca and proto, we want to step into the ipaaca folder here +# Note: setup.py assumes protoc file to be at ../proto from here and we do not want to change +# that for easier manual installation +cd ipaaca-py +echo "Installing ipaaca using setup.py" +#python -m pip install . -vv +python setup.py install --single-version-externally-managed --record=record.txt \ No newline at end of file diff --git a/conda.recipe/python/meta.yaml b/conda.recipe/python/meta.yaml new file mode 100644 index 0000000000000000000000000000000000000000..dfcdbf80a708513c31caf65c40d1ca55836f8741 --- /dev/null +++ b/conda.recipe/python/meta.yaml @@ -0,0 +1,29 @@ +package: + name: ipaaca-py + version: "0.1.0" + +source: + - path: ../../ipaacalib/python + folder: ipaaca-py + - path: ../../ipaacalib/proto + folder: proto + +build: + noarch: python + number: 1 +# script: "{{ PYTHON }} -m pip install ipaaca-py/ -vv" + + +requirements: + build: + - python + - pip + - setuptools + - libprotobuf + + run: + - python + - mosquitto + - paho-mqtt + - protobuf +