Skip to content

Commit

Permalink
Merge pull request #26447 from Tobias-Fischer/patch-30
Browse files Browse the repository at this point in the history
  • Loading branch information
xhochy committed Jun 16, 2024
2 parents fe0e496 + c9196d0 commit 8c9b9e3
Show file tree
Hide file tree
Showing 10 changed files with 426 additions and 0 deletions.
21 changes: 21 additions & 0 deletions recipes/charidotella/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2024 International Centre for Neuromorphic Systems

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
54 changes: 54 additions & 0 deletions recipes/charidotella/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{% set name = "charidotella" %}
{% set version = "3.1.0" %}

package:
name: {{ name|lower }}
version: {{ version }}

source:
url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/charidotella-{{ version }}.tar.gz
sha256: 1e85334280d7d9671f0b4b5c99e4a5d185180d441e3f169c64d8a0de279eff77
patches:
- unvendor_command_line_tools.patch

build:
noarch: python
script: {{ PYTHON }} -m pip install . -vv
number: 0

requirements:
host:
- python >=3.8
- setuptools
- wheel
- pip
run:
- python >=3.8
- command_line_tools
- aedat
- colourtime
- coolname
- event-stream
- jsonschema
- matplotlib-base
- pillow >=9.1
- scipy
- toml

test:
imports:
- charidotella
commands:
- pip check
requires:
- pip

about:
home: https://github.com/neuromorphicsystems/charidotella
summary: Charidotella is a toolbox to organise and visualise Event Stream (.es) recordings
license: MIT
license_file: LICENSE

extra:
recipe-maintainers:
- Tobias-Fischer
92 changes: 92 additions & 0 deletions recipes/charidotella/unvendor_command_line_tools.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
diff --git a/setup.py b/setup.py
index 41b12c0..fbf0699 100644
--- a/setup.py
+++ b/setup.py
@@ -12,72 +12,13 @@
with open(dirname / "README.md") as file:
long_description = file.read()

