]>
Commit | Line | Data |
---|---|---|
55d28a71 JB |
1 | Partially reverts 895baa3bdc50689736bd3bff110bca6e389829ee: [PATCH] Remove Python 2 support |
2 | --- libbytesize-2.0/configure.ac.orig 2019-06-08 16:31:47.643606410 +0200 | |
3 | +++ libbytesize-2.0/configure.ac 2019-06-08 16:31:52.663579214 +0200 | |
4 | @@ -52,6 +52,22 @@ | |
5 | [LIBBYTESIZE_SOFT_FAILURE([Header file $ac_header not found.])], | |
6 | []) | |
7 | ||
8 | +AC_ARG_WITH([python2], | |
9 | + AS_HELP_STRING([--with-python2], [support python2 @<:@default=check@:>@]), | |
10 | + [], | |
11 | + [with_python2=check]) | |
12 | + | |
13 | +AC_SUBST(WITH_PYTHON2, 0) | |
14 | +if test "x$with_python2" != "xno"; then | |
15 | + AC_PATH_PROG([python2], [python2], [no]) | |
16 | + AS_IF([test "x$python2" == "xno"], | |
17 | + [if test "x$with_python2" = "xyes"; then | |
18 | + LIBBYTESIZE_SOFT_FAILURE([Python2 support requested, but python2 is not available]) | |
19 | + fi], | |
20 | + [AC_SUBST(WITH_PYTHON2, 1)]) | |
21 | +fi | |
22 | +AM_CONDITIONAL(WITH_PYTHON2, test "x$with_python2" != "xno" -a "x$python2" != "xno") | |
23 | + | |
24 | AC_ARG_WITH([python3], | |
25 | AS_HELP_STRING([--with-python3], [support python3 @<:@default=check@:>@]), | |
26 | [], | |
27 | --- libbytesize-2.0/src/python/Makefile.am.orig 2019-03-20 10:10:37.000000000 +0100 | |
28 | +++ libbytesize-2.0/src/python/Makefile.am 2019-06-08 16:37:02.788565790 +0200 | |
29 | @@ -1,7 +1,14 @@ | |
30 | +if WITH_PYTHON2 | |
31 | +pylibdir = $(shell python -c "import distutils.sysconfig; print(distutils.sysconfig.get_python_lib(1,0,prefix='${exec_prefix}'))") | |
32 | + | |
33 | +pybytesizedir = $(pylibdir)/bytesize | |
34 | +dist_pybytesize_DATA = bytesize.py __init__.py | |
35 | +endif | |
36 | + | |
37 | if WITH_PYTHON3 | |
38 | py3libdir = $(shell python3 -c "import distutils.sysconfig; print(distutils.sysconfig.get_python_lib(1,0,prefix='${exec_prefix}'))") | |
39 | py3bytesizedir = $(py3libdir)/bytesize | |
40 | -dist_py3bytesize_DATA = bytesize.py __init__.py | |
41 | +nodist_py3bytesize_DATA = bytesize.py __init__.py | |
42 | endif | |
43 | ||
44 | MAINTAINERCLEANFILES = Makefile.in |