Add conda recipe
This commit is contained in:
committed by
Bastian Bloessl
parent
7447fc065a
commit
a15d6bb34f
@@ -0,0 +1,29 @@
|
||||
setlocal EnableDelayedExpansion
|
||||
@echo on
|
||||
|
||||
:: Make a build folder and change to it
|
||||
cmake -E make_directory buildconda
|
||||
cd buildconda
|
||||
|
||||
:: configure
|
||||
cmake -G "Ninja" ^
|
||||
-DCMAKE_BUILD_TYPE:STRING=Release ^
|
||||
-DCMAKE_INSTALL_PREFIX:PATH="%LIBRARY_PREFIX%" ^
|
||||
-DCMAKE_PREFIX_PATH:PATH="%LIBRARY_PREFIX%" ^
|
||||
-DGR_PYTHON_DIR:PATH="%SP_DIR%" ^
|
||||
-DENABLE_DOXYGEN=OFF ^
|
||||
-DENABLE_TESTING=ON ^
|
||||
..
|
||||
if errorlevel 1 exit 1
|
||||
|
||||
:: build
|
||||
cmake --build . --config Release -- -j%CPU_COUNT%
|
||||
if errorlevel 1 exit 1
|
||||
|
||||
:: install
|
||||
cmake --build . --config Release --target install
|
||||
if errorlevel 1 exit 1
|
||||
|
||||
:: test
|
||||
ctest --build-config Release --output-on-failure --timeout 120 -j%CPU_COUNT%
|
||||
if errorlevel 1 exit 1
|
||||
@@ -0,0 +1,22 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -ex
|
||||
|
||||
cmake -E make_directory buildconda
|
||||
cd buildconda
|
||||
|
||||
cmake_config_args=(
|
||||
-DCMAKE_BUILD_TYPE=Release
|
||||
-DCMAKE_INSTALL_PREFIX=$PREFIX
|
||||
-DLIB_SUFFIX=""
|
||||
-DENABLE_DOXYGEN=OFF
|
||||
-DENABLE_TESTING=ON
|
||||
)
|
||||
|
||||
cmake ${CMAKE_ARGS} -G "Ninja" .. "${cmake_config_args[@]}"
|
||||
cmake --build . --config Release -- -j${CPU_COUNT}
|
||||
cmake --build . --config Release --target install
|
||||
|
||||
if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" != "1" || "${CROSSCOMPILING_EMULATOR}" != "" ]]; then
|
||||
ctest --build-config Release --output-on-failure --timeout 120 -j${CPU_COUNT}
|
||||
fi
|
||||
@@ -0,0 +1,14 @@
|
||||
# this is the channel and label where packages will be uploaded to if enabled
|
||||
# (see ../README.md)
|
||||
channel_targets:
|
||||
- gnuradio main
|
||||
# override the conda-forge pin for gnuradio-core by uncommenting
|
||||
# and specifying a different version here
|
||||
#gnuradio_core:
|
||||
#- "3.10.1"
|
||||
gnuradio_extra_pin:
|
||||
# always leave one entry with the empty string
|
||||
- ""
|
||||
# add version strings here like to get builds for versions other than
|
||||
# the conda-forge-wide default or version specified above for gnuradio_core
|
||||
#- "3.9.5"
|
||||
@@ -0,0 +1,88 @@
|
||||
{% set oot_name = "foo" %}
|
||||
{% set name = "gnuradio-" + oot_name %}
|
||||
# Set package version from cleaned up git tags if possible,
|
||||
# otherwise fall back to date-based version.
|
||||
{% set tag_version = environ.get("GIT_DESCRIBE_TAG", "")|string|replace("-","_")|replace("v","")|replace("git","") %}
|
||||
{% set post_commit = environ.get("GIT_DESCRIBE_NUMBER", 0)|string %}
|
||||
{% set hash = environ.get("GIT_DESCRIBE_HASH", "local")|string %}
|
||||
{% set fallback_version = "0.0.0.{0}.dev+g{1}".format(datetime.datetime.now().strftime("%Y%m%d"), environ.get("GIT_FULL_HASH", "local")[:9]) %}
|
||||
{% set version = (tag_version if post_commit == "0" else "{0}.post{1}+{2}".format(tag_version, post_commit, hash)) if tag_version else fallback_version %}
|
||||
|
||||
package:
|
||||
name: {{ name|lower }}
|
||||
version: {{ version }}
|
||||
|
||||
source:
|
||||
# use local path or git repository depending on if the build is local or done on CI
|
||||
path: "../.." # [not os.environ.get("CI")]
|
||||
git_url: {{ environ.get('FEEDSTOCK_ROOT', "../..") }} # [os.environ.get("CI")]
|
||||
|
||||
build:
|
||||
number: 0
|
||||
run_exports:
|
||||
- {{ pin_subpackage('gnuradio-foo', max_pin='x.x.x') }}
|
||||
|
||||
requirements:
|
||||
build:
|
||||
- {{ compiler("c") }}
|
||||
- {{ compiler("cxx") }}
|
||||
- cmake
|
||||
- git
|
||||
- ninja
|
||||
- pkg-config
|
||||
# cross-compilation requirements
|
||||
- python # [build_platform != target_platform]
|
||||
- cross-python_{{ target_platform }} # [build_platform != target_platform]
|
||||
- numpy # [build_platform != target_platform]
|
||||
- pybind11 # [build_platform != target_platform]
|
||||
|
||||
host:
|
||||
- boost-cpp
|
||||
- gmp # [linux]
|
||||
# the following two entries are for generating builds against specific GR versions
|
||||
- gnuradio-core # [not gnuradio_extra_pin]
|
||||
- gnuradio-core {{ gnuradio_extra_pin }}.* # [gnuradio_extra_pin]
|
||||
- pip # [win]
|
||||
- pybind11
|
||||
- python
|
||||
- numpy
|
||||
- uhd
|
||||
|
||||
run:
|
||||
- boost-cpp
|
||||
- numpy
|
||||
- python
|
||||
|
||||
test:
|
||||
commands:
|
||||
# verify that (some) headers get installed
|
||||
- test -f $PREFIX/include/{{ oot_name }}/api.h # [not win]
|
||||
- if not exist %PREFIX%\\Library\\include\\{{ oot_name }}\\api.h exit 1 # [win]
|
||||
|
||||
# verify that libraries get installed
|
||||
- test -f $PREFIX/lib/lib{{ name }}${SHLIB_EXT} # [not win]
|
||||
- if not exist %PREFIX%\\Library\\bin\\{{ name }}.dll exit 1 # [win]
|
||||
- if not exist %PREFIX%\\Library\\lib\\{{ name }}.lib exit 1 # [win]
|
||||
|
||||
# verify that (some) GRC blocks get installed
|
||||
{% set blocks = ["burst_tagger", "channel_model", "packet_dropper", "packet_pad", "packet_pad2", "pad_tagged_stream", "periodic_msg_source", "random_periodic_msg_source", "selector", "valve", "wireshark_connector"] %}
|
||||
{% for block in blocks %}
|
||||
- test -f $PREFIX/share/gnuradio/grc/blocks/{{ oot_name }}_{{ block }}.block.yml # [not win]
|
||||
- if not exist %PREFIX%\\Library\\share\\gnuradio\\grc\\blocks\\{{ oot_name }}_{{ block }}.block.yml exit 1 # [win]
|
||||
{% endfor %}
|
||||
|
||||
imports:
|
||||
# verify that the python module imports
|
||||
- {{ oot_name }}
|
||||
|
||||
about:
|
||||
home: https://github.com/bastibl/gr-foo
|
||||
license: GPL-3.0-or-later
|
||||
license_file: LICENSE
|
||||
summary: Collection of GNU Radio blocks useful to other modules
|
||||
description: >
|
||||
This is a collection of custom blocks that are not directly associated with
|
||||
a project. For sample applications see:
|
||||
|
||||
* https://github.com/bastibl/gr-ieee802-11
|
||||
* https://github.com/bastibl/gr-ieee802-15-4
|
||||
Reference in New Issue
Block a user