-executables = ["es_to_frames", "event_rate", "size", "spatiospectrogram", "spectrogram"]
-
if not "-h" in sys.argv and not "--help" in sys.argv:
- manifest_lines = [
- "include command_line_tools/source/*.hpp",
- "include command_line_tools/source/*.cpp",
- "include command_line_tools/premake4.lua",
- "include command_line_tools/third_party/pontella/source/pontella.hpp",
- "include command_line_tools/third_party/sepia/source/sepia.hpp",
- "include command_line_tools/third_party/tarsier/source/replicate.hpp",
- "include command_line_tools/third_party/tarsier/source/stitch.hpp",
- "include command_line_tools/third_party/stb_truetype.hpp",
- "include command_line_tools/third_party/monaco.ttf.base64.hpp",
- "include command_line_tools/third_party/lodepng/lodepng.h",
- "include command_line_tools/third_party/lodepng/lodepng.cpp",
- ]
+ manifest_lines = []
if "sdist" in sys.argv:
manifest_lines.append(f"include configuration-schema.json")
else:
shutil.rmtree(dirname / "charidotella" / "assets", ignore_errors=True)
(dirname / "charidotella" / "assets").mkdir()
- if sys.platform == "win32":
- subprocess.run(
- ["premake4", "vs2010"], cwd=dirname / "command_line_tools", check=True
- )
- for executable in executables:
- subprocess.run(
- [
- "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\MSBuild\\Current\\Bin\\MsBuild.exe",
- "/p:PlatformToolset=v142",
- "/property:Configuration=Release",
- f"{executable}.vcxproj",
- ],
- check=True,
- cwd=dirname / "command_line_tools" / "build",
- )
- (dirname / "charidotella" / "assets" / executable).unlink(
- missing_ok=True
- )
- shutil.copy2(
- dirname
- / "command_line_tools"
- / "build"
- / "release"
- / f"{executable}.exe",
- dirname / "charidotella" / "assets" / executable,
- )
- else:
- if not (dirname / "command_line_tools" / "build" / "Makefile").is_file():
- subprocess.run(
- ["premake4", "gmake"],
- check=True,
- cwd=dirname / "command_line_tools",
- )
- for executable in executables:
- subprocess.run(
- ["make", executable],
- check=True,
- cwd=dirname / "command_line_tools" / "build",
- )
- shutil.copy2(
- dirname / "command_line_tools" / "build" / "release" / executable,
- dirname / "charidotella" / "assets" / executable,
- )
- for executable in executables:
- manifest_lines.append(f"include charidotella/assets/{executable}")
shutil.copy2(
dirname / "configuration-schema.json",
dirname / "charidotella" / "assets" / "configuration-schema.json",
@@ -122,13 +63,6 @@
"scipy",
"toml",
],
- ext_modules=[
- setuptools.extension.Extension(
- "charidotella_extension_placeholder",
- language="cpp",
- sources=["charidotella/charidotella_extension_placeholder.c"],
- ),
- ],
entry_points={
"console_scripts": [
"charidotella = charidotella:main",
21 changes: 21 additions & 0 deletions recipes/colourtime/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2024 International Centre for Neuromorphic Systems

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
63 changes: 63 additions & 0 deletions recipes/colourtime/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
{% set name = "colourtime" %}
{% set version = "0.4.0" %}

package:
name: {{ name|lower }}
version: {{ version }}

source:
url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/colourtime-{{ version }}.tar.gz
sha256: 3e1fe99c541dea22cd75467e0385e58551be4df953f073dcc4be2954338934b0

build:
entry_points:
- colourtime = colourtime:main
script:
- cargo-bundle-licenses --format yaml --output THIRDPARTY.yml
- {{ PYTHON }} -m pip install . --no-deps --ignore-installed -vv
number: 0
skip: true # [win]

requirements:
build:
- {{ compiler('c') }}
- {{ stdlib("c") }}
- {{ compiler('rust') }}
- python # [build_platform != target_platform]
- cross-python_{{ target_platform }} # [build_platform != target_platform]
- crossenv # [build_platform != target_platform]
- maturin >=0.14,<0.15 # [build_platform != target_platform]
- cmake
- make # [unix]
- cargo-bundle-licenses
host:
- python
- maturin >=0.14,<0.15
- pip
run:
- python
- event-stream
- matplotlib-base
- numpy
- pillow

test:
imports:
- colourtime
commands:
- pip check
- colourtime --help
requires:
- pip

about:
summary: Represent time with colours
home: https://github.com/neuromorphicsystems/colourtime
license: MIT
license_file:
- LICENSE
- THIRDPARTY.yml

extra:
recipe-maintainers:
- Tobias-Fischer
57 changes: 57 additions & 0 deletions recipes/command_line_tools/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
cmake_minimum_required(VERSION 3.10)
project(command_line_tools)

set(CMAKE_CXX_STANDARD 11)
find_package (Threads)

add_executable(crop source/crop.cpp)
target_link_libraries (crop ${CMAKE_THREAD_LIBS_INIT})
add_executable(cut source/timecode.hpp source/cut.cpp)
target_link_libraries (cut ${CMAKE_THREAD_LIBS_INIT})
add_executable(dat_to_es source/dat.hpp source/dat_to_es.cpp)
target_link_libraries (dat_to_es ${CMAKE_THREAD_LIBS_INIT})
add_executable(es_to_csv source/es_to_csv.cpp)
target_link_libraries (es_to_csv ${CMAKE_THREAD_LIBS_INIT})
add_executable(es_to_frames source/es_to_frames.cpp)
target_link_libraries (es_to_frames ${CMAKE_THREAD_LIBS_INIT})
add_executable(es_to_ply source/es_to_ply.cpp)
target_link_libraries (es_to_ply ${CMAKE_THREAD_LIBS_INIT})
add_executable(event_rate source/event_rate.cpp)
target_link_libraries (event_rate ${CMAKE_THREAD_LIBS_INIT})
add_executable(evt2_to_es source/evt2_to_es.cpp)
target_link_libraries (evt2_to_es ${CMAKE_THREAD_LIBS_INIT})
add_executable(evt3_to_es source/evt3_to_es.cpp)
target_link_libraries (evt3_to_es ${CMAKE_THREAD_LIBS_INIT})
add_executable(rainbow source/rainbow.cpp)
target_link_libraries (rainbow ${CMAKE_THREAD_LIBS_INIT})
add_executable(rainmaker source/rainmaker.cpp third_party/lodepng/lodepng.cpp)
target_link_libraries (rainmaker ${CMAKE_THREAD_LIBS_INIT})
get_target_property(PROJECT_LOCATION rainmaker BINARY_DIR)
target_compile_definitions(rainmaker PRIVATE SEPIA_COMPILER_WORKING_DIRECTORY="${PROJECT_LOCATION}")
add_executable(size source/size.cpp)
target_link_libraries (size ${CMAKE_THREAD_LIBS_INIT})
add_executable(spatiospectrogram source/spatiospectrogram.cpp)
target_link_libraries (spatiospectrogram ${CMAKE_THREAD_LIBS_INIT})
add_executable(spectrogram source/spectrogram.cpp third_party/lodepng/lodepng.cpp)
target_link_libraries (spectrogram ${CMAKE_THREAD_LIBS_INIT})
add_executable(statistics source/statistics.cpp)
target_link_libraries (statistics ${CMAKE_THREAD_LIBS_INIT})
add_executable(synth source/synth.cpp)
target_link_libraries (synth ${CMAKE_THREAD_LIBS_INIT})

install(TARGETS crop DESTINATION bin)
install(TARGETS cut DESTINATION bin)
install(TARGETS dat_to_es DESTINATION bin)
install(TARGETS es_to_csv DESTINATION bin)
install(TARGETS es_to_frames DESTINATION bin)
install(TARGETS es_to_ply DESTINATION bin)
install(TARGETS event_rate DESTINATION bin)
install(TARGETS evt2_to_es DESTINATION bin)
install(TARGETS evt3_to_es DESTINATION bin)
install(TARGETS rainbow DESTINATION bin)
install(TARGETS rainmaker DESTINATION bin)
install(TARGETS size DESTINATION bin)
install(TARGETS spatiospectrogram DESTINATION bin)
install(TARGETS spectrogram DESTINATION bin)
install(TARGETS statistics DESTINATION bin)
install(TARGETS synth DESTINATION bin)
11 changes: 11 additions & 0 deletions recipes/command_line_tools/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
mkdir build
cd build

cmake ${CMAKE_ARGS} .. \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_PREFIX_PATH=$PREFIX \
-DCMAKE_INSTALL_PREFIX=$PREFIX \
-DCMAKE_INSTALL_LIBDIR=lib

cmake --build . --config Release -- -j$CPU_COUNT
cmake --build . --config Release --target install
39 changes: 39 additions & 0 deletions recipes/command_line_tools/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{% set name = "command_line_tools" %}
{% set version = "0.0.1" %}

package:
name: {{ name }}
version: {{ version }}

source:
- git_url: https://github.com/neuromorphic-paris/command_line_tools.git
- path: CMakeLists.txt

build:
number: 0
skip: true # [win]

requirements:
build:
- {{ compiler('cxx') }}
- {{ compiler('c') }}
- {{ stdlib("c") }}
- cmake
- make
- git
host:
- pthread-stubs

test:
commands:
- test -f $PREFIX/bin/event_rate

about:
home: https://github.com/neuromorphic-paris/command_line_tools
license: GPL-3.0-or-later
license_file: LICENSE.txt
summary: Command-line tools bundles command-line applications to manipulate event files.

extra:
recipe-maintainers:
- Tobias-Fischer
21 changes: 21 additions & 0 deletions recipes/event-stream/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2024 International Centre for Neuromorphic Systems

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Loading

0 comments on commit 8c9b9e3

Please sign in to comment.