diff --git a/ros2-pkg-create/pyproject.toml b/ros2-pkg-create/pyproject.toml index c03d894..aa36bf5 100644 --- a/ros2-pkg-create/pyproject.toml +++ b/ros2-pkg-create/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "ros2-pkg-create" -version = "1.0.1" +version = "1.0.2" description = "Powerful ROS 2 Package Generator" license = {file = "LICENSE"} readme = "README.md" @@ -35,3 +35,6 @@ dev = ["build", "twine"] [project.scripts] ros2-pkg-create = "ros2_pkg_create.__main__:main" + +[tool.setuptools.package-data] +ros2_pkg_create = ["copier.yml", "templates/**"] \ No newline at end of file diff --git a/ros2-pkg-create/src/ros2_pkg_create/__init__.py b/ros2-pkg-create/src/ros2_pkg_create/__init__.py index 0c97a9f..26153c4 100644 --- a/ros2-pkg-create/src/ros2_pkg_create/__init__.py +++ b/ros2-pkg-create/src/ros2_pkg_create/__init__.py @@ -1,2 +1,2 @@ __name__ = "ros2-pkg-create" -__version__ = "1.0.1" \ No newline at end of file +__version__ = "1.0.2" \ No newline at end of file diff --git a/ros2-pkg-create/src/ros2_pkg_create/__main__.py b/ros2-pkg-create/src/ros2_pkg_create/__main__.py index 3d367d2..154945c 100644 --- a/ros2-pkg-create/src/ros2_pkg_create/__main__.py +++ b/ros2-pkg-create/src/ros2_pkg_create/__main__.py @@ -15,7 +15,7 @@ def parseArguments() -> argparse.Namespace: parser.add_argument("--defaults", action="store_true", help="Use defaults for all options") parser.add_argument("--use-local-templates", action="store_true", help="Use locally installed templates instead of remotely pulling most recent ones") - parser.add_argument("--template", type=str, default=None, choices=os.listdir(os.path.join(os.path.dirname(__file__), os.pardir, os.pardir, os.pardir, "templates")), required=True, help="Template") + parser.add_argument("--template", type=str, default=None, choices=os.listdir(os.path.join(os.path.dirname(__file__), "templates")), required=True, help="Template") parser.add_argument("--package-name", type=str, default=None, help="Package name") parser.add_argument("--description", type=str, default=None, help="Description") parser.add_argument("--maintainer", type=str, default=None, help="Maintainer") @@ -67,7 +67,7 @@ def main(): # run copier try: if args.use_local_templates: - template_location = os.path.join(os.path.dirname(__file__), os.pardir, os.pardir, os.pardir) + template_location = os.path.join(os.path.dirname(__file__)) else: template_location = "https://github.com/ika-rwth-aachen/ros2-pkg-create.git" copier.run_copy(template_location, diff --git a/ros2-pkg-create/src/ros2_pkg_create/copier.yml b/ros2-pkg-create/src/ros2_pkg_create/copier.yml new file mode 120000 index 0000000..4454459 --- /dev/null +++ b/ros2-pkg-create/src/ros2_pkg_create/copier.yml @@ -0,0 +1 @@ +../../../copier.yml \ No newline at end of file diff --git a/ros2-pkg-create/src/ros2_pkg_create/templates b/ros2-pkg-create/src/ros2_pkg_create/templates new file mode 120000 index 0000000..64f6ba6 --- /dev/null +++ b/ros2-pkg-create/src/ros2_pkg_create/templates @@ -0,0 +1 @@ +../../../templates/ \ No newline at end of file