diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 000000000..ab1ae570a --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,31 @@ +--- +name: Bug report +about: Create a bug report +title: '' +labels: bug +assignees: '' + +--- + +Describe the bug here. + +**Environment** +* OS (eg "linux ubuntu 18.04") +* Rez version (eg "2.100.0") +* Rez python version (output of "rez-python --version") + +**To Reproduce** +1. Do a thing +2. Do another thing + +**Expected behavior** +Describe what you expected to happen. + +**Actual behavior** +Describe the faulty behaviour you're currently seeing. + +**Related Issues/PRs** +* #1241 (delete this section if N/A) + +**Regression** +If applicable, state the last known rez version where the bug did not occur (delete this section if N/A). diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 000000000..28cb1ea74 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,16 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: '' +labels: enhancement +assignees: '' + +--- + +Describe your feature request here. + +**Motivation** +Explain why the project should have this feature. + +**Related Issues/PRs** +* #1241 (delete this section if N/A) diff --git a/.github/workflows/ubuntu.yaml b/.github/workflows/ubuntu.yaml index 3ffd1a40f..71216da3c 100644 --- a/.github/workflows/ubuntu.yaml +++ b/.github/workflows/ubuntu.yaml @@ -37,6 +37,10 @@ jobs: with: python-version: ${{ matrix.python-version }} + - name: apt-get update + run: | + sudo apt-get update + - name: Verify cmake run: | cmake --version diff --git a/CHANGELOG.md b/CHANGELOG.md index 27f4fb227..258f91a06 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,16 @@ # Change Log +## 2.104.10 (2022-03-19) +[Source](https://github.com/nerdvegas/rez/tree/2.104.10) | [Diff](https://github.com/nerdvegas/rez/compare/2.104.9...2.104.10) + +**Merged pull requests:** + +- fix: make cmake install directives whitespace friendly [\#1244](https://github.com/nerdvegas/rez/pull/1244) ([maxnbk](https://github.com/maxnbk)) + +**Closed issues:** + +- rez_install_files with LOCAL_SYMLINK fails when an input file has whitespaces in its name [\#553](https://github.com/nerdvegas/rez/issues/553) + ## 2.104.9 (2022-03-01) [Source](https://github.com/nerdvegas/rez/tree/2.104.9) | [Diff](https://github.com/nerdvegas/rez/compare/2.104.8...2.104.9) diff --git a/src/rez/data/tests/builds/packages/translate_lib/2.2.0/CMakeLists.txt b/src/rez/data/tests/builds/packages/translate_lib/2.2.0/CMakeLists.txt index 8dbe11d5f..affcfd0ec 100644 --- a/src/rez/data/tests/builds/packages/translate_lib/2.2.0/CMakeLists.txt +++ b/src/rez/data/tests/builds/packages/translate_lib/2.2.0/CMakeLists.txt @@ -18,6 +18,15 @@ rez_install_files( DESTINATION include/translate ) +# install docs +FILE(GLOB_RECURSE doc_files "docs/*") +rez_install_files( + ${doc_files} + RELATIVE src + DESTINATION docs + LOCAL_SYMLINK # Testing for github issue #553 +) + # install cmake file rez_install_cmake( DESTINATION cmake diff --git a/src/rez/data/tests/builds/packages/translate_lib/2.2.0/docs/a spaced document b/src/rez/data/tests/builds/packages/translate_lib/2.2.0/docs/a spaced document new file mode 100644 index 000000000..44d1261d7 --- /dev/null +++ b/src/rez/data/tests/builds/packages/translate_lib/2.2.0/docs/a spaced document @@ -0,0 +1,3 @@ +This file has spaces in its name +which is here so that cmake macros +get tested for handling spaces in filenames diff --git a/src/rez/data/tests/builds/packages/translate_lib/2.2.0/docs/an_unspaced_document b/src/rez/data/tests/builds/packages/translate_lib/2.2.0/docs/an_unspaced_document new file mode 100644 index 000000000..42580c74f --- /dev/null +++ b/src/rez/data/tests/builds/packages/translate_lib/2.2.0/docs/an_unspaced_document @@ -0,0 +1,3 @@ +This file very much does not +have a space in its name, as +a counterpart to the other diff --git a/src/rez/tests/test_build.py b/src/rez/tests/test_build.py index cb615f17b..4f74de8cd 100644 --- a/src/rez/tests/test_build.py +++ b/src/rez/tests/test_build.py @@ -118,7 +118,12 @@ def _test_build_translate_lib(self): self._test_build("translate_lib", "2.2.0") context = self._create_context("translate_lib==2.2.0") environ = context.get_environ() - find_file_in_path('translate_lib.cmake', environ['CMAKE_MODULE_PATH']) + root = environ['REZ_TRANSLATE_LIB_ROOT'] + self.assertTrue(find_file_in_path('translate_lib.cmake', environ['CMAKE_MODULE_PATH'])) + # is testing symlinks + self.assertTrue(find_file_in_path('an_unspaced_document', os.path.join(root, 'docs'))) + # is testing spaces in symlinks per issue #553 + self.assertTrue(find_file_in_path('a spaced document', os.path.join(root, 'docs'))) def _test_build_sup_world(self): """Build, install, test the sup_world package.""" @@ -156,6 +161,7 @@ def test_builds_anti(self): self._test_build_anti() @program_dependent("cmake") + @install_dependent() def test_build_cmake(self): """Test a cmake-based package.""" if platform_.name == "windows": diff --git a/src/rez/utils/_version.py b/src/rez/utils/_version.py index 330445f1b..3cf96f82d 100644 --- a/src/rez/utils/_version.py +++ b/src/rez/utils/_version.py @@ -3,4 +3,4 @@ # Update this value to version up Rez. Do not place anything else in this file. -_rez_version = "2.104.9" +_rez_version = "2.104.10" diff --git a/src/rezplugins/build_system/cmake_files/InstallFiles.cmake b/src/rezplugins/build_system/cmake_files/InstallFiles.cmake index fd47842b9..ac013201c 100644 --- a/src/rezplugins/build_system/cmake_files/InstallFiles.cmake +++ b/src/rezplugins/build_system/cmake_files/InstallFiles.cmake @@ -134,14 +134,14 @@ macro (install_files_) # install files # foreach(f ${INSTF_DEFAULT_ARGS}) - get_target_filepath(${f} ${rel_dir} ${dest_dir} target_fpath) - get_filename_component(target_path ${target_fpath} PATH) + get_target_filepath("${f}" "${rel_dir}" "${dest_dir}" target_fpath) + get_filename_component(target_path "${target_fpath}" PATH) if(REZ_BUILD_TYPE STREQUAL "central" OR NOT INSTF_LOCAL_SYMLINK) - install(FILES ${f} DESTINATION ${target_path} PERMISSIONS ${perms}) + install(FILES "${f}" DESTINATION "${target_path}" PERMISSIONS ${perms}) else() install( CODE "message (STATUS \"Symlink : ${CMAKE_INSTALL_PREFIX}/${target_fpath} -> ${f}\" )" ) - install( CODE "execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_INSTALL_PREFIX}/${target_path})" ) - install( CODE "execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink ${f} ${CMAKE_INSTALL_PREFIX}/${target_fpath})" ) + install( CODE "execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory \"${CMAKE_INSTALL_PREFIX}/${target_path}\")" ) + install( CODE "execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink \"${f}\" \"${CMAKE_INSTALL_PREFIX}/${target_fpath}\")" ) endif(REZ_BUILD_TYPE STREQUAL "central" OR NOT INSTF_LOCAL_SYMLINK) endforeach(f ${INSTF_DEFAULT_ARGS})