From 31cb321909d257ef109027999463075c86b75f71 Mon Sep 17 00:00:00 2001 From: Pavel Hrdina Date: Fri, 25 Oct 2024 14:48:27 +0200 Subject: [PATCH] remove remaining setuptools files We will no longer have `rpm` target with meson. That should not be an issue as users can run `meson dist -C build` and `rpmbuild -tb build/meson-dist/virt-manager-{version}.tar.xz`. Signed-off-by: Pavel Hrdina --- .gitignore | 2 -- MANIFEST.in | 14 -------- setup.py | 95 ----------------------------------------------------- 3 files changed, 111 deletions(-) delete mode 100644 MANIFEST.in delete mode 100755 setup.py diff --git a/.gitignore b/.gitignore index 5d6abbaa7..89ad8a166 100644 --- a/.gitignore +++ b/.gitignore @@ -3,9 +3,7 @@ *.gmo /build -/dist /.coverage -/MANIFEST /data/gschemas.compiled diff --git a/MANIFEST.in b/MANIFEST.in deleted file mode 100644 index a4b9d7afc..000000000 --- a/MANIFEST.in +++ /dev/null @@ -1,14 +0,0 @@ -# to be included/excluded from the tarball produced by sdist -include COPYING CONTRIBUTING.md DESIGN.md INSTALL.md NEWS.md README.md -include MANIFEST.in -include setup.py -include virt-* -recursive-include data * -exclude data/gschemas.compiled -recursive-include man * -recursive-include po * -recursive-include tests * -recursive-include ui * -recursive-include virtManager * -recursive-include virtinst * -global-exclude *.pyc diff --git a/setup.py b/setup.py deleted file mode 100755 index a15c6b3a8..000000000 --- a/setup.py +++ /dev/null @@ -1,95 +0,0 @@ -#!/usr/bin/env python3 -# -# This work is licensed under the GNU GPLv2 or later. -# See the COPYING file in the top-level directory. - - -import sys -import glob -import importlib.util -import os -from pathlib import Path -import shutil -import sysconfig -import subprocess - -import setuptools -import setuptools.command.install -import setuptools.command.install_egg_info -try: - # Use the setuptools build command with setuptools >= 62.4.0 - import setuptools.command.build - BUILD_COMMAND_CLASS = setuptools.command.build.build -except ImportError: - # Use distutils with an older setuptools version - # - # Newer setuptools will transparently support 'import distutils' though. - # That can be overridden with SETUPTOOLS_USE_DISTUTILS env variable - import distutils.command.build # pylint: disable=wrong-import-order,deprecated-module,import-error - BUILD_COMMAND_CLASS = distutils.command.build.build # pylint: disable=c-extension-no-member - - -class my_egg_info(setuptools.command.install_egg_info.install_egg_info): - """ - Disable egg_info installation, seems pointless for a non-library - """ - def run(self): - pass - - -################### -# Custom commands # -################### - -class my_rpm(setuptools.Command): - user_options = [] - description = "Build RPMs and output to the source directory." - - def initialize_options(self): - pass - def finalize_options(self): - pass - - def run(self): - self.run_command('sdist') - srcdir = os.path.dirname(__file__) - cmd = [ - "rpmbuild", "-ta", - "--define", "_rpmdir %s" % srcdir, - "--define", "_srcrpmdir %s" % srcdir, - "--define", "_specdir /tmp", - "dist/virt-manager-%s.tar.gz" % BuildConfig.version, - ] - subprocess.check_call(cmd) - - -class TestCommand(setuptools.Command): - user_options = [] - description = "DEPRECATED: Use `pytest`. See CONTRIBUTING.md" - def finalize_options(self): - pass - def initialize_options(self): - pass - def run(self): - sys.exit("ERROR: `test` is deprecated. Call `pytest` instead. " - "See CONTRIBUTING.md for more info.") - - -setuptools.setup( - name="virt-manager", - version=BuildConfig.version, - url="https://virt-manager.org", - license="GPLv2+", - - # stop setuptools 61+ thinking we want to include everything automatically - py_modules=[], - - cmdclass={ - 'install_egg_info': my_egg_info, - - 'rpm': my_rpm, - 'test': TestCommand, - }, - - packages=[], -)