Add conda recipe
This commit is contained in:
committed by
Bastian Bloessl
parent
fe725a1c6d
commit
29ca2bde94
@@ -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,16 @@
|
||||
channel_sources:
|
||||
- conda-forge,ryanvolz
|
||||
# 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,93 @@
|
||||
{% set oot_name = "ieee802_11" %}
|
||||
{% 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
|
||||
|
||||
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
|
||||
- fmt
|
||||
- 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
|
||||
- spdlog
|
||||
- volk
|
||||
|
||||
run:
|
||||
- gnuradio-foo
|
||||
- numpy
|
||||
- pyopengl
|
||||
- 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 = ["chunks_to_symbols", "decode_mac", "ether_encap", "extract_csi", "frame_equalizer", "mac", "mapper", "parse_mac", "sync_long", "sync_short"] %}
|
||||
{% 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-ieee802-11
|
||||
license: GPL-3.0-or-later
|
||||
license_file: LICENSE
|
||||
summary: IEEE 802.11 a/g/p Transceiver for GNU Radio
|
||||
description: >
|
||||
This an IEEE 802.11 a/g/p transceiver for GNU Radio that is fitted for
|
||||
operation with Ettus N210s and B210s. Interoperability was tested with many
|
||||
off-the-shelf WiFi cards and IEEE 802.11p prototypes. The code can also be
|
||||
used in simulations.
|
||||
|
||||
Example gnuradio-companion flowgraphs are installed with the package and
|
||||
can be found in:
|
||||
- (Linux/macOS) `$CONDA_PREFIX/share/gr-ieee802_11/examples`
|
||||
- (Windows) `%CONDA_PREFIX%\share\gr-ieee802_11\examples`
|
||||
Reference in New Issue
Block a user