[PATCH] D136976: [lit] Add pyproject.toml and fix build w/ modern setuptools backend

Michał Górny via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 31 23:30:33 PDT 2022


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG7b4b15042d2b: [lit] Add pyproject.toml and fix build w/ modern setuptools backend (authored by mgorny).

Changed prior to commit:
  https://reviews.llvm.org/D136976?vs=471637&id=472215#toc

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D136976/new/

https://reviews.llvm.org/D136976

Files:
  llvm/utils/lit/pyproject.toml
  llvm/utils/lit/setup.py


Index: llvm/utils/lit/setup.py
===================================================================
--- llvm/utils/lit/setup.py
+++ llvm/utils/lit/setup.py
@@ -1,5 +1,5 @@
-import lit
 import os
+import sys
 
 from setuptools import setup, find_packages
 
@@ -8,6 +8,9 @@
 #   python path/to/setup.py install
 # to work (for scripts, etc.)
 os.chdir(os.path.dirname(os.path.abspath(__file__)))
+sys.path.insert(0, ".")
+
+import lit
 
 with open("README.rst", "r", encoding="utf-8") as f:
     long_description = f.read()
Index: llvm/utils/lit/pyproject.toml
===================================================================
--- /dev/null
+++ llvm/utils/lit/pyproject.toml
@@ -0,0 +1,3 @@
+[build-system]
+requires = ["setuptools"]
+build-backend = "setuptools.build_meta"


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D136976.472215.patch
Type: text/x-patch
Size: 774 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221101/587bd69d/attachment.bin>


More information about the llvm-commits mailing list