blob: 98706f4550478f8b15153b6876a8974e4b40454d [file] [log] [blame]
Matt Spinlerbf7fca72022-05-03 10:51:52 -05001import os
2import shutil
3
Patrick Williamsd27675d2022-12-08 06:18:00 -06004from setuptools import setup
5
Matt Spinlerbf7fca72022-05-03 10:51:52 -05006# Builds the message registry and other data files into a python package
7
8# Copy the msg registry and comp IDs files into the subdir with
9# the __init__.py before building the package so they can reside in
10# ../site-packages/pel_registry/ instead of site-packages/registry.
11this_dir = os.path.dirname(__file__)
Patrick Williamse6555f52022-08-04 13:56:17 -050012target_dir = os.path.join(this_dir, "pel_registry")
13shutil.copy(
14 os.path.join(this_dir, "registry/message_registry.json"), target_dir
15)
16shutil.copy(
17 os.path.join(this_dir, "registry/O_component_ids.json"), target_dir
18)
19shutil.copy(
20 os.path.join(this_dir, "registry/B_component_ids.json"), target_dir
21)
Matt Spinlerbf7fca72022-05-03 10:51:52 -050022
23setup(
24 name="pel_message_registry",
Patrick Williamse6555f52022-08-04 13:56:17 -050025 version=os.getenv("PELTOOL_VERSION", "1.0"),
Matt Spinlerbf7fca72022-05-03 10:51:52 -050026 classifiers=["License :: OSI Approved :: Apache Software License"],
Patrick Williamse6555f52022-08-04 13:56:17 -050027 packages=["pel_registry"],
28 package_data={
29 "": [
30 "message_registry.json",
31 "O_component_ids.json",
32 "B_component_ids.json",
33 ]
34 },
Matt Spinlerbf7fca72022-05-03 10:51:52 -050035)