New upstream version 0.9.0
Jochen Sprickerhof
4 years ago
0 | 0.9.0 (2019-10-18 14:15:00 -0800) | |
1 | --------------------------------- | |
2 | - Fixed possibly unescaped logger formatting in version. `#553 <https://github.com/ros-infrastructure/bloom/pull/553>`_ | |
3 | - Added ament package support to RPM generation. `#534 <https://github.com/ros-infrastructure/bloom/pull/534>`_ | |
4 | - Added ROS_PYTHON_VERSION to dependency condtionals. `#551 <https://github.com/ros-infrastructure/bloom/pull/551>`_ | |
5 | With this change rosdistro v4 indexes must define the ``python_version`` field introduced in `ros-infrastructure/rep#207 <https://github.com/ros-infrastructure/rep/pull/207`_. | |
6 | - Fixed deprecation warnings by using yaml.safe_load. `#530 <https://github.com/ros-infrastructure/bloom/pull/530>`_ | |
7 | - Changed release suites, dropping all older than Ubuntu Xenial and adding Ubuntu Cosmic, Disco, and Eoan. `#543 <https://github.com/ros-infrastructure/bloom/pull/543>`_ | |
8 | - Improved error handling for package conditions and index files. `#537 <https://github.com/ros-infrastructure/bloom/pull/537>`_ | |
9 | - Added feature to disable pull request generation via argument or ``BLOOM_NO_ROSDISTRO_PULL_REQUEST`` environment variable. `#548 <https://github.com/ros-infrastructure/bloom/pull/548>`_ | |
10 | - Updated RPM generator to always create a source archive. `#540 <https://github.com/ros-infrastructure/bloom/pull/540>`_ | |
11 | - Updated RPM spec templates. `#533 <https://github.com/ros-infrastructure/bloom/pull/533>`_ | |
12 | ||
0 | 13 | 0.8.0 (2019-04-12 13:45:00 -0800) |
1 | 14 | --------------------------------- |
2 | 15 | - Start release increment at 1. `#528 <https://github.com/ros-infrastructure/bloom/pull/528>`_ |
84 | 84 | return |
85 | 85 | last_tag_version = last_tag.split('/')[-1] |
86 | 86 | info(fmt("The latest upstream tag in the release repository is '@!{0}@|'." |
87 | .format(last_tag))) | |
87 | .format(last_tag.replace('@', '@@')))) | |
88 | 88 | # Ensure the new version is greater than the last tag |
89 | 89 | if parse_version(version) < parse_version(last_tag_version): |
90 | 90 | warning("""\ |
546 | 546 | info(line, use_prefix=False, end='') |
547 | 547 | # Assert that only this repository is being changed |
548 | 548 | distro_file_yaml = yaml.safe_load(distro_file_raw) |
549 | distro_yaml = yaml.load(distro_dump) | |
549 | distro_yaml = yaml.safe_load(distro_dump) | |
550 | 550 | if 'repositories' in distro_file_yaml: |
551 | 551 | distro_file_repos = distro_file_yaml['repositories'] |
552 | 552 | for repo in distro_yaml['repositories']: |
1109 | 1109 | repository, track, distro, new_track, interactive, pretend, tracks_dict, |
1110 | 1110 | override_release_repository_url, override_release_repository_push_url |
1111 | 1111 | ) |
1112 | # Propose github pull request | |
1113 | info(fmt("@{gf}@!==> @|") + | |
1114 | "Generating pull request to distro file located at '{0}'" | |
1115 | .format(get_distribution_file_url(distro))) | |
1116 | try: | |
1117 | pull_request_url = open_pull_request( | |
1118 | track, repository, distro, interactive, override_release_repository_url | |
1119 | ) | |
1120 | if pull_request_url: | |
1121 | info(fmt(_success) + "Pull request opened at: {0}".format(pull_request_url)) | |
1122 | if 'BLOOM_NO_WEBBROWSER' not in os.environ and platform.system() in ['Darwin']: | |
1123 | webbrowser.open(pull_request_url) | |
1124 | else: | |
1125 | info("The release of your packages was successful, but the pull request failed.") | |
1126 | info("Please manually open a pull request by editing the file here: '{0}'" | |
1127 | .format(get_distribution_file_url(distro))) | |
1128 | info(fmt(_error) + "No pull request opened.") | |
1129 | except Exception as e: | |
1130 | debug(traceback.format_exc()) | |
1131 | error("Failed to open pull request: {0} - {1}".format(type(e).__name__, e), exit=True) | |
1112 | if 'BLOOM_NO_ROSDISTRO_PULL_REQUEST' not in os.environ: | |
1113 | # Propose github pull request | |
1114 | info(fmt("@{gf}@!==> @|") + | |
1115 | "Generating pull request to distro file located at '{0}'" | |
1116 | .format(get_distribution_file_url(distro))) | |
1117 | try: | |
1118 | pull_request_url = open_pull_request( | |
1119 | track, repository, distro, interactive, override_release_repository_url | |
1120 | ) | |
1121 | if pull_request_url: | |
1122 | info(fmt(_success) + "Pull request opened at: {0}".format(pull_request_url)) | |
1123 | if 'BLOOM_NO_WEBBROWSER' not in os.environ and platform.system() in ['Darwin']: | |
1124 | webbrowser.open(pull_request_url) | |
1125 | else: | |
1126 | info("The release of your packages was successful, but the pull request failed.") | |
1127 | info("Please manually open a pull request by editing the file here: '{0}'" | |
1128 | .format(get_distribution_file_url(distro))) | |
1129 | info(fmt(_error) + "No pull request opened.") | |
1130 | except Exception as e: | |
1131 | debug(traceback.format_exc()) | |
1132 | error("Failed to open pull request: {0} - {1}".format(type(e).__name__, e), exit=True) | |
1132 | 1133 | |
1133 | 1134 | |
1134 | 1135 | def get_argument_parser(): |
1145 | 1146 | help="if used, a new track will be created before running bloom") |
1146 | 1147 | add('--pretend', '-s', default=False, action='store_true', |
1147 | 1148 | help="Pretends to push and release") |
1149 | add('--no-pull-request', default=False, action='store_true', | |
1150 | help="Prevents a pull request from being opened after release") | |
1148 | 1151 | add('--no-web', default=False, action='store_true', |
1149 | 1152 | help="prevents a web browser from being opened at the end") |
1150 | 1153 | add('--pull-request-only', '-p', default=False, action='store_true', |
1172 | 1175 | list_tracks(args.repository, args.ros_distro, args.override_release_repository_url) |
1173 | 1176 | return |
1174 | 1177 | |
1178 | if args.no_pull_request: | |
1179 | os.environ['BLOOM_NO_ROSDISTRO_PULL_REQUEST'] = '1' | |
1180 | ||
1175 | 1181 | if args.no_web: |
1176 | 1182 | os.environ['BLOOM_NO_WEBBROWSER'] = '1' |
1177 | 1183 |
40 | 40 | from bloom.logging import info |
41 | 41 | |
42 | 42 | from bloom.rosdistro_api import get_distribution_type |
43 | from bloom.rosdistro_api import get_index | |
44 | from bloom.rosdistro_api import get_python_version | |
43 | 45 | |
44 | 46 | from bloom.util import code |
45 | 47 | from bloom.util import maybe_continue |
119 | 121 | |
120 | 122 | |
121 | 123 | def package_conditional_context(ros_distro): |
124 | """ | |
125 | Creates a dict containing the conditional evaluation context for | |
126 | package.xml format three packages. | |
127 | ||
128 | :param ros_distro: The codename of the rosdistro to generate context for. | |
129 | :returns: dict defining ROS_VERSION and ROS_DISTRO. | |
130 | """ | |
131 | if get_index().version < 4: | |
132 | error("Bloom requires a version 4 or greater rosdistro index to support package format 3.", exit=True) | |
133 | ||
122 | 134 | distribution_type = get_distribution_type(ros_distro) |
123 | 135 | if distribution_type == 'ros1': |
124 | 136 | ros_version = '1' |
127 | 139 | else: |
128 | 140 | error("Bloom cannot cope with distribution_type '{0}'".format( |
129 | 141 | distribution_type), exit=True) |
142 | python_version = get_python_version(ros_distro) | |
143 | if python_version is None: | |
144 | error( | |
145 | 'No python_version found in the rosdistro index. ' | |
146 | 'The rosdistro index must include this key for bloom to work correctly.', | |
147 | exit=True) | |
148 | elif python_version == 2: | |
149 | ros_python_version = '2' | |
150 | elif python_version == 3: | |
151 | ros_python_version = '3' | |
152 | else: | |
153 | error("Bloom cannot cope with python_version '{0}'".format( | |
154 | python_version), exit=True) | |
155 | ||
130 | 156 | return { |
131 | 157 | 'ROS_VERSION': ros_version, |
132 | 158 | 'ROS_DISTRO': ros_distro, |
159 | 'ROS_PYTHON_VERSION': ros_python_version, | |
133 | 160 | } |
161 | ||
162 | ||
163 | def evaluate_package_conditions(package, ros_distro): | |
164 | """ | |
165 | Evaluates a package's conditional fields if it supports them. | |
166 | ||
167 | :param package: The package to be evaluated. | |
168 | :param ros_distro: The codename of the rosdistro use for context. | |
169 | :returns: None. The given package will be modified. | |
170 | """ | |
171 | # Conditional fields were introduced in package format 3. | |
172 | # Earlier formats should have their conditions evaluated with no context so | |
173 | # the evaluated_condition is set to True in all cases. | |
174 | if package.package_format >= 3: | |
175 | package.evaluate_conditions(package_conditional_context(ros_distro)) | |
134 | 176 | |
135 | 177 | |
136 | 178 | def resolve_rosdep_key( |
57 | 57 | |
58 | 58 | from bloom.generators.common import default_fallback_resolver |
59 | 59 | from bloom.generators.common import invalidate_view_cache |
60 | from bloom.generators.common import package_conditional_context | |
60 | from bloom.generators.common import evaluate_package_conditions | |
61 | 61 | from bloom.generators.common import resolve_rosdep_key |
62 | 62 | |
63 | 63 | from bloom.git import inbranch |
312 | 312 | # Installation prefix |
313 | 313 | data['InstallationPrefix'] = installation_prefix |
314 | 314 | # Resolve dependencies |
315 | package.evaluate_conditions(package_conditional_context(ros_distro)) | |
315 | evaluate_package_conditions(package, ros_distro) | |
316 | 316 | depends = [ |
317 | 317 | dep for dep in (package.run_depends + package.buildtool_export_depends) |
318 | if dep.evaluated_condition] | |
318 | if dep.evaluated_condition is not False] | |
319 | 319 | build_depends = [ |
320 | 320 | dep for dep in (package.build_depends + package.buildtool_depends + package.test_depends) |
321 | if dep.evaluated_condition] | |
321 | if dep.evaluated_condition is not False] | |
322 | 322 | |
323 | 323 | unresolved_keys = [ |
324 | 324 | dep for dep in (depends + build_depends + package.replaces + package.conflicts) |
325 | if dep.evaluated_condition] | |
325 | if dep.evaluated_condition is not False] | |
326 | 326 | # The installer key is not considered here, but it is checked when the keys are checked before this |
327 | 327 | resolved_deps = resolve_dependencies(unresolved_keys, os_name, |
328 | 328 | os_version, ros_distro, |
659 | 659 | key_to_packages_which_depends_on = collections.defaultdict(list) |
660 | 660 | keys_to_ignore = set() |
661 | 661 | for package in self.packages.values(): |
662 | package.evaluate_conditions(package_conditional_context(ros_distro)) | |
662 | evaluate_package_conditions(package, ros_distro) | |
663 | 663 | depends = [ |
664 | 664 | dep for dep in (package.run_depends + package.buildtool_export_depends) |
665 | if dep.evaluated_condition] | |
665 | if dep.evaluated_condition is not False] | |
666 | 666 | build_depends = [ |
667 | 667 | dep for dep in (package.build_depends + package.buildtool_depends + package.test_depends) |
668 | if dep.evaluated_condition] | |
668 | if dep.evaluated_condition is not False] | |
669 | 669 | unresolved_keys = [ |
670 | 670 | dep for dep in (depends + build_depends + package.replaces + package.conflicts) |
671 | if dep.evaluated_condition] | |
671 | if dep.evaluated_condition is not False] | |
672 | 672 | keys_to_ignore = { |
673 | 673 | dep for dep in keys_to_ignore.union(package.replaces + package.conflicts) |
674 | if dep.evaluated_condition} | |
674 | if dep.evaluated_condition is not False} | |
675 | 675 | keys = [d.name for d in unresolved_keys] |
676 | 676 | keys_to_resolve.extend(keys) |
677 | 677 | for key in keys: |
0 | 0 | Source: @(Package) |
1 | 1 | Section: misc |
2 | Priority: extra | |
2 | Priority: optional | |
3 | 3 | Maintainer: @(Maintainer) |
4 | 4 | Build-Depends: debhelper (>= @(debhelper_version).0.0), @(', '.join(BuildDepends)) |
5 | 5 | Homepage: @(Homepage) |
0 | 0 | Source: @(Package) |
1 | 1 | Section: misc |
2 | Priority: extra | |
2 | Priority: optional | |
3 | 3 | Maintainer: @(Maintainer) |
4 | 4 | Build-Depends: debhelper (>= @(debhelper_version).0.0), @(', '.join(BuildDepends)), python3-all, python3-setuptools |
5 | 5 | Homepage: @(Homepage) |
0 | 0 | Source: @(Package) |
1 | 1 | Section: misc |
2 | Priority: extra | |
2 | Priority: optional | |
3 | 3 | Maintainer: @(Maintainer) |
4 | 4 | Build-Depends: debhelper (>= @(debhelper_version).0.0), @(', '.join(BuildDepends)) |
5 | 5 | Homepage: @(Homepage) |
0 | 0 | Source: @(Package) |
1 | 1 | Section: misc |
2 | Priority: extra | |
2 | Priority: optional | |
3 | 3 | Maintainer: @(Maintainer) |
4 | 4 | Build-Depends: debhelper (>= @(debhelper_version).0.0), @(', '.join(BuildDepends)) |
5 | 5 | Homepage: @(Homepage) |
43 | 43 | |
44 | 44 | from bloom.logging import info |
45 | 45 | |
46 | from bloom.rosdistro_api import get_index | |
47 | ||
46 | 48 | from bloom.util import get_distro_list_prompt |
47 | 49 | |
48 | 50 | |
85 | 87 | fallback_resolver=fallback_resolver |
86 | 88 | ) |
87 | 89 | subs['Package'] = rosify_package_name(subs['Package'], self.rosdistro) |
90 | ||
91 | # ROS 2 specific bloom extensions. | |
92 | ros2_distros = [ | |
93 | name for name, values in get_index().distributions.items() | |
94 | if values.get('distribution_type') == 'ros2'] | |
95 | if self.rosdistro in ros2_distros: | |
96 | # Add ros-workspace package as a dependency to any package other | |
97 | # than ros_workspace and its dependencies. | |
98 | if package.name not in ['ament_cmake_core', 'ament_package', 'ros_workspace']: | |
99 | workspace_pkg_name = rosify_package_name('ros-workspace', self.rosdistro) | |
100 | subs['BuildDepends'].append(workspace_pkg_name) | |
101 | subs['Depends'].append(workspace_pkg_name) | |
102 | ||
103 | # Add packages necessary to build vendor typesupport for rosidl_interface_packages to their | |
104 | # build dependencies. | |
105 | if self.rosdistro in ros2_distros and \ | |
106 | self.rosdistro not in ('r2b2', 'r2b3', 'ardent') and \ | |
107 | 'rosidl_interface_packages' in [p.name for p in package.member_of_groups]: | |
108 | ROS2_VENDOR_TYPESUPPORT_DEPENDENCIES = [ | |
109 | 'rmw-connext-cpp', | |
110 | 'rmw-fastrtps-cpp', | |
111 | 'rmw-implementation', | |
112 | 'rmw-opensplice-cpp', | |
113 | 'rosidl-typesupport-connext-c', | |
114 | 'rosidl-typesupport-connext-cpp', | |
115 | 'rosidl-typesupport-opensplice-c', | |
116 | 'rosidl-typesupport-opensplice-cpp', | |
117 | ] | |
118 | ||
119 | subs['BuildDepends'] += [ | |
120 | rosify_package_name(name, self.rosdistro) for name in ROS2_VENDOR_TYPESUPPORT_DEPENDENCIES] | |
88 | 121 | return subs |
89 | 122 | |
90 | 123 | def generate_branching_arguments(self, package, branch): |
59 | 59 | |
60 | 60 | from bloom.generators.common import default_fallback_resolver |
61 | 61 | from bloom.generators.common import invalidate_view_cache |
62 | from bloom.generators.common import package_conditional_context | |
62 | from bloom.generators.common import evaluate_package_conditions | |
63 | 63 | from bloom.generators.common import resolve_rosdep_key |
64 | 64 | |
65 | 65 | from bloom.git import inbranch |
231 | 231 | # Installation prefix |
232 | 232 | data['InstallationPrefix'] = installation_prefix |
233 | 233 | # Resolve dependencies |
234 | package.evaluate_conditions(package_conditional_context(ros_distro)) | |
234 | evaluate_package_conditions(package, ros_distro) | |
235 | 235 | depends = [ |
236 | 236 | dep for dep in (package.run_depends + package.buildtool_export_depends) |
237 | if dep.evaluated_condition] | |
237 | if dep.evaluated_condition is not False] | |
238 | 238 | build_depends = [ |
239 | 239 | dep for dep in (package.build_depends + package.buildtool_depends + package.test_depends) |
240 | if dep.evaluated_condition] | |
240 | if dep.evaluated_condition is not False] | |
241 | 241 | unresolved_keys = [ |
242 | 242 | dep for dep in (depends + build_depends + package.replaces + package.conflicts) |
243 | if dep.evaluated_condition] | |
243 | if dep.evaluated_condition is not False] | |
244 | 244 | # The installer key is not considered here, but it is checked when the keys are checked before this |
245 | 245 | resolved_deps = resolve_dependencies(unresolved_keys, os_name, |
246 | 246 | os_version, ros_distro, |
266 | 266 | elif build_type == 'cmake': |
267 | 267 | pass |
268 | 268 | elif build_type == 'ament_cmake': |
269 | error( | |
270 | "Build type '{}' is not supported by this version of bloom.". | |
271 | format(build_type), exit=True) | |
269 | pass | |
272 | 270 | elif build_type == 'ament_python': |
273 | error( | |
274 | "Build type '{}' is not supported by this version of bloom.". | |
275 | format(build_type), exit=True) | |
276 | # Don't set the install-scripts flag if it's already set in setup.cfg. | |
277 | package_path = os.path.abspath(os.path.dirname(package.filename)) | |
278 | setup_cfg_path = os.path.join(package_path, 'setup.cfg') | |
279 | data['pass_install_scripts'] = True | |
280 | if os.path.isfile(setup_cfg_path): | |
281 | setup_cfg = SafeConfigParser() | |
282 | setup_cfg.read([setup_cfg_path]) | |
283 | if ( | |
284 | setup_cfg.has_option('install', 'install-scripts') or | |
285 | setup_cfg.has_option('install', 'install_scripts') | |
286 | ): | |
287 | data['pass_install_scripts'] = False | |
271 | pass | |
288 | 272 | else: |
289 | 273 | error( |
290 | 274 | "Build type '{}' is not supported by this version of bloom.". |
538 | 522 | key_to_packages_which_depends_on = collections.defaultdict(list) |
539 | 523 | keys_to_ignore = set() |
540 | 524 | for package in self.packages.values(): |
541 | package.evaluate_conditions(package_conditional_context(rosdistro)) | |
525 | evaluate_package_conditions(package, rosdistro) | |
542 | 526 | depends = [ |
543 | 527 | dep for dep in (package.run_depends + package.buildtool_export_depends) |
544 | if dep.evaluated_condition] | |
528 | if dep.evaluated_condition is not False] | |
545 | 529 | build_depends = [ |
546 | 530 | dep for dep in (package.build_depends + package.buildtool_depends + package.test_depends) |
547 | if dep.evaluated_condition] | |
531 | if dep.evaluated_condition is not False] | |
548 | 532 | unresolved_keys = [ |
549 | 533 | dep for dep in (depends + build_depends + package.replaces + package.conflicts) |
550 | if dep.evaluated_condition] | |
534 | if dep.evaluated_condition is not False] | |
551 | 535 | keys_to_ignore = { |
552 | 536 | dep for dep in keys_to_ignore.union(package.replaces + package.conflicts) |
553 | if dep.evaluated_condition} | |
537 | if dep.evaluated_condition is not False} | |
554 | 538 | keys = [d.name for d in unresolved_keys] |
555 | 539 | keys_to_resolve.extend(keys) |
556 | 540 | for key in keys: |
780 | 764 | template_files = process_template_files('.', subs) |
781 | 765 | # Remove any residual template files |
782 | 766 | execute_command('git rm -rf ' + ' '.join("'{}'".format(t) for t in template_files)) |
783 | # Add changes to the rpm folder | |
784 | execute_command('git add ' + rpm_dir) | |
767 | # Add marker file to tell mock to archive the sources | |
768 | open('.write_tar', 'a').close() | |
769 | # Add marker file changes to the rpm folder | |
770 | execute_command('git add .write_tar ' + rpm_dir) | |
785 | 771 | # Commit changes |
786 | 772 | execute_command('git commit -m "Generated RPM files for ' + |
787 | 773 | rpm_distro + '"') |
0 | %global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g') | |
1 | %global __provides_exclude_from ^@(InstallationPrefix)/.*$ | |
2 | %global __requires_exclude_from ^@(InstallationPrefix)/.*$ | |
3 | ||
4 | Name: @(Package) | |
5 | Version: @(Version) | |
6 | Release: @(RPMInc)%{?dist} | |
7 | Summary: ROS @(Name) package | |
8 | ||
9 | License: @(License) | |
10 | @[if Homepage and Homepage != '']URL: @(Homepage)@\n@[end if]Source0: %{name}-%{version}.tar.gz | |
11 | @[if NoArch]@\nBuildArch: noarch@\n@[end if] | |
12 | @[for p in Depends]Requires: @p@\n@[end for]@[for p in BuildDepends]BuildRequires: @p@\n@[end for]@[for p in Conflicts]Conflicts: @p@\n@[end for]@[for p in Replaces]Obsoletes: @p@\n@[end for] | |
13 | %description | |
14 | @(Description) | |
15 | ||
16 | %prep | |
17 | %autosetup | |
18 | ||
19 | %build | |
20 | # In case we're installing to a non-standard location, look for a setup.sh | |
21 | # in the install tree that was dropped by catkin, and source it. It will | |
22 | # set things like CMAKE_PREFIX_PATH, PKG_CONFIG_PATH, and PYTHONPATH. | |
23 | if [ -f "@(InstallationPrefix)/setup.sh" ]; then . "@(InstallationPrefix)/setup.sh"; fi | |
24 | mkdir -p obj-%{_target_platform} && cd obj-%{_target_platform} | |
25 | %cmake3 \ | |
26 | -UINCLUDE_INSTALL_DIR \ | |
27 | -ULIB_INSTALL_DIR \ | |
28 | -USYSCONF_INSTALL_DIR \ | |
29 | -USHARE_INSTALL_PREFIX \ | |
30 | -ULIB_SUFFIX \ | |
31 | -DCMAKE_INSTALL_LIBDIR="lib" \ | |
32 | -DCMAKE_INSTALL_PREFIX="@(InstallationPrefix)" \ | |
33 | -DCMAKE_PREFIX_PATH="@(InstallationPrefix)" \ | |
34 | -DSETUPTOOLS_DEB_LAYOUT=OFF \ | |
35 | .. | |
36 | ||
37 | %make_build | |
38 | ||
39 | %install | |
40 | # In case we're installing to a non-standard location, look for a setup.sh | |
41 | # in the install tree that was dropped by catkin, and source it. It will | |
42 | # set things like CMAKE_PREFIX_PATH, PKG_CONFIG_PATH, and PYTHONPATH. | |
43 | if [ -f "@(InstallationPrefix)/setup.sh" ]; then . "@(InstallationPrefix)/setup.sh"; fi | |
44 | %make_install -C obj-%{_target_platform} | |
45 | ||
46 | %files | |
47 | @(InstallationPrefix) | |
48 | ||
49 | %changelog@[for change_version, (change_date, main_name, main_email) in changelogs]@\n* @(change_date) @(main_name) <@(main_email)> - @(change_version)@\n- Autogenerated by Bloom@\n@[end for] |
0 | %global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g') | |
1 | %global __provides_exclude_from ^@(InstallationPrefix)/.*$ | |
2 | %global __requires_exclude_from ^@(InstallationPrefix)/.*$ | |
3 | ||
4 | Name: @(Package) | |
5 | Version: @(Version) | |
6 | Release: @(RPMInc)%{?dist} | |
7 | Summary: ROS @(Name) package | |
8 | ||
9 | License: @(License) | |
10 | @[if Homepage and Homepage != '']URL: @(Homepage)@\n@[end if]Source0: %{name}-%{version}.tar.gz | |
11 | @[if NoArch]@\nBuildArch: noarch@\n@[end if] | |
12 | @[for p in Depends]Requires: @p@\n@[end for]@[for p in sorted(BuildDepends + ['python%{python3_pkgversion}-devel'])]BuildRequires: @p@\n@[end for]@[for p in Conflicts]Conflicts: @p@\n@[end for]@[for p in Replaces]Obsoletes: @p@\n@[end for] | |
13 | %description | |
14 | @(Description) | |
15 | ||
16 | %prep | |
17 | %autosetup | |
18 | ||
19 | %build | |
20 | # In case we're installing to a non-standard location, look for a setup.sh | |
21 | # in the install tree that was dropped by catkin, and source it. It will | |
22 | # set things like CMAKE_PREFIX_PATH, PKG_CONFIG_PATH, and PYTHONPATH. | |
23 | if [ -f "@(InstallationPrefix)/setup.sh" ]; then . "@(InstallationPrefix)/setup.sh"; fi | |
24 | %py3_build | |
25 | ||
26 | %install | |
27 | # In case we're installing to a non-standard location, look for a setup.sh | |
28 | # in the install tree that was dropped by catkin, and source it. It will | |
29 | # set things like CMAKE_PREFIX_PATH, PKG_CONFIG_PATH, and PYTHONPATH. | |
30 | if [ -f "@(InstallationPrefix)/setup.sh" ]; then . "@(InstallationPrefix)/setup.sh"; fi | |
31 | %py3_install -- --prefix "@(InstallationPrefix)" | |
32 | ||
33 | %files | |
34 | @(InstallationPrefix) | |
35 | ||
36 | %changelog@[for change_version, (change_date, main_name, main_email) in changelogs]@\n* @(change_date) @(main_name) <@(main_email)> - @(change_version)@\n- Autogenerated by Bloom@\n@[end for] |
0 | %global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g') | |
1 | %global __provides_exclude_from ^@(InstallationPrefix)/.*$ | |
2 | %global __requires_exclude_from ^@(InstallationPrefix)/.*$ | |
3 | ||
0 | 4 | Name: @(Package) |
1 | 5 | Version: @(Version) |
2 | 6 | Release: @(RPMInc)%{?dist} |
3 | 7 | Summary: ROS @(Name) package |
4 | 8 | |
5 | Group: Development/Libraries | |
6 | 9 | License: @(License) |
7 | 10 | @[if Homepage and Homepage != '']URL: @(Homepage)@\n@[end if]Source0: %{name}-%{version}.tar.gz |
8 | 11 | @[if NoArch]@\nBuildArch: noarch@\n@[end if] |
11 | 14 | @(Description) |
12 | 15 | |
13 | 16 | %prep |
14 | %setup -q | |
17 | %autosetup | |
15 | 18 | |
16 | 19 | %build |
17 | 20 | # In case we're installing to a non-standard location, look for a setup.sh |
19 | 22 | # set things like CMAKE_PREFIX_PATH, PKG_CONFIG_PATH, and PYTHONPATH. |
20 | 23 | if [ -f "@(InstallationPrefix)/setup.sh" ]; then . "@(InstallationPrefix)/setup.sh"; fi |
21 | 24 | mkdir -p obj-%{_target_platform} && cd obj-%{_target_platform} |
22 | %cmake .. \ | |
23 | -UINCLUDE_INSTALL_DIR \ | |
24 | -ULIB_INSTALL_DIR \ | |
25 | -USYSCONF_INSTALL_DIR \ | |
26 | -USHARE_INSTALL_PREFIX \ | |
27 | -ULIB_SUFFIX \ | |
28 | -DCMAKE_INSTALL_LIBDIR="lib" \ | |
29 | -DCMAKE_INSTALL_PREFIX="@(InstallationPrefix)" \ | |
30 | -DCMAKE_PREFIX_PATH="@(InstallationPrefix)" \ | |
31 | -DSETUPTOOLS_DEB_LAYOUT=OFF \ | |
32 | -DCATKIN_BUILD_BINARY_PACKAGE="1" \ | |
25 | %cmake3 \ | |
26 | -UINCLUDE_INSTALL_DIR \ | |
27 | -ULIB_INSTALL_DIR \ | |
28 | -USYSCONF_INSTALL_DIR \ | |
29 | -USHARE_INSTALL_PREFIX \ | |
30 | -ULIB_SUFFIX \ | |
31 | -DCMAKE_INSTALL_LIBDIR="lib" \ | |
32 | -DCMAKE_INSTALL_PREFIX="@(InstallationPrefix)" \ | |
33 | -DCMAKE_PREFIX_PATH="@(InstallationPrefix)" \ | |
34 | -DSETUPTOOLS_DEB_LAYOUT=OFF \ | |
35 | -DCATKIN_BUILD_BINARY_PACKAGE="1" \ | |
36 | .. | |
33 | 37 | |
34 | make %{?_smp_mflags} | |
38 | %make_build | |
35 | 39 | |
36 | 40 | %install |
37 | 41 | # In case we're installing to a non-standard location, look for a setup.sh |
38 | 42 | # in the install tree that was dropped by catkin, and source it. It will |
39 | 43 | # set things like CMAKE_PREFIX_PATH, PKG_CONFIG_PATH, and PYTHONPATH. |
40 | 44 | if [ -f "@(InstallationPrefix)/setup.sh" ]; then . "@(InstallationPrefix)/setup.sh"; fi |
41 | cd obj-%{_target_platform} | |
42 | make %{?_smp_mflags} install DESTDIR=%{buildroot} | |
45 | %make_install -C obj-%{_target_platform} | |
43 | 46 | |
44 | 47 | %files |
45 | 48 | @(InstallationPrefix) |
0 | %global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g') | |
1 | %global __provides_exclude_from ^@(InstallationPrefix)/.*$ | |
2 | %global __requires_exclude_from ^@(InstallationPrefix)/.*$ | |
3 | ||
0 | 4 | Name: @(Package) |
1 | 5 | Version: @(Version) |
2 | 6 | Release: @(RPMInc)%{?dist} |
3 | 7 | Summary: ROS @(Name) package |
4 | 8 | |
5 | Group: Development/Libraries | |
6 | 9 | License: @(License) |
7 | 10 | @[if Homepage and Homepage != '']URL: @(Homepage)@\n@[end if]Source0: %{name}-%{version}.tar.gz |
8 | 11 | @[if NoArch]@\nBuildArch: noarch@\n@[end if] |
11 | 14 | @(Description) |
12 | 15 | |
13 | 16 | %prep |
14 | %setup -q | |
17 | %autosetup | |
15 | 18 | |
16 | 19 | %build |
17 | 20 | # In case we're installing to a non-standard location, look for a setup.sh |
19 | 22 | # set things like CMAKE_PREFIX_PATH, PKG_CONFIG_PATH, and PYTHONPATH. |
20 | 23 | if [ -f "@(InstallationPrefix)/setup.sh" ]; then . "@(InstallationPrefix)/setup.sh"; fi |
21 | 24 | mkdir -p obj-%{_target_platform} && cd obj-%{_target_platform} |
22 | %cmake .. \ | |
23 | -UINCLUDE_INSTALL_DIR \ | |
24 | -ULIB_INSTALL_DIR \ | |
25 | -USYSCONF_INSTALL_DIR \ | |
26 | -USHARE_INSTALL_PREFIX \ | |
27 | -ULIB_SUFFIX \ | |
28 | -DCMAKE_INSTALL_LIBDIR="lib" \ | |
29 | -DCMAKE_INSTALL_PREFIX="@(InstallationPrefix)" \ | |
30 | -DCMAKE_PREFIX_PATH="@(InstallationPrefix)" \ | |
31 | -DSETUPTOOLS_DEB_LAYOUT=OFF \ | |
32 | -DCATKIN_BUILD_BINARY_PACKAGE="1" \ | |
25 | %cmake3 \ | |
26 | -UINCLUDE_INSTALL_DIR \ | |
27 | -ULIB_INSTALL_DIR \ | |
28 | -USYSCONF_INSTALL_DIR \ | |
29 | -USHARE_INSTALL_PREFIX \ | |
30 | -ULIB_SUFFIX \ | |
31 | -DCMAKE_INSTALL_LIBDIR="lib" \ | |
32 | -DCMAKE_INSTALL_PREFIX="@(InstallationPrefix)" \ | |
33 | -DCMAKE_PREFIX_PATH="@(InstallationPrefix)" \ | |
34 | -DSETUPTOOLS_DEB_LAYOUT=OFF \ | |
35 | -DCATKIN_BUILD_BINARY_PACKAGE="1" \ | |
36 | .. | |
33 | 37 | |
34 | make %{?_smp_mflags} | |
38 | %make_build | |
35 | 39 | |
36 | 40 | %install |
37 | 41 | # In case we're installing to a non-standard location, look for a setup.sh |
38 | 42 | # in the install tree that was dropped by catkin, and source it. It will |
39 | 43 | # set things like CMAKE_PREFIX_PATH, PKG_CONFIG_PATH, and PYTHONPATH. |
40 | 44 | if [ -f "@(InstallationPrefix)/setup.sh" ]; then . "@(InstallationPrefix)/setup.sh"; fi |
41 | cd obj-%{_target_platform} | |
42 | make %{?_smp_mflags} install DESTDIR=%{buildroot} | |
45 | %make_install -C obj-%{_target_platform} | |
43 | 46 | |
44 | 47 | %files |
45 | 48 | @(InstallationPrefix) |
136 | 136 | return get_index().distributions[distro].get('distribution_type') |
137 | 137 | |
138 | 138 | |
139 | def get_python_version(distro): | |
140 | return get_index().distributions[distro].get('python_version') | |
141 | ||
142 | ||
139 | 143 | def get_most_recent(thing_name, repository, reference_distro): |
140 | 144 | reference_distro_type = get_distribution_type(reference_distro) |
141 | 145 | distros_with_entry = {} |
9 | 9 | 'python-dateutil', |
10 | 10 | 'PyYAML', |
11 | 11 | 'rosdep >= 0.15.0', |
12 | 'rosdistro >= 0.7.0', | |
12 | 'rosdistro >= 0.7.5', | |
13 | 13 | 'vcstools >= 0.1.22', |
14 | 14 | ] |
15 | 15 | |
21 | 21 | |
22 | 22 | setup( |
23 | 23 | name='bloom', |
24 | version='0.8.0', | |
24 | version='0.9.0', | |
25 | 25 | packages=find_packages(exclude=['test', 'test.*']), |
26 | 26 | package_data={ |
27 | 27 | 'bloom.generators.debian': [ |
0 | 0 | [DEFAULT] |
1 | Depends: python-yaml, python-empy, python-argparse, python-rosdep (>= 0.15.0), python-rosdistro (>= 0.7.0), python-vcstools (>= 0.1.22), python-setuptools, python-catkin-pkg (>= 0.4.3) | |
2 | Depends3: python3-yaml, python3-empy, python3-rosdep (>= 0.15.0), python3-rosdistro (>= 0.7.0), python3-vcstools (>= 0.1.22), python3-setuptools, python3-catkin-pkg (>= 0.4.3) | |
1 | Depends: python-yaml, python-empy, python-argparse, python-rosdep (>= 0.15.0), python-rosdistro (>= 0.7.5), python-vcstools (>= 0.1.22), python-setuptools, python-catkin-pkg (>= 0.4.3) | |
2 | Depends3: python3-yaml, python3-empy, python3-rosdep (>= 0.15.0), python3-rosdistro (>= 0.7.5), python3-vcstools (>= 0.1.22), python3-setuptools, python3-catkin-pkg (>= 0.4.3) | |
3 | 3 | Conflicts: python3-bloom |
4 | 4 | Conflicts3: python-bloom |
5 | 5 | Copyright-File: LICENSE.txt |
6 | Suite: trusty utopic vivid wily xenial yakkety zesty artful bionic jessie stretch buster | |
6 | Suite: xenial yakkety zesty artful bionic cosmic disco eoan jessie stretch buster | |
7 | 7 | X-Python3-Version: >= 3.4 |
48 | 48 | assert os.path.exists('tracks.yaml'), \ |
49 | 49 | "no tracks.yaml file in the 'bloom' branch" |
50 | 50 | with open('tracks.yaml', 'r') as f: |
51 | tracks_dict = yaml.load(f.read()) | |
51 | tracks_dict = yaml.safe_load(f.read()) | |
52 | 52 | assert 'tracks' in tracks_dict, "bad bloom configurations" |
53 | 53 | assert 'foo' in tracks_dict['tracks'], "bad bloom configurations" |
54 | 54 | track = tracks_dict['tracks']['foo'] |
361 | 361 | with open('debian/copyright', 'r') as f: |
362 | 362 | assert pkg + ' license' in f.read(), \ |
363 | 363 | "debian/copyright does not include right license text" |
364 | ||
365 | @in_temporary_directory | |
366 | def test_upstream_tag_special_tag(directory=None): | |
367 | """ | |
368 | Release a single package catkin (melodic) repository, first put | |
369 | an upstream tag into the release repository to test that bloom | |
370 | can handle it. | |
371 | """ | |
372 | directory = directory if directory is not None else os.getcwd() | |
373 | # Setup | |
374 | upstream_dir = create_upstream_repository(['foo'], directory) | |
375 | upstream_url = 'file://' + upstream_dir | |
376 | release_url = create_release_repo( | |
377 | upstream_url, | |
378 | 'git', | |
379 | 'melodic_devel', | |
380 | 'melodic') | |
381 | release_dir = os.path.join(directory, 'foo_release_clone') | |
382 | release_client = get_vcs_client('git', release_dir) | |
383 | assert release_client.checkout(release_url) | |
384 | ||
385 | with change_directory(release_dir): | |
386 | user('git tag upstream/0.0.0@baz') | |
387 | ||
388 | import bloom.commands.git.release | |
389 | _test_unary_package_repository(release_dir, '0.1.0', directory) |