Print

Print


  Branch: refs/heads/devel
  Home:   https://github.com/xrootd/xrootd
  Commit: 2f28fd1319e350b62df1f18de2a1ae50ea5664e4
      https://github.com/xrootd/xrootd/commit/2f28fd1319e350b62df1f18de2a1ae50ea5664e4
  Author: Guilherme Amadio <[log in to unmask]>
  Date:   2023-08-24 (Thu, 24 Aug 2023)

  Changed paths:
    M bindings/python/setup.py
    M setup.py

  Log Message:
  -----------
  [Python] Allow build customization via environment variable

This lets users export the CMAKE_ARGS environment variable to pass extra
options to CMake when configuring to allow users to customize the build.
If possible, arguments are split with shlex so that quotes are preserved
for options that may contain space characters. If shlex is not available,
then arguments are split on blank space. For example, to set the CXXFLAGS
to "-Wall -g", use:

$ export CMAKE_ARGS="-DCMAKE_CXX_FLAGS='-Wall -g'"
$ python3 -m pip wheel --verbose .

Alternatively, one may set options in a CMake cache file:

$ echo 'set(CMAKE_CXX_FLAGS "-Wall -g" CACHE STRING "" FORCE)' > cfg.cmake
$ env CMAKE_ARGS='-C cfg.cmake' python3 -m pip wheel --verbose .

Of course, some variables like CXXFLAGS are used automatically by CMake,
so in this case you can use the variable directly rather than use the
CMAKE_ARGS environment variable. For example, to compile the Python
bindings with Clang, one can use directly the CC and CXX variables:

env CC=clang CXX=clang++ python3 -m pip wheel --verbose .

Closes: #2062


  Commit: d2a5cb508123d434c80c7e91028d6a12aa0e0d3e
      https://github.com/xrootd/xrootd/commit/d2a5cb508123d434c80c7e91028d6a12aa0e0d3e
  Author: Guilherme Amadio <[log in to unmask]>
  Date:   2023-08-24 (Thu, 24 Aug 2023)

  Changed paths:
    M bindings/python/CMakeLists.txt
    M cmake/XRootDFindLibs.cmake

  Log Message:
  -----------
  [Python] Check for Development.Module with CMake 3.18 and above

In order to build binary wheels with manylinux images, we need to
not depend on Development.Embed, since on those images, libpython
is not available and CMake will not consider Python found without
this change. XRootD only needs the Python.h header to build the
Python bindings. Issue: #1833.

See also: https://github.com/pypa/manylinux/issues/484


Compare: https://github.com/xrootd/xrootd/compare/e53d4c8dd48b...d2a5cb508123

########################################################################
Use REPLY-ALL to reply to list

To unsubscribe from the XROOTD-DEV list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=XROOTD-DEV&A=1