-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Víctor Mayoral Vilches <[email protected]>
- Loading branch information
Showing
21 changed files
with
142 additions
and
194 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,4 @@ | ||
# ____ ____ | ||
# / /\/ / | ||
# /___/ \ / Copyright (c) 2021, Xilinx®. | ||
# \ \ \/ Author: Víctor Mayoral Vilches <[email protected]> | ||
# \ \ | ||
# / / | ||
# /___/ /\ | ||
# \ \ / \ | ||
# \___\/\___\ | ||
# | ||
# Copyright 2022 Víctor Mayoral-Vilches | ||
# Licensed under the Apache License, Version 2.0 | ||
# | ||
|
||
__version__ = "0.4.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,6 @@ | ||
# ____ ____ | ||
# / /\/ / | ||
# /___/ \ / Copyright (c) 2021, Xilinx®. | ||
# \ \ \/ Author: Víctor Mayoral Vilches <[email protected]> | ||
# \ \ | ||
# / / | ||
# /___/ /\ | ||
# \ \ / \ | ||
# \___\/\___\ | ||
# | ||
# Copyright 2022 Víctor Mayoral-Vilches | ||
# Licensed under the Apache License, Version 2.0 | ||
# | ||
|
||
import os | ||
import subprocess | ||
import sys | ||
|
@@ -896,7 +887,7 @@ def copy_libstdcppfs(partition=2): # noqa: D102 | |
|
||
def create_ros2_overlay_script(): # noqa: D102 | ||
""" | ||
Creates common /opt/ros/foxy/setup.bash script on the go | ||
Creates common /opt/ros/<ROS distro>/setup.bash script on the go | ||
return: path to the script just created under /tmp (/tmp/setup.bash) | ||
""" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,6 @@ | ||
# ____ ____ | ||
# / /\/ / | ||
# /___/ \ / Copyright (c) 2021, Xilinx®. | ||
# \ \ \/ Author: Víctor Mayoral Vilches <[email protected]> | ||
# \ \ | ||
# / / | ||
# /___/ /\ | ||
# \ \ / \ | ||
# \___\/\___\ | ||
# | ||
# Copyright 2022 Víctor Mayoral-Vilches | ||
# Licensed under the Apache License, Version 2.0 | ||
# | ||
|
||
import os | ||
|
||
from colcon_core.plugin_system import satisfies_version | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,6 @@ | ||
# ____ ____ | ||
# / /\/ / | ||
# /___/ \ / Copyright (c) 2021, Xilinx®. | ||
# \ \ \/ Author: Víctor Mayoral Vilches <[email protected]> | ||
# \ \ | ||
# / / | ||
# /___/ /\ | ||
# \ \ / \ | ||
# \___\/\___\ | ||
# | ||
# Copyright 2022 Víctor Mayoral-Vilches | ||
# Licensed under the Apache License, Version 2.0 | ||
# | ||
|
||
import os | ||
import sys | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,6 @@ | ||
# ____ ____ | ||
# / /\/ / | ||
# /___/ \ / Copyright (c) 2021, Xilinx®. | ||
# \ \ \/ Author: Víctor Mayoral Vilches <[email protected]> | ||
# \ \ | ||
# / / | ||
# /___/ /\ | ||
# \ \ / \ | ||
# \___\/\___\ | ||
# | ||
# Copyright 2022 Víctor Mayoral-Vilches | ||
# Licensed under the Apache License, Version 2.0 | ||
# | ||
|
||
import os | ||
import sys | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,6 @@ | ||
# ____ ____ | ||
# / /\/ / | ||
# /___/ \ / Copyright (c) 2021, Xilinx®. | ||
# \ \ \/ Author: Víctor Mayoral Vilches <[email protected]> | ||
# \ \ | ||
# / / | ||
# /___/ /\ | ||
# \ \ / \ | ||
# \___\/\___\ | ||
# | ||
# Copyright 2022 Víctor Mayoral-Vilches | ||
# Licensed under the Apache License, Version 2.0 | ||
# | ||
|
||
import os | ||
import sys | ||
import errno | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,6 @@ | ||
# ____ ____ | ||
# / /\/ / | ||
# /___/ \ / Copyright (c) 2021, Xilinx®. | ||
# \ \ \/ Author: Víctor Mayoral Vilches <[email protected]> | ||
# \ \ | ||
# / / | ||
# /___/ /\ | ||
# \ \ / \ | ||
# \___\/\___\ | ||
# | ||
# Copyright 2022 Víctor Mayoral-Vilches | ||
# Licensed under the Apache License, Version 2.0 | ||
# | ||
|
||
import os | ||
import sys | ||
import errno | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,7 @@ | ||
# ____ ____ | ||
# / /\/ / | ||
# /___/ \ / Copyright (c) 2021, Xilinx®. | ||
# \ \ \/ Author: Víctor Mayoral Vilches <[email protected]> | ||
# \ \ | ||
# / / | ||
# /___/ /\ | ||
# \ \ / \ | ||
# \___\/\___\ | ||
# | ||
# Copyright 2022 Víctor Mayoral-Vilches | ||
# Licensed under the Apache License, Version 2.0 | ||
# | ||
|
||
# list hardware acceleration technology solutions available | ||
|
||
import os | ||
|
||
from colcon_core.plugin_system import satisfies_version | ||
|
@@ -27,7 +16,7 @@ | |
|
||
def get_firmware_options(): | ||
"""Search the workspace for firmware options | ||
Looks into "acceleration/firmware" | ||
""" | ||
current_dir = os.environ.get("PWD", "") | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,6 @@ | ||
# ____ ____ | ||
# / /\/ / | ||
# /___/ \ / Copyright (c) 2021, Xilinx®. | ||
# \ \ \/ Author: Víctor Mayoral Vilches <[email protected]> | ||
# \ \ | ||
# / / | ||
# /___/ /\ | ||
# \ \ / \ | ||
# \___\/\___\ | ||
# | ||
# Copyright 2022 Víctor Mayoral-Vilches | ||
# Licensed under the Apache License, Version 2.0 | ||
# | ||
|
||
import os | ||
import sys | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,6 @@ | ||
# ____ ____ | ||
# / /\/ / | ||
# /___/ \ / Copyright (c) 2021, Xilinx®. | ||
# \ \ \/ Author: Víctor Mayoral Vilches <[email protected]> | ||
# \ \ | ||
# / / | ||
# /___/ /\ | ||
# \ \ / \ | ||
# \___\/\___\ | ||
# | ||
# Copyright 2022 Víctor Mayoral-Vilches | ||
# Licensed under the Apache License, Version 2.0 | ||
# | ||
|
||
import os | ||
|
||
from colcon_core.plugin_system import satisfies_version | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,6 @@ | ||
# ____ ____ | ||
# / /\/ / | ||
# /___/ \ / Copyright (c) 2021, Xilinx®. | ||
# \ \ \/ Author: Víctor Mayoral Vilches <[email protected]> | ||
# \ \ | ||
# / / | ||
# /___/ /\ | ||
# \ \ / \ | ||
# \___\/\___\ | ||
# | ||
# Copyright 2022 Víctor Mayoral-Vilches | ||
# Licensed under the Apache License, Version 2.0 | ||
# | ||
|
||
import os | ||
|
||
from colcon_core.plugin_system import satisfies_version | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,4 @@ | ||
# ____ ____ | ||
# / /\/ / | ||
# /___/ \ / Copyright (c) 2021, Xilinx®. | ||
# \ \ \/ Author: Víctor Mayoral Vilches <[email protected]> | ||
# \ \ | ||
# / / | ||
# /___/ /\ | ||
# \ \ / \ | ||
# \___\/\___\ | ||
# | ||
# Copyright 2022 Víctor Mayoral-Vilches | ||
# Licensed under the Apache License, Version 2.0 | ||
|
||
# select across the ROS 2 hardware acceleration firmware solutions available | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,6 @@ | ||
# ____ ____ | ||
# / /\/ / | ||
# /___/ \ / Copyright (c) 2021, Xilinx®. | ||
# \ \ \/ Author: Víctor Mayoral Vilches <[email protected]> | ||
# \ \ | ||
# / / | ||
# /___/ /\ | ||
# \ \ / \ | ||
# \___\/\___\ | ||
# | ||
# Copyright 2022 Víctor Mayoral-Vilches | ||
# Licensed under the Apache License, Version 2.0 | ||
# | ||
|
||
import sys | ||
|
||
from colcon_core.plugin_system import satisfies_version | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,6 @@ | ||
# ____ ____ | ||
# / /\/ / | ||
# /___/ \ / Copyright (c) 2021, Xilinx®. | ||
# \ \ \/ Author: Víctor Mayoral Vilches <[email protected]> | ||
# \ \ | ||
# / / | ||
# /___/ /\ | ||
# \ \ / \ | ||
# \___\/\___\ | ||
# | ||
# Copyright 2022 Víctor Mayoral-Vilches | ||
# Licensed under the Apache License, Version 2.0 | ||
# | ||
|
||
import os | ||
|
||
from colcon_core.plugin_system import satisfies_version | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,6 @@ | ||
# ____ ____ | ||
# / /\/ / | ||
# /___/ \ / Copyright (c) 2021, Xilinx®. | ||
# \ \ \/ Author: Víctor Mayoral Vilches <[email protected]> | ||
# \ \ | ||
# / / | ||
# /___/ /\ | ||
# \ \ / \ | ||
# \___\/\___\ | ||
# | ||
# Copyright 2022 Víctor Mayoral-Vilches | ||
# Licensed under the Apache License, Version 2.0 | ||
# | ||
|
||
import os | ||
import sys | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,5 @@ | ||
# ____ ____ | ||
# / /\/ / | ||
# /___/ \ / Copyright (c) 2021, Xilinx®. | ||
# \ \ \/ Author: Víctor Mayoral Vilches <[email protected]> | ||
# \ \ | ||
# / / | ||
# /___/ /\ | ||
# \ \ / \ | ||
# \___\/\___\ | ||
# | ||
# Copyright 2022 Víctor Mayoral-Vilches | ||
# Licensed under the Apache License, Version 2.0 | ||
# | ||
|
||
def black(text): | ||
print("\033[30m", text, "\033[0m", sep="") | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,6 @@ | ||
# ____ ____ | ||
# / /\/ / | ||
# /___/ \ / Copyright (c) 2021, Xilinx®. | ||
# \ \ \/ Author: Víctor Mayoral Vilches <[email protected]> | ||
# \ \ | ||
# / / | ||
# /___/ /\ | ||
# \ \ / \ | ||
# \___\/\___\ | ||
# | ||
# Copyright 2022 Víctor Mayoral-Vilches | ||
# Licensed under the Apache License, Version 2.0 | ||
# | ||
|
||
from colcon_core.command import add_subparsers | ||
from colcon_core.plugin_system import satisfies_version | ||
from colcon_core.verb import VerbExtensionPoint | ||
|
@@ -31,7 +22,8 @@ def add_arguments(self, *, parser): # noqa: D102 | |
# get subverb extensions and let them add their arguments | ||
subverb_extensions = get_subverb_extensions() | ||
add_subparsers( | ||
parser, "colcon acceleration", subverb_extensions, attribute="subverb_name" | ||
parser, "colcon acceleration", | ||
subverb_extensions, attribute="subverb_name" | ||
) | ||
|
||
def main(self, *, context): # noqa: D102 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,5 @@ | ||
# Copyright (c) 2021, Xilinx®. | ||
# All rights reserved | ||
# | ||
# Author: Víctor Mayoral Vilches <[email protected]> | ||
# Copyright 2022 Víctor Mayoral-Vilches | ||
# Licensed under the Apache License, Version 2.0 | ||
|
||
from setuptools import setup | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
apache | ||
colcon | ||
iterdir | ||
pathlib | ||
pytest | ||
scspell | ||
setuptools | ||
thomas | ||
vilches | ||
íctor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Copyright 2016-2018 Dirk Thomas | ||
# Licensed under the Apache License, Version 2.0 | ||
|
||
from pathlib import Path | ||
import sys | ||
|
||
|
||
def test_copyright_license(): | ||
missing = check_files([Path(__file__).parents[1]]) | ||
assert not len(missing), \ | ||
'In some files no copyright / license line was found' | ||
|
||
|
||
def check_files(paths): | ||
missing = [] | ||
for path in paths: | ||
if path.is_dir(): | ||
for p in sorted(path.iterdir()): | ||
if p.name.startswith('.'): | ||
continue | ||
if p.name.endswith('.py') or p.is_dir(): | ||
missing += check_files([p]) | ||
if path.is_file(): | ||
content = path.read_text() | ||
if not content: | ||
continue | ||
lines = content.splitlines() | ||
has_copyright = \ | ||
any(line for line in lines if line.startswith('# Copyright')) | ||
has_license = \ | ||
'# Licensed under the Apache License, Version 2.0' in lines | ||
if not has_copyright or not has_license: | ||
print( | ||
'Could not find copyright / license in:', path, | ||
file=sys.stderr) | ||
missing .append(path) | ||
else: | ||
print('Found copyright / license in:', path) | ||
return missing |
Oops, something went wrong.