Skip to content

Commit

Permalink
Fix installation path for CentOS 8.3
Browse files Browse the repository at this point in the history
CentOS 8.3 ships systemd version 239 but has non-standart output of the
pkg-config which results in wrong version identification and setup
failure:
```
[root@aio1 ~]# pkg-config --modversion libsystemd
239 (239-41.el8_3)
[root@aio1 ~]#
```

This can be overriden with ENV var LIBSYSTEMD_VERSION but not handy.
  • Loading branch information
Dmitriy Rabotyagov committed Dec 9, 2020
1 parent 2166b57 commit 02671b1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@ def pkgconfig(package, **kw):
# allow version detection to be overridden using environment variables
version = os.getenv(pkg_version)
if not version:
version = check_output([pkgconf, '--modversion', package],
version_output = check_output([pkgconf, '--modversion', package],
universal_newlines=True).strip()
version = version_output.split()[0]
pair = (pkg_version, version)
defines = kw.setdefault('define_macros', [])
if pair not in defines:
Expand Down

0 comments on commit 02671b1

Please sign in to comment.