From acf3caf7eb28767185e782815f145e373ca03923 Mon Sep 17 00:00:00 2001 From: Daan De Meyer Date: Fri, 8 Sep 2023 10:28:15 +0200 Subject: [PATCH] Add back setup.py file The pyproject metadata stuff depends on https://peps.python.org/pep-0621/ for which support is only available in a recent version of setuptools that isn't available in all distributions just yet. So let's add back a setup.py file to allow building on older distributions. --- setup.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 setup.py diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..077691d --- /dev/null +++ b/setup.py @@ -0,0 +1,26 @@ +#!/usr/bin/python3 +# SPDX-License-Identifier: LGPL-2.1+ + +from setuptools import setup, find_packages +from pathlib import Path + +def glob(glob: str) -> list[str]: + return [str(p.relative_to("mkosi/resources")) for p in Path("mkosi/resources").glob(glob) if p.is_file()] + +setup( + name="mkosi", + version="24", + description="Build Bespoke OS Images", + url="https://github.com/systemd/mkosi", + maintainer="mkosi contributors", + maintainer_email="systemd-devel@lists.freedesktop.org", + license="LGPLv2+", + python_requires=">=3.9", + packages = ["mkosi", "mkosi.distributions", "mkosi.initrd", "mkosi.initrd.resources", "mkosi.installer", "mkosi.resources"], + package_data = { + "mkosi.resources": [*glob("repart/**/*"), "mkosi.md", "mkosi.1", *glob("mkosi-initrd/**/*"), *glob("mkosi-tools/**/*")], + "mkosi.initrd": ["mkosi-initrd.md", "mkosi-initrd.1"], + }, + include_package_data = True, + entry_points = { "console_scripts": ["mkosi = mkosi.__main__:main", "mkosi-initrd = mkosi.initrd.__main__:main"] }, +) -- 2.41.0