1
0
mirror of https://github.com/gryf/wicd.git synced 2025-12-30 10:22:31 +01:00

Use setuptools instead of pure distutils

This commit is contained in:
2020-08-25 20:55:27 +02:00
parent 7b904077c5
commit 10fde3e73f
2 changed files with 68 additions and 46 deletions

View File

@@ -1,3 +1,37 @@
[metadata]
name = wicd
summary = A wireless and wired network manager
description-file =
README.rst
author =
Tom Van Braeckel
Adam Blackburn
Dan O'Reilly
Andrew Psaltis
David Paleino
Roman Dobosz
author-email =
tomvanbraeckel@gmail.com
compwiz18@gmail.com
oreilldf@gmail.com
ampsaltis@gmail.com
d.paleino@gmail.com
gryf73@gmail.com
home-page = https://gihtub.com/gryf/wicd
classifier =
Development Status :: 4 - Beta
Environment :: Console
Environment :: Console :: Curses
Environment :: No Input/Output (Daemon)
Intended Audience :: End Users/Desktop
Intended Audience :: System Administrators
License :: OSI Approved :: GNU General Public License v2 (GPLv2)
Operating System :: POSIX :: Linux
Programming Language :: Python
Programming Language :: Python :: 3
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Topic :: System :: Networking
[options]
packages =

View File

@@ -3,6 +3,8 @@
# Copyright (C) 2007 - 2009 Adam Blackburn
# Copyright (C) 2007 - 2009 Dan O'Reilly
# Copyright (C) 2009 Andrew Psaltis
# Copyright (C) 2020 Roman Dobosz
#
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License Version 2 as
@@ -21,13 +23,14 @@ import os
import re
import shutil
import subprocess
from distutils.command import build as _build
from distutils.core import setup, Command
from distutils.command.build import build as _build
from distutils.command.install import install as _install
import setuptools
from setuptools.command import install as _install
import wicd
VERSION_NUM = wicd.__version__
# REVISION_NUM is automatically updated
try:
@@ -49,8 +52,8 @@ empty_file = 'other/.empty_on_purpose'
os.chdir(os.path.abspath(os.path.split(__file__)[0]))
class build(_build):
sub_commands = _build.sub_commands + [('compile_translations', None)]
class build(_build.build):
sub_commands = _build.build.sub_commands + [('compile_translations', None)]
def run(self):
try:
@@ -59,10 +62,10 @@ class build(_build):
self.run_command('configure')
import wpath
# raise Exception, 'Please run "./setup.py configure" first.'
_build.run(self)
_build.build.run(self)
class configure(Command):
class configure(setuptools.Command):
description = "configure the paths that Wicd will be installed to"
user_options = [
@@ -328,7 +331,7 @@ class configure(Command):
shutil.copymode(original_name, final_name)
class clear_generated(Command):
class clear_generated(setuptools.Command):
description = 'clears out files generated by configure'
user_options = []
@@ -357,7 +360,7 @@ class clear_generated(Command):
os.makedirs('translations/')
class install(_install):
class install(_install.install):
def run(self):
try:
import wpath
@@ -455,10 +458,10 @@ class install(_install):
'/LC_MESSAGES/wicd.mo']))
print()
_install.run(self)
_install.install.run(self)
class test(Command):
class test(setuptools.Command):
description = "run Wicd's unit tests"
user_options = []
@@ -476,7 +479,7 @@ class test(Command):
tests.run_tests()
class update_message_catalog(Command):
class update_message_catalog(setuptools.Command):
description = "update wicd.pot with new strings"
user_options = []
@@ -492,7 +495,7 @@ class update_message_catalog(Command):
os.system('xgettext -L glade data/wicd.ui -j -o po/wicd.pot')
class update_translations(Command):
class update_translations(setuptools.Command):
description = "update po-files with new strings from wicd.pot"
user_options = []
@@ -510,7 +513,7 @@ class update_translations(Command):
(pofile, lang))
class compile_translations(Command):
class compile_translations(setuptools.Command):
description = 'compile po-files to binary mo'
threshold = 0.8
@@ -580,7 +583,7 @@ class compile_translations(Command):
os.environ['LANG'] = oldlang
class uninstall(Command):
class uninstall(setuptools.Command):
description = "remove Wicd using uninstall.sh and install.log"
user_options = []
@@ -595,34 +598,19 @@ class uninstall(Command):
os.system("./uninstall.sh")
py_modules = ['wicd.networking', 'wicd.misc', 'wicd.wnettools', 'wicd.wpath',
'wicd.dbusmanager', 'wicd.logfile', 'wicd.backend',
'wicd.configmanager', 'wicd.translations']
setup(cmdclass={'build': build,
'configure': configure,
'install': install,
'uninstall': uninstall,
'test': test,
'clear_generated': clear_generated,
'update_message_catalog': update_message_catalog,
'update_translations': update_translations,
'compile_translations': compile_translations},
name="wicd",
version=VERSION_NUM,
description="A wireless and wired network manager",
long_description="A complete network connection manager Wicd supports "
"wired and wireless networks, and capable of creating and tracking "
"profiles for both. It has a template-based wireless encryption system, "
"which allows the user to easily add encryption methods used. It ships "
"with some common encryption types, such as WPA and WEP. Wicd will "
"automatically connect at startup to any preferred network within "
"range.",
author="Tom Van Braeckel, Adam Blackburn, Dan O'Reilly, Andrew Psaltis, "
"David Paleino",
author_email="tomvanbraeckel@gmail.com, compwiz18@gmail.com, "
"oreilldf@gmail.com, ampsaltis@gmail.com, d.paleino@gmail.com",
url="https://launchpad.net/wicd",
license="http://www.gnu.org/licenses/old-licenses/gpl-2.0.html",
py_modules=py_modules,
data_files=data)
setuptools.setup(cmdclass={'build': build,
'configure': configure,
'install': install,
'uninstall': uninstall,
'test': test,
'clear_generated': clear_generated,
'update_message_catalog': update_message_catalog,
'update_translations': update_translations,
'compile_translations': compile_translations},
version=VERSION_NUM,
description="",
long_description=__doc__,
url="https://launchpad.net/wicd",
license="http://www.gnu.org/licenses/old-licenses/gpl-2.0"
".html",
data_files=data)