Ticket #7204 (closed: fixed)

Opened 7 years ago

Last modified 5 years ago

Fixes needed to be able to build the Framework on its own

Reported by: Russell Taylor Owned by: Russell Taylor
Priority: minor Milestone: Release 2.6
Component: Framework Keywords:
Cc: Blocked By:
Blocking: Tester: Martyn Gigg

Description

A couple of things:

  • The new python 'testhelpers' target is not added as a dependency to the 'FrameworkTests' target, so if you just build that then some python tests fail.
  • A variable PYTHON_EXE_WRAPPER is being used in PythonInterface/mantid/CMakeLists.txt that has been defined up in the very top-level CMakeLists, meaning that it doesn't get defined for a framework-only build.

Change History

comment:1 Changed 7 years ago by Russell Taylor

  • Status changed from new to accepted

comment:2 Changed 7 years ago by Russell Taylor

Re #7204. Move definition of varible closer to where it is used.

The PYTHON_EXE_WRAPPER variable, introduced under #6903, was being defined up in the very top-level CMakeLists.txt. This meant that it was not being set for a Framework only build of Mantid (i.e. when cmake is pointed at Mantid/Framework).

Changeset: ed0163f88970d681096d54340ad11d7b1d6f444b

comment:3 Changed 7 years ago by Russell Taylor

Re #7204. Add the python-related testhelpers target to FrameworkTests.

Otherwise tests fail after only a 'make FrameworkTests'.

Changeset: 391fcd27f14292fef717e09b24de56cd8af6b023

comment:4 Changed 7 years ago by Russell Taylor

Revert "Re #7204. Move definition of varible closer to where it is used."

This reverts commit ed0163f88970d681096d54340ad11d7b1d6f444b.

Changeset: 40d7d6d18d864bf3c9560ccb7d6126d9e6ec45c4

comment:5 Changed 7 years ago by Russell Taylor

Re #7204. Move variable definition so that Framework build sees it.

Changeset: 9a6af27016671d8d46280a9f2a11235b8946edf2

comment:6 Changed 7 years ago by Russell Taylor

Revert "Re #7204. Move definition of varible closer to where it is used."

This reverts commit ed0163f88970d681096d54340ad11d7b1d6f444b.

Changeset: 40d7d6d18d864bf3c9560ccb7d6126d9e6ec45c4

comment:7 Changed 7 years ago by Russell Taylor

Re #7204. Move variable definition so that Framework build sees it.

Changeset: 9a6af27016671d8d46280a9f2a11235b8946edf2

comment:8 Changed 7 years ago by Russell Taylor

  • Status changed from accepted to verify
  • Resolution set to fixed

This ticket is best tested on Windows and the proper test is to undertake a build of just the framework (i.e. create a new build directory and point cmake at Mantid/Framework/). This is not the same as building the Framework target! Everything should build and the tests should succeed.

This manifested itself in failures of these jobs (which were both builds of the master branch): https://builds.sns.gov/view/Framework%20only/job/ornl_windows7_framework/42/ https://builds.sns.gov/view/Framework%20only/job/ornl_rhel6_mpi/2020/

The ornl_rhel6_mpi job has since been pointed at the develop branch and is now passing.

comment:9 Changed 7 years ago by Martyn Gigg

  • Status changed from verify to verifying
  • Tester set to Martyn Gigg

comment:10 Changed 7 years ago by Martyn Gigg

  • Status changed from verifying to reopened
  • Resolution fixed deleted

When running generate on Windows I get

CMake Error at PythonInterface/mantid/CMakeLists.txt:40 (add_custom_target):
  Cannot find source file:

    C:/GitHub/mantid/Code/Mantid/Framework/Build/win_python.bat

  Tried extensions .c .C .c++ .cc .cpp .cxx .m .M .mm .h .hh .h++ .hm .hpp
  .hxx .in .txx

I think it's because the line

set ( PYTHON_EXE_WRAPPER_SRC "${CMAKE_CURRENT_SOURCE_DIR}/Build/win_python.bat" )

is on CommonSetup now but ${CMAKE_CURRENT_SOURCE_DIR} refers to the Framework directory. An easy fix would be using the CMAKE_MODULE_PATH instead.

set ( PYTHON_EXE_WRAPPER_SRC "${CMAKE_MODULE_PATH}/Build/win_python.bat" )

or I guess we could use a new variable that points at the Build directory?

comment:11 Changed 7 years ago by Russell Taylor

  • Status changed from reopened to accepted

comment:12 Changed 7 years ago by Russell Taylor

Re #7204. Correct path to python wrapper for Framework build.

Changeset: 88e13fb6bd3c8dae11721d11fb4aa58eb3deb774

comment:13 Changed 7 years ago by Russell Taylor

  • Status changed from accepted to verify
  • Resolution set to fixed

Should be OK now.

comment:14 Changed 7 years ago by Martyn Gigg

  • Status changed from verify to verifying

comment:15 Changed 7 years ago by Martyn Gigg

  • Status changed from verifying to closed

Looks fine now.

comment:16 Changed 7 years ago by Nick Draper

  • Component changed from Mantid to Framework

comment:17 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 8050

Note: See TracTickets for help on using tickets.