fail2ban/debian/patches/0004-BF-use-build_-_2to3-if...

35 lines
1.1 KiB
Diff

From 4d2fdd72e7463a9f6ed7ded9b58f81f4fd7688dc Mon Sep 17 00:00:00 2001
From: Yaroslav Halchenko <debian@onerussian.com>
Date: Sun, 21 Jan 2018 21:23:02 -0500
Subject: [PATCH 4/4] BF: use build_*_2to3 if in _2to3
On Debian systems py helpers first do python setup.py build
so conversion should happen then. Manual invocation of
./fail2ban-2to3 is least preferred since modifies in place
and would require additional special handling to monitor
changed files etc
---
setup.py | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/setup.py b/setup.py
index 8da29268..850f748f 100755
--- a/setup.py
+++ b/setup.py
@@ -208,8 +208,10 @@ setup(
license = "GPL",
platforms = "Posix",
cmdclass = {
- 'build_py': build_py, 'build_scripts': build_scripts,
- 'install_scripts': install_scripts_f2b, 'install': install_command_f2b
+ 'build_py': build_py_2to3 if _2to3 else build_py,
+ 'build_scripts': build_scripts_2to3 if _2to3 else build_scripts,
+ 'install_scripts': install_scripts_f2b,
+ 'install': install_command_f2b
},
scripts = [
'bin/fail2ban-client',
--
2.15.1