forked from eclipse-kuksa/kuksa-python-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Exclude proto copy and initialization to separate script
- Loading branch information
1 parent
48edfae
commit 3f44b36
Showing
5 changed files
with
45 additions
and
15 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
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
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
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,32 @@ | ||
# /******************************************************************************** | ||
# * Copyright (c) 2024 Contributors to the Eclipse Foundation | ||
# * | ||
# * See the NOTICE file(s) distributed with this work for additional | ||
# * information regarding copyright ownership. | ||
# * | ||
# * This program and the accompanying materials are made available under the | ||
# * terms of the Apache License 2.0 which is available at | ||
# * http://www.apache.org/licenses/LICENSE-2.0 | ||
# * | ||
# * SPDX-License-Identifier: Apache-2.0 | ||
# ********************************************************************************/ | ||
|
||
import shutil | ||
import os | ||
|
||
# this needs to be adapted once the submodules name or structure changes | ||
PROTO_PATH = os.path.abspath("../submodules/kuksa-databroker/proto") | ||
|
||
|
||
def main(): | ||
for root, dirs, files in os.walk(PROTO_PATH): | ||
for directory in dirs: | ||
# Create an __init__.py file in each subdirectory | ||
init_file = os.path.join(root, directory, "__init__.py") | ||
with open(init_file, "w") as file: | ||
file.write("# This file marks the directory as a Python module") | ||
shutil.copytree(PROTO_PATH, os.getcwd(), dirs_exist_ok=True) | ||
|
||
|
||
if __name__ == "__main__": | ||
main() |
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