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 <phrdina@redhat.com>
This commit is contained in:
Pavel Hrdina 2024-10-25 14:48:27 +02:00 committed by Pavel Hrdina
parent 5f34dea0ed
commit 31cb321909
3 changed files with 0 additions and 111 deletions

2
.gitignore vendored
View File

@ -3,9 +3,7 @@
*.gmo
/build
/dist
/.coverage
/MANIFEST
/data/gschemas.compiled

View File

@ -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

View File

@ -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=[],
)