summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz@archlinux.org>2022-12-01 19:53:30 -0500
committerJussi Pakkanen <jpakkane@gmail.com>2022-12-09 14:23:18 +0200
commit7b2c47eb45e7a5b4787e89a6b6f98a8753868d1a (patch)
tree97a7ee7c57fce464d24a061924592881475231dd
parentd490636328e78984af0b80c70a8217c4f9cf9c52 (diff)
downloadmeson-7b2c47eb45e7a5b4787e89a6b6f98a8753868d1a.tar.gz
python module: don't overwrite and destroy the .pc dependency name
When finding a py.dependency() we try to use pkg-config. We then apply our own custom base class, which replaces self.name with the informative comment "override the name from the "real" dependency lookup", to which I can only say "uhhh why". Why do we want to do that??? It turns out we don't, it was just a really old legacy design because we had a SystemDependency with a .pkgdep attribute hiding the real dependency bizarro-land style. We cleaned that up in commit 4d67dd19e5b7dcec6716840d30984fa41eef55c6 and as part of that, we *shifted over* the self.name assignment to preserve the visible effects, sort of. We didn't have a *reason* to override the name, we just did it because... we weren't sure whether it mattered. Unfortunately it very much does matter the other way -- we don't want it. We can pass this dependency to the pkgconfig module, which uses the name attribute to fill out the `Requires: ` field. Also, the name should name what we have. :p Get rid of this bizarre historic quirk. Since we have proper dependencies here, we should go all in. Fixes https://github.com/ufo-kit/ufo-core/pull/185#issuecomment-1328224996
-rw-r--r--mesonbuild/modules/python.py1
1 files changed, 0 insertions, 1 deletions
diff --git a/mesonbuild/modules/python.py b/mesonbuild/modules/python.py
index 6bbfdb9a4..f74d10e4c 100644
--- a/mesonbuild/modules/python.py
+++ b/mesonbuild/modules/python.py
@@ -91,7 +91,6 @@ mod_kwargs -= {'name_prefix', 'name_suffix'}
class _PythonDependencyBase(_Base):
def __init__(self, python_holder: 'PythonInstallation', embed: bool):
- self.name = 'python' # override the name from the "real" dependency lookup
self.embed = embed
self.version: str = python_holder.version
self.platform = python_holder.platform