Unverified Commit 24d20fef authored by Someone's avatar Someone Committed by Someone Serge
Browse files

python3Packages.openai-triton: inline bash comments



The drawback of this is that the comments now affect outPath's. Hopefully, though, we'll remove this preFixup soon anyway

Co-authored-by: default avatarSandro <sandro.jaeckel@gmail.com>
parent 91f24957
Loading
Loading
Loading
Loading
+16 −21
Original line number Diff line number Diff line
@@ -163,27 +163,22 @@ buildPythonPackage {
  ];

  # Avoid GLIBCXX mismatch with other cuda-enabled python packages
  preConfigure =
    ''
  preConfigure = ''
    export CC="${backendStdenv.cc}/bin/cc";
    export CXX="${backendStdenv.cc}/bin/c++";
    ''

    # Upstream's setup.py tries to write cache somewhere in ~/
    + ''
    export HOME=$TMPDIR
    ''

    # Upstream's github actions patch setup.cfg to write base-dir. May be redundant
    + ''
      echo "" >> python/setup.cfg
      echo "[build_ext]" >> python/setup.cfg
      echo "base-dir=$PWD" >> python/setup.cfg
    ''
    echo "
    [build_ext]
    base-dir=$PWD" >> python/setup.cfg

    # The rest (including buildPhase) is relative to ./python/
    + ''
    cd python/
    ''

    # Work around download_and_copy_ptxas()
    + ''
    dst_cuda="$PWD/triton/third_party/cuda/bin"
    mkdir -p "$dst_cuda"
    ln -s "${ptxas}" "$dst_cuda/"