blob: 1ed8fa9bf036a69a7fe6d9c8cda13973d19514cc [file] [log] [blame]
Matt Spinlerbf7fca72022-05-03 10:51:52 -05001from setuptools import setup
2import os
3import shutil
4
5# Builds the message registry and other data files into a python package
6
7# Copy the msg registry and comp IDs files into the subdir with
8# the __init__.py before building the package so they can reside in
9# ../site-packages/pel_registry/ instead of site-packages/registry.
10this_dir = os.path.dirname(__file__)
11target_dir = os.path.join(this_dir, 'pel_registry')
12shutil.copy(os.path.join(
13 this_dir, 'registry/message_registry.json'), target_dir)
14shutil.copy(os.path.join(this_dir, 'registry/O_component_ids.json'),
15 target_dir)
16shutil.copy(os.path.join(this_dir, 'registry/B_component_ids.json'),
17 target_dir)
18
19setup(
20 name="pel_message_registry",
Matt Spinler753193e2022-05-19 15:01:54 -050021 version=os.getenv('PELTOOL_VERSION', '1.0'),
Matt Spinlerbf7fca72022-05-03 10:51:52 -050022 classifiers=["License :: OSI Approved :: Apache Software License"],
23 packages=['pel_registry'],
24 package_data={'': ['message_registry.json',
25 'O_component_ids.json',
26 'B_component_ids.json']},
27)