mirror of
https://github.com/gryf/wicd.git
synced 2026-01-05 21:34:16 +01:00
Use setuptools instead of pure distutils
This commit is contained in:
34
setup.cfg
34
setup.cfg
@@ -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]
|
[options]
|
||||||
packages =
|
packages =
|
||||||
|
|||||||
80
setup.py
80
setup.py
@@ -3,6 +3,8 @@
|
|||||||
# Copyright (C) 2007 - 2009 Adam Blackburn
|
# Copyright (C) 2007 - 2009 Adam Blackburn
|
||||||
# Copyright (C) 2007 - 2009 Dan O'Reilly
|
# Copyright (C) 2007 - 2009 Dan O'Reilly
|
||||||
# Copyright (C) 2009 Andrew Psaltis
|
# Copyright (C) 2009 Andrew Psaltis
|
||||||
|
# Copyright (C) 2020 Roman Dobosz
|
||||||
|
#
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# 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
|
# it under the terms of the GNU General Public License Version 2 as
|
||||||
@@ -21,13 +23,14 @@ import os
|
|||||||
import re
|
import re
|
||||||
import shutil
|
import shutil
|
||||||
import subprocess
|
import subprocess
|
||||||
|
from distutils.command import build as _build
|
||||||
|
|
||||||
from distutils.core import setup, Command
|
import setuptools
|
||||||
from distutils.command.build import build as _build
|
from setuptools.command import install as _install
|
||||||
from distutils.command.install import install as _install
|
|
||||||
|
|
||||||
import wicd
|
import wicd
|
||||||
|
|
||||||
|
|
||||||
VERSION_NUM = wicd.__version__
|
VERSION_NUM = wicd.__version__
|
||||||
# REVISION_NUM is automatically updated
|
# REVISION_NUM is automatically updated
|
||||||
try:
|
try:
|
||||||
@@ -49,8 +52,8 @@ empty_file = 'other/.empty_on_purpose'
|
|||||||
os.chdir(os.path.abspath(os.path.split(__file__)[0]))
|
os.chdir(os.path.abspath(os.path.split(__file__)[0]))
|
||||||
|
|
||||||
|
|
||||||
class build(_build):
|
class build(_build.build):
|
||||||
sub_commands = _build.sub_commands + [('compile_translations', None)]
|
sub_commands = _build.build.sub_commands + [('compile_translations', None)]
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
try:
|
try:
|
||||||
@@ -59,10 +62,10 @@ class build(_build):
|
|||||||
self.run_command('configure')
|
self.run_command('configure')
|
||||||
import wpath
|
import wpath
|
||||||
# raise Exception, 'Please run "./setup.py configure" first.'
|
# 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"
|
description = "configure the paths that Wicd will be installed to"
|
||||||
|
|
||||||
user_options = [
|
user_options = [
|
||||||
@@ -328,7 +331,7 @@ class configure(Command):
|
|||||||
shutil.copymode(original_name, final_name)
|
shutil.copymode(original_name, final_name)
|
||||||
|
|
||||||
|
|
||||||
class clear_generated(Command):
|
class clear_generated(setuptools.Command):
|
||||||
description = 'clears out files generated by configure'
|
description = 'clears out files generated by configure'
|
||||||
|
|
||||||
user_options = []
|
user_options = []
|
||||||
@@ -357,7 +360,7 @@ class clear_generated(Command):
|
|||||||
os.makedirs('translations/')
|
os.makedirs('translations/')
|
||||||
|
|
||||||
|
|
||||||
class install(_install):
|
class install(_install.install):
|
||||||
def run(self):
|
def run(self):
|
||||||
try:
|
try:
|
||||||
import wpath
|
import wpath
|
||||||
@@ -455,10 +458,10 @@ class install(_install):
|
|||||||
'/LC_MESSAGES/wicd.mo']))
|
'/LC_MESSAGES/wicd.mo']))
|
||||||
print()
|
print()
|
||||||
|
|
||||||
_install.run(self)
|
_install.install.run(self)
|
||||||
|
|
||||||
|
|
||||||
class test(Command):
|
class test(setuptools.Command):
|
||||||
description = "run Wicd's unit tests"
|
description = "run Wicd's unit tests"
|
||||||
|
|
||||||
user_options = []
|
user_options = []
|
||||||
@@ -476,7 +479,7 @@ class test(Command):
|
|||||||
tests.run_tests()
|
tests.run_tests()
|
||||||
|
|
||||||
|
|
||||||
class update_message_catalog(Command):
|
class update_message_catalog(setuptools.Command):
|
||||||
description = "update wicd.pot with new strings"
|
description = "update wicd.pot with new strings"
|
||||||
|
|
||||||
user_options = []
|
user_options = []
|
||||||
@@ -492,7 +495,7 @@ class update_message_catalog(Command):
|
|||||||
os.system('xgettext -L glade data/wicd.ui -j -o po/wicd.pot')
|
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"
|
description = "update po-files with new strings from wicd.pot"
|
||||||
|
|
||||||
user_options = []
|
user_options = []
|
||||||
@@ -510,7 +513,7 @@ class update_translations(Command):
|
|||||||
(pofile, lang))
|
(pofile, lang))
|
||||||
|
|
||||||
|
|
||||||
class compile_translations(Command):
|
class compile_translations(setuptools.Command):
|
||||||
description = 'compile po-files to binary mo'
|
description = 'compile po-files to binary mo'
|
||||||
threshold = 0.8
|
threshold = 0.8
|
||||||
|
|
||||||
@@ -580,7 +583,7 @@ class compile_translations(Command):
|
|||||||
os.environ['LANG'] = oldlang
|
os.environ['LANG'] = oldlang
|
||||||
|
|
||||||
|
|
||||||
class uninstall(Command):
|
class uninstall(setuptools.Command):
|
||||||
description = "remove Wicd using uninstall.sh and install.log"
|
description = "remove Wicd using uninstall.sh and install.log"
|
||||||
|
|
||||||
user_options = []
|
user_options = []
|
||||||
@@ -595,34 +598,19 @@ class uninstall(Command):
|
|||||||
os.system("./uninstall.sh")
|
os.system("./uninstall.sh")
|
||||||
|
|
||||||
|
|
||||||
py_modules = ['wicd.networking', 'wicd.misc', 'wicd.wnettools', 'wicd.wpath',
|
setuptools.setup(cmdclass={'build': build,
|
||||||
'wicd.dbusmanager', 'wicd.logfile', 'wicd.backend',
|
'configure': configure,
|
||||||
'wicd.configmanager', 'wicd.translations']
|
'install': install,
|
||||||
|
'uninstall': uninstall,
|
||||||
setup(cmdclass={'build': build,
|
'test': test,
|
||||||
'configure': configure,
|
'clear_generated': clear_generated,
|
||||||
'install': install,
|
'update_message_catalog': update_message_catalog,
|
||||||
'uninstall': uninstall,
|
'update_translations': update_translations,
|
||||||
'test': test,
|
'compile_translations': compile_translations},
|
||||||
'clear_generated': clear_generated,
|
version=VERSION_NUM,
|
||||||
'update_message_catalog': update_message_catalog,
|
description="",
|
||||||
'update_translations': update_translations,
|
long_description=__doc__,
|
||||||
'compile_translations': compile_translations},
|
url="https://launchpad.net/wicd",
|
||||||
name="wicd",
|
license="http://www.gnu.org/licenses/old-licenses/gpl-2.0"
|
||||||
version=VERSION_NUM,
|
".html",
|
||||||
description="A wireless and wired network manager",
|
data_files=data)
|
||||||
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)
|
|
||||||
|
|||||||
Reference in New Issue
Block a user