mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-04-11 18:10:58 +00:00
Fix register command, using lowercase application name.
git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@3938 e7d03fd6-7b0d-0410-9947-9c21f3af8025
This commit is contained in:
parent
93989c12b6
commit
eea053196c
1 changed files with 14 additions and 5 deletions
19
setup.py
19
setup.py
|
|
@ -42,25 +42,24 @@ import glob
|
|||
# from setuptools.dist import Distribution
|
||||
#except ImportError:
|
||||
# use distutils
|
||||
from distutils.core import setup, Extension, Distribution
|
||||
from distutils.core import setup, Extension
|
||||
from distutils.command.install_lib import install_lib
|
||||
from distutils.command.build_ext import build_ext
|
||||
from distutils.command.sdist import sdist
|
||||
|
||||
import distutils.command
|
||||
from distutils.command.clean import clean
|
||||
from distutils.command.build import build
|
||||
from distutils.command.install_data import install_data
|
||||
from distutils.command.register import register
|
||||
from distutils.dir_util import remove_tree
|
||||
from distutils.file_util import write_file
|
||||
from distutils import util, log
|
||||
|
||||
try:
|
||||
# Note that py2exe monkey-patches the distutils.core.Distribution class
|
||||
import py2exe
|
||||
except ImportError:
|
||||
# ignore when py2exe is not installed
|
||||
pass
|
||||
from distutils.core import Distribution
|
||||
|
||||
AppVersion = "5.0"
|
||||
AppName = "LinkChecker"
|
||||
|
|
@ -157,7 +156,7 @@ class MyInstallData (install_data, object):
|
|||
os.chmod(path, mode)
|
||||
|
||||
|
||||
class MyDistribution (distutils.core.Distribution, object):
|
||||
class MyDistribution (Distribution, object):
|
||||
"""Custom distribution class generating config file."""
|
||||
|
||||
def __init__ (self, attrs):
|
||||
|
|
@ -449,6 +448,15 @@ except ImportError:
|
|||
class MyPy2exe: pass
|
||||
|
||||
|
||||
class MyRegister (register, object):
|
||||
|
||||
def build_post_data(self, action):
|
||||
"""Force application name to lower case."""
|
||||
data = super(MyRegister, self).build_post_data(action)
|
||||
data['name'] = data['name'].lower()
|
||||
return data
|
||||
|
||||
|
||||
setup (
|
||||
name = AppName,
|
||||
version = AppVersion,
|
||||
|
|
@ -486,6 +494,7 @@ o a (Fast)CGI web interface (requires HTTP server)
|
|||
'clean': MyClean,
|
||||
'sdist': MySdist,
|
||||
'py2exe': MyPy2exe,
|
||||
'register': MyRegister,
|
||||
},
|
||||
packages = [
|
||||
'linkcheck', 'linkcheck.logger', 'linkcheck.checker',
|
||||
|
|
|
|||
Loading…
Reference in a new issue