mirror of https://github.com/fail2ban/fail2ban
commit
ac62658c10
|
@ -47,12 +47,9 @@ copyright = u'2014'
|
||||||
#
|
#
|
||||||
|
|
||||||
from fail2ban.version import version as fail2ban_version
|
from fail2ban.version import version as fail2ban_version
|
||||||
from distutils.version import LooseVersion
|
|
||||||
|
|
||||||
fail2ban_loose_version = LooseVersion(fail2ban_version)
|
|
||||||
|
|
||||||
# The short X.Y version.
|
# The short X.Y version.
|
||||||
version = ".".join(str(_) for _ in fail2ban_loose_version.version[:2])
|
version = ".".join(str(_) for _ in fail2ban_version.split(".")[:2])
|
||||||
# The full version, including alpha/beta/rc tags.
|
# The full version, including alpha/beta/rc tags.
|
||||||
release = fail2ban_version
|
release = fail2ban_version
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,6 @@ __copyright__ = "Copyright (c) 2004 Cyril Jaquier, 2011-2012 Lee Clemens, 2012 Y
|
||||||
__license__ = "GPL"
|
__license__ = "GPL"
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
from distutils.version import LooseVersion
|
|
||||||
import os
|
import os
|
||||||
from os.path import dirname, sep as pathsep
|
from os.path import dirname, sep as pathsep
|
||||||
|
|
||||||
|
@ -37,10 +36,6 @@ from .utils import Utils
|
||||||
from ..helpers import getLogger
|
from ..helpers import getLogger
|
||||||
|
|
||||||
|
|
||||||
if not hasattr(pyinotify, '__version__') \
|
|
||||||
or LooseVersion(pyinotify.__version__) < '0.8.3': # pragma: no cover
|
|
||||||
raise ImportError("Fail2Ban requires pyinotify >= 0.8.3")
|
|
||||||
|
|
||||||
# Verify that pyinotify is functional on this system
|
# Verify that pyinotify is functional on this system
|
||||||
# Even though imports -- might be dysfunctional, e.g. as on kfreebsd
|
# Even though imports -- might be dysfunctional, e.g. as on kfreebsd
|
||||||
try:
|
try:
|
||||||
|
|
|
@ -24,11 +24,8 @@ __license__ = "GPL"
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import time
|
import time
|
||||||
from distutils.version import LooseVersion
|
|
||||||
|
|
||||||
from systemd import journal
|
from systemd import journal
|
||||||
if LooseVersion(getattr(journal, '__version__', "0")) < '204':
|
|
||||||
raise ImportError("Fail2Ban requires systemd >= 204")
|
|
||||||
|
|
||||||
from .failmanager import FailManagerEmpty
|
from .failmanager import FailManagerEmpty
|
||||||
from .filter import JournalFilter, Filter
|
from .filter import JournalFilter, Filter
|
||||||
|
|
17
setup.py
17
setup.py
|
@ -24,23 +24,10 @@ __license__ = "GPL"
|
||||||
|
|
||||||
import platform
|
import platform
|
||||||
|
|
||||||
try:
|
|
||||||
import setuptools
|
import setuptools
|
||||||
from setuptools import setup
|
from setuptools import setup
|
||||||
from setuptools.command.install import install
|
from setuptools.command.install import install
|
||||||
from setuptools.command.install_scripts import install_scripts
|
from setuptools.command.install_scripts import install_scripts
|
||||||
from setuptools.command.build_py import build_py
|
|
||||||
build_scripts = None
|
|
||||||
except ImportError:
|
|
||||||
setuptools = None
|
|
||||||
from distutils.core import setup
|
|
||||||
|
|
||||||
# older versions
|
|
||||||
if setuptools is None:
|
|
||||||
from distutils.command.build_py import build_py
|
|
||||||
from distutils.command.build_scripts import build_scripts
|
|
||||||
from distutils.command.install import install
|
|
||||||
from distutils.command.install_scripts import install_scripts
|
|
||||||
|
|
||||||
import os
|
import os
|
||||||
from os.path import isfile, join, isdir, realpath
|
from os.path import isfile, join, isdir, realpath
|
||||||
|
@ -207,9 +194,9 @@ setup(
|
||||||
url = "http://www.fail2ban.org",
|
url = "http://www.fail2ban.org",
|
||||||
license = "GPL",
|
license = "GPL",
|
||||||
platforms = "Posix",
|
platforms = "Posix",
|
||||||
cmdclass = dict({'build_py': build_py, 'build_scripts': build_scripts} if build_scripts else {}, **{
|
cmdclass = {
|
||||||
'install_scripts': install_scripts_f2b, 'install': install_command_f2b
|
'install_scripts': install_scripts_f2b, 'install': install_command_f2b
|
||||||
}),
|
},
|
||||||
scripts = [
|
scripts = [
|
||||||
'bin/fail2ban-client',
|
'bin/fail2ban-client',
|
||||||
'bin/fail2ban-server',
|
'bin/fail2ban-server',
|
||||||
|
|
Loading…
Reference in New Issue