Skip to content
Snippets Groups Projects

Add missing Find-modules and dependencies for flake8

Merged Frank Winklmeier requested to merge fwinkl/atlasexternals:flake8_deps into master

Add Find-modules for:

  • pycodestyle
  • pyflakes
  • flake8

Add missing dependencies for pycodestyle and pyflakes to our own build of flake8. Since LCG_96b flake8 is also available in LCG. So once all relevant branches are using it, we could decide to drop our own build.

Fixes ATLINFR-3297

Edited by Frank Winklmeier

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • :o: AE Build FAILURE
    Build logfiles are available at Jenkins [AE-MERGE-REQUEST-CC7 #118]

  • Author Maintainer

    Oh dear, so it fails with:

    -- Found typing: /cvmfs/sft.cern.ch/lcg/releases/LCG_95/typing/3.6.6/x86_64-centos7-gcc8-opt/lib/python2.7/site-packages  
    CMake Error at /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/Cmake/3.14.3/Linux-x86_64/share/cmake-3.14/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
      Could NOT find pyflakes (missing: _PYFLAKES_PYTHON_PATH)

    I am not entirely sure how we make this compatible with multiple LCG versions. The situation is:

    1. If pyflakes, pycodestyle, etc. is available in LCG we need to declare a dependency on them in PyModules/CMakeLists.txt so they get installed in our own LCG area.
    2. If pyflakes, pycodestyle, etc. is NOT available in LCG the pip install flake8 will simply build them as part of PyModules and they get installed via AthenaExternals.

    Should I simply remove the REQUIRED from the find_package calls?

  • Yes. Stop using REQUIRED for modules that may or may not be available. And then decide how to install flake8 based on PYFLAKES_FOUND and similar variables.

  • added 1 commit

    • 7e390681 - PyModules: Fix for optional LCG dependencies of flake8

    Compare with previous version

  • Frank Winklmeier resolved all threads

    resolved all threads

  • :white_check_mark: AE Build SUCCESS
    Build logfiles are available at Jenkins [AE-MERGE-REQUEST-CC7 #120]

  • Author Maintainer

    @akraszna thanks for all the comments. I have to say, I just blindly copied code from https://gitlab.cern.ch/atlas/atlasexternals/blob/master/Build/AtlasLCG/modules/Findgraphviz.cmake. But sounds like this wasn't the most optimal example to begin with. I'll try my best ;-)

  • :frowning: Apparently I didn't update all modules quite correctly when I introduced the lcg_python_external_module(...) function. But at least some of them do use the feature that I'm promoting here. Like for instance:

    https://gitlab.cern.ch/atlas/atlasexternals/blob/master/Build/AtlasLCG/modules/Findpyxml.cmake

    But don't get me wrong, I'm definitely not blaming you...

  • added 1 commit

    • f708e4d7 - PyModules: Fix for optional LCG dependencies of flake8

    Compare with previous version

  • Author Maintainer

    No worries, I think I implemented all your changes.

    Btw, while doing so (and using cmake 3.15.5) I found that our Findpip module doesn't seem to be working with that version. But that's for another MR to sort out.

  • Frank Winklmeier changed the description

    changed the description

  • :white_check_mark: AE Build SUCCESS
    Build logfiles are available at Jenkins [AE-MERGE-REQUEST-CC7 #123]

  • Attila Krasznahorkay resolved all threads

    resolved all threads

  • mentioned in commit e4858947

  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading