From e958c85b37ccea26ae5e865fe410bdf37fb1f89d Mon Sep 17 00:00:00 2001 From: Nirbheek Chauhan Date: Wed, 12 Feb 2020 01:56:23 +0530 Subject: [PATCH] Nuke setup.py: It doesn't do anything special It's just confusing for people to see that in the build root, and we do not even mention this file in the README. --- setup.py | 82 ---------------------------------------------------------------- 1 file changed, 82 deletions(-) delete mode 100755 setup.py diff --git a/setup.py b/setup.py deleted file mode 100755 index 2776678..0000000 --- a/setup.py +++ /dev/null @@ -1,82 +0,0 @@ -#!/usr/bin/env python3 -"""Script for generating the Makefiles.""" - -import argparse -import os -import sys -import shutil -import subprocess - -from scripts.common import get_meson -from scripts.common import accept_command - - -PROJECTNAME = "GStreamer build" - -ROOTDIR = os.path.abspath(os.path.dirname(__file__)) - - -class GstBuildConfigurer: - - def __init__(self, options, args): - self.options = options - self.args = args - - def get_configs(self): - if self.options.werror: - return ['--werror'] - return [] - - def configure_meson(self): - if not self.options.reconfigure: - if os.path.exists(ROOTDIR + "/build/build.ninja"): - print("Not reconfiguring") - return True - - try: - meson = get_meson() - except RuntimeError: - print("Install mesonbuild to build %s: http://mesonbuild.com/\n" - "You can simply install it with:\n" - " $ sudo pip3 install meson" % PROJECTNAME) - return False - - ninja = accept_command(["ninja", "ninja-build"]) - if not ninja: - print("Install ninja-build to build %s: https://ninja-build.org/" - % PROJECTNAME) - return False - - build_dir = os.path.join(ROOTDIR, "build") - shutil.rmtree(build_dir, True) - os.mkdir(build_dir) - - try: - subprocess.check_call(meson + ["../"] + self.args + self.get_configs(), - cwd=build_dir) - print("\nYou can now build GStreamer and its various subprojects running:\n" - " $ {} -C {!r}".format(os.path.basename(ninja), build_dir)) - except subprocess.CalledProcessError: - return False - - return True - - def setup(self): - return self.configure_meson() - - - -if __name__ == "__main__": - parser = argparse.ArgumentParser(description='Process some integers.') - parser.add_argument("--reconfigure", action='store_true', - default=False, help='Force a full reconfiguration' - ' meaning the build/ folder is removed.' - ' You can also use `ninja reconfigure` to just' - ' make sure meson is rerun but the build folder' - ' is kept.') - parser.add_argument("--werror", action='store_true', - default=False, help="Do not error out on warnings") - - options, args = parser.parse_known_args() - configurer = GstBuildConfigurer(options, args) - exit(not configurer.setup()) -- 2.7.4