mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-05-19 20:01:53 +00:00
Merge pull request #380 from cjmayo/tidyten4
linkchecker and setup.py tidy up
This commit is contained in:
commit
91a069ac90
3 changed files with 9 additions and 26 deletions
|
|
@ -19,13 +19,9 @@ Main function module for link checking.
|
|||
|
||||
# version checks
|
||||
import sys
|
||||
# Needs Python >= 2.7 because we use dictionary based logging config
|
||||
# Needs Python >= 2.7.2 which fixed http://bugs.python.org/issue11467
|
||||
if not (hasattr(sys, 'version_info') or
|
||||
sys.version_info < (2, 7, 2, 'final', 0)):
|
||||
if sys.version_info < (3, 5, 0, 'final', 0):
|
||||
import platform
|
||||
version = platform.python_version()
|
||||
raise SystemExit("This program requires Python 2.7.2 or later instead of %s." % version)
|
||||
raise SystemExit("This program requires Python 3.5.0 or later instead of %s." % platform.python_version())
|
||||
# require a reasonably recent requests module: 2.4.0 from 2014-08-29
|
||||
import requests
|
||||
# PEP 396 has only version strings, bummer! PEP 386 is also not helpful.
|
||||
|
|
|
|||
11
linkchecker
11
linkchecker
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/python -Ru
|
||||
#!/usr/bin/python3 -u
|
||||
# Copyright (C) 2000-2014 Bastian Kleineidam
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
|
|
@ -578,13 +578,12 @@ else:
|
|||
if do_profile:
|
||||
if has_profile:
|
||||
if os.path.exists(_profile):
|
||||
question = _("""Overwrite profiling file %(file)r?
|
||||
Press Ctrl-C to cancel, RETURN to continue.""") % {"file": _profile}
|
||||
print(_("""Overwrite profiling file %(file)r?
|
||||
Press Ctrl-C to cancel, RETURN to continue.""") % {"file": _profile})
|
||||
try:
|
||||
raw_input(question.encode(i18n.default_encoding, 'replace'))
|
||||
input()
|
||||
except KeyboardInterrupt:
|
||||
print >> sys.stderr
|
||||
print >> sys.stderr, _("Canceled.")
|
||||
print("", _("Canceled."), file=sys.stderr, sep="\n")
|
||||
sys.exit(1)
|
||||
else:
|
||||
log.warn(LOG_CMDLINE,
|
||||
|
|
|
|||
16
setup.py
16
setup.py
|
|
@ -35,7 +35,7 @@ import stat
|
|||
import glob
|
||||
|
||||
# import Distutils stuff
|
||||
from setuptools import setup
|
||||
from setuptools import find_packages, setup
|
||||
from distutils.command.install_lib import install_lib
|
||||
from distutils.command.sdist import sdist
|
||||
from distutils.command.clean import clean
|
||||
|
|
@ -373,19 +373,7 @@ setup(
|
|||
'clean': MyClean,
|
||||
'sdist': MySdist,
|
||||
},
|
||||
packages = [
|
||||
'linkcheck',
|
||||
'linkcheck.bookmarks',
|
||||
'linkcheck.cache',
|
||||
'linkcheck.checker',
|
||||
'linkcheck.configuration',
|
||||
'linkcheck.director',
|
||||
'linkcheck.htmlutil',
|
||||
'linkcheck.logger',
|
||||
'linkcheck.network',
|
||||
'linkcheck.parser',
|
||||
'linkcheck.plugins',
|
||||
],
|
||||
packages = find_packages(include=["linkcheck", "linkcheck.*"]),
|
||||
scripts = scripts,
|
||||
data_files = data_files,
|
||||
classifiers = [
|
||||
|
|
|
|||
Loading…
Reference in a new issue