mirror of
https://github.com/virt-manager/virt-manager.git
synced 2024-12-21 09:34:12 +03:00
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:
parent
5f34dea0ed
commit
31cb321909
2
.gitignore
vendored
2
.gitignore
vendored
@ -3,9 +3,7 @@
|
||||
*.gmo
|
||||
|
||||
/build
|
||||
/dist
|
||||
|
||||
/.coverage
|
||||
/MANIFEST
|
||||
|
||||
/data/gschemas.compiled
|
||||
|
14
MANIFEST.in
14
MANIFEST.in
@ -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
|
95
setup.py
95
setup.py
@ -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=[],
|
||||
)
|
Loading…
Reference in New Issue
Block a user