|
9 | 9 | from colcon_core.package_identification import logger |
10 | 10 | from colcon_core.package_identification \ |
11 | 11 | import PackageIdentificationExtensionPoint |
12 | | -from colcon_core.package_identification.python import get_configuration |
13 | 12 | from colcon_core.plugin_system import satisfies_version |
14 | 13 | from colcon_core.plugin_system import SkipExtensionException |
15 | 14 | from colcon_python_setup_py.package_identification.python_setup_py \ |
@@ -102,28 +101,12 @@ def identify(self, desc): # noqa: D102 |
102 | 101 | desc.dependencies['test'].add(DependencyDescriptor( |
103 | 102 | d.name, metadata=_create_metadata(d))) |
104 | 103 |
|
105 | | - # for Python build types ensure that a setup.py file exists |
106 | 104 | if build_type == 'ament_python': |
107 | | - setup_cfg = desc.path / 'setup.cfg' |
108 | | - for _ in (1, ): |
109 | | - # try to get information from setup.cfg file |
110 | | - if setup_cfg.is_file(): |
111 | | - config = get_configuration(setup_cfg) |
112 | | - name = config.get('metadata', {}).get('name') |
113 | | - if name: |
114 | | - options = config.get('options', {}) |
115 | | - |
116 | | - def getter(env): |
117 | | - nonlocal options |
118 | | - return options |
119 | | - break |
120 | | - else: |
121 | | - # use information from setup.py file |
122 | | - |
123 | | - def getter(env): # noqa: F811 |
124 | | - nonlocal desc |
125 | | - return get_setup_arguments_with_context( |
126 | | - str(desc.path / 'setup.py'), env) |
| 105 | + # use information from setup.py file |
| 106 | + def getter(env): # noqa: F811 |
| 107 | + nonlocal desc |
| 108 | + return get_setup_arguments_with_context( |
| 109 | + str(desc.path / 'setup.py'), env) |
127 | 110 |
|
128 | 111 | desc.metadata['get_python_setup_options'] = getter |
129 | 112 |
|
|
0 commit comments