diff -Nru pyhoca-cli-0.6.1.1/debian/bzr-builder.manifest pyhoca-cli-0.6.1.2/debian/bzr-builder.manifest --- pyhoca-cli-0.6.1.1/debian/bzr-builder.manifest 2019-11-23 12:46:30.000000000 +0000 +++ pyhoca-cli-0.6.1.2/debian/bzr-builder.manifest 2019-12-26 14:03:05.000000000 +0000 @@ -1,2 +1,2 @@ -# bzr-builder format 0.3 deb-version {debupstream}-0~311 -lp:~x2go/x2go/pyhoca-cli_build-main revid:git-v1:d7b7d602283d0ce37bce2a4a5094f430276ec0a6 +# bzr-builder format 0.3 deb-version {debupstream}-0~336 +lp:~x2go/x2go/pyhoca-cli_build-main revid:git-v1:071bd72d80d20a325613e38ed6296d2788dd65e5 diff -Nru pyhoca-cli-0.6.1.1/debian/changelog pyhoca-cli-0.6.1.2/debian/changelog --- pyhoca-cli-0.6.1.1/debian/changelog 2019-11-23 12:46:30.000000000 +0000 +++ pyhoca-cli-0.6.1.2/debian/changelog 2019-12-26 14:03:05.000000000 +0000 @@ -1,8 +1,48 @@ -pyhoca-cli (0.6.1.1-0~311~ubuntu19.10.1) eoan; urgency=low +pyhoca-cli (0.6.1.2-0~336~ubuntu19.10.1) eoan; urgency=low * Auto build. - -- X2Go Sat, 23 Nov 2019 12:46:30 +0000 + -- X2Go Thu, 26 Dec 2019 14:03:05 +0000 + +pyhoca-cli (0.6.1.2-0x2go1) unstable; urgency=medium + + * [ Mihai Moldovan ] + * New upstream version (0.6.1.2): + - man/man1/pyhoca-cli.1: pre-release date update. + * pyhoca-cli.spec: + + Backport macros from python-x2go.spec. + + Prefer Python 3 if both variants have been requested, so that we only + ever build for one variant. + + Use %{?with_pythonX} and %{name_helper_pythonX} macros. Also fixes + running against nightly versions of python-x2go. + + Replace hashbang with version determined by name helper. + + Fix syntax error. + + Actually change the hashbang of a file... + + Fix building Python 2 variant on older *SuSE variants. + + Also fix install phase for Python 2 variant on older *SuSE variants. + + Fix files section on older *SuSE variants. + + Fix files section on older *SuSE variants again, remove faulty slash. + + Use %{name} instead of hardcoding the string in %prep. + + Fix selecting either Python 2 XOR 3. We cannot override bconds via later + %bcond_with... XXX macro calls, but have to use them only once with the + correct value. Hence, use a global variable to store and mangle the + preferences and only use %bcond_... X later once. + + Fix typo in Python-2-Requires: line: random % char. + + Hopefully fix builds on *SuSE: even pure Python-3-builds need + python-devel as a build requirement (only)... for some weird reason. + + Revert backport *SuSE build fix: we probably don't need this, problem + lies somewhere else. + + Actually fix issue: macros are expanded even in commented lines and some + of them were not properly escaped via double percent sign characters. + + Fix another unescaped macro in comment. + + Fix newer *SuSE versions: 15.0+ seem to install the pycace files into a + subdirectory based on the package name. + + Fix spelling error in pycache directory. + + Actually apply pycache changes to 15.0+ and not just 15.1+. + + Also apply pycache changes to Tumbleweed, which seems to not get caught + by %{sle_version}. + + -- X2Go Release Manager Thu, 26 Dec 2019 12:57:37 +0100 pyhoca-cli (0.6.1.1-0x2go1) unstable; urgency=medium diff -Nru pyhoca-cli-0.6.1.1/man/man1/pyhoca-cli.1 pyhoca-cli-0.6.1.2/man/man1/pyhoca-cli.1 --- pyhoca-cli-0.6.1.1/man/man1/pyhoca-cli.1 2019-11-23 12:46:30.000000000 +0000 +++ pyhoca-cli-0.6.1.2/man/man1/pyhoca-cli.1 2019-12-26 14:03:05.000000000 +0000 @@ -5,7 +5,7 @@ \\$2 \(la\\$1\(ra\\$3 .. .if \n(.g .mso www.tmac -.TH pyhoca-cli 1 "Nov 2019" "Version 0.6.1.1" "X2Go Application" +.TH pyhoca-cli 1 "Dec 2019" "Version 0.6.1.2" "X2Go Application" .SH NAME pyhoca-cli \- X2Go command line client written in Python .SH SYNOPSIS diff -Nru pyhoca-cli-0.6.1.1/pyhoca/cli/__init__.py pyhoca-cli-0.6.1.2/pyhoca/cli/__init__.py --- pyhoca-cli-0.6.1.1/pyhoca/cli/__init__.py 2019-11-23 12:46:30.000000000 +0000 +++ pyhoca-cli-0.6.1.2/pyhoca/cli/__init__.py 2019-12-26 14:03:05.000000000 +0000 @@ -25,6 +25,6 @@ http://wiki.x2go.org """ -__VERSION__ = "0.6.1.1" +__VERSION__ = "0.6.1.2" from .frontend import * diff -Nru pyhoca-cli-0.6.1.1/pyhoca-cli.spec pyhoca-cli-0.6.1.2/pyhoca-cli.spec --- pyhoca-cli-0.6.1.1/pyhoca-cli.spec 2019-11-23 12:46:30.000000000 +0000 +++ pyhoca-cli-0.6.1.2/pyhoca-cli.spec 2019-12-26 14:03:05.000000000 +0000 @@ -1,5 +1,120 @@ +# Add conditional and ... +# ... disable by default, mostly for older distros. +%global want_python3 0 +%if 0%{?suse_version} > 1310 || 0%{?fedora} >= 26 || 0%{?rhel} >= 8 +# ... enable by default on newer distros. +%global want_python3 1 +%endif + +# Fedora 30 deprecated Python 2, 31 disabled support for building these +# packages. +%global want_python2 1 +%if 0%{?fedora} >= 31 +%global want_python2 0 +%endif + +# Prefer Python 3 if both variants have been requested. +%if 0%{?want_python2} && 0%{?want_python3} +%global want_python2 0 +%endif + +# Conditional builds are a bit weird. +# You CAN either enable or disable a feature via %%bcond_with{,out}, BUT you +# can NOT override this value later on, it seems. +# Case in point: I tried to use %%bcond_without python2 for all older Fedora +# versions, %%bcond_with python3 for all Fedora versions starting with 26. +# However, as pyhoca-{gui,cli} are just applications, we want to build against +# one specific python version only, so I later tried to override the Python-2- +# build via %%bcond_with python2, essentially disabling it and preferring the +# Python-3-based version. +# This didn't work, since %%{?with_python2} was kept enabled. +# Hence, we'll only enable/disable a feature once now, based upon the global +# macros. +%if 0%{?want_python2} +%bcond_without python2 +%else +%bcond_with python2 +%endif +%if 0%{?want_python3} +%bcond_without python3 +%else +%bcond_with python3 +%endif + +# Provide a default implementation, essentially for non-*SuSE platforms. +%if 0%{?with_python3} +%if ( ! ( 0%{?rhel} ) ) +%global name_helper_python3 python3 +%if 0%{?with_python2} +%global name_helper_python2 python2 +%{?!python_module:%global python_module() python-%{**} python3-%{**}} +%else +%global name_helper_python2 %{nil} +%{?!python_module:%global python_module() python3-%{**}} +%endif +%else +%if 0%{?rhel} >= 7 +%global name_helper_python3 python%{python3_pkgversion} +%if 0%{?with_python2} +%global name_helper_python2 python2 +%{?!python_module:%global python_module() python-%{**} python%{python3_pkgversion}-%{**}} +%else +%global name_helper_python2 %{nil} +%{?!python_module:%global python_module() python%{python3_pkgversion}-%{**}} +%endif +%else +%global name_helper_python3 python34 +%if 0%{?with_python2} +%global name_helper_python2 python +%{?!python_module:%global python_module() python-%{**} python34-%{**}} +%else +%global name_helper_python2 %{nil} +%{?!python_module:%global python_module() python34-%{**}} +%endif +%endif +%endif +%else +%global name_helper_python3 %{nil} +%if 0%{?with_python2} +%global name_helper_python2 python +%{?!python_module:%global python_module() python-%{**}} +%else +%global name_helper_python2 %{nil} +%{?!python_module:%global python_module()} +%endif +%endif + +%if ! 0%{?with_python3} +%global skip_python3 1 +%endif + +%if ! 0%{?with_python2} +%global skip_python2 1 +%endif + +# Workaround for OpenSuSE Leap 42.3. This is the first version to introduce +# the macros, but in a broken state. It will generate pythonX dependencies +# if pythonX has been installed in the build environment and not honor +# skip_pythonX. +# Override to the expected behavior. +%if 0%{?sle_version} && 0%{?sle_version} == 120300 && 0%{?is_opensuse} +%if 0%{?with_python3} +%if 0%{?with_python2} +%global python_module() python-%{**} python3-%{**} +%else +%global python_module() python3-%{**} +%endif +%else +%if 0%{?with_python2} +%global python_module() python-%{**} +%else +%global python_module() +%endif +%endif +%endif + Name: pyhoca-cli -Version: 0.6.1.1 +Version: 0.6.1.2 Release: 0.0x2go1%{?dist} Summary: Command line X2Go client written in Python @@ -13,16 +128,24 @@ Source0: http://code.x2go.org/releases/source/%{name}/%{name}-%{version}.tar.gz BuildArch: noarch -%if 0%{?el6} || 0%{?el7} +%if 0%{?with_python2} +%if 0%{?sle_version} && ( ( 0%{?sle_version} < 120300 && 0%{?is_opensuse} ) || ( ! 0%{?is_opensuse} ) ) +# On some *SuSE versions, we still need python-devel, even though we also enable Python 3 +# builds there and consequently should build-depend upon python2-devel... but it doesn't +# exist there. BuildRequires: python-devel +%else +BuildRequires: %{name_helper_python2}-devel +%endif BuildRequires: python-setuptools Requires: python-setproctitle -Requires: python-x2go >= 0.6.1.0 -%else -BuildRequires: python3-devel -BuildRequires: python3-setuptools -Requires: python3-setproctitle -Requires: python3-x2go >= 0.6.1.0 +Requires: %{name_helper_python2}-x2go >= 0.6.1.0 +%endif +%if 0%{?with_python3} +BuildRequires: %{name_helper_python3}-devel +BuildRequires: %{name_helper_python3}-setuptools +Requires: %{name_helper_python3}-setproctitle +Requires: %{name_helper_python3}-x2go >= 0.6.1.0 %endif %if 0%{?suse_version} BuildRequires: fdupes @@ -50,13 +173,27 @@ %prep %setup -q +%if 0%{?with_python2} +sed -i -e '1s@^#/usr/bin/python3@/usr/bin/%{name_helper_python2}@' '%{name}' +%endif +%if 0%{?with_python3} +sed -i -e '1s@^#/usr/bin/python3@/usr/bin/%{name_helper_python3}@' '%{name}' +%endif %build -%if 0%{?el6} || 0%{?el7} -# Make sure we stay on Python 2 on CentOS for the time being. Maybe not for EL8. -%{py2_build} +%if 0%{?with_python2} +%if 0%{?suse_version} +%if 0%{?sle_version} && ( ( 0%{?sle_version} < 120300 && 0%{?is_opensuse} ) || ( ! 0%{?is_opensuse} ) ) +python2 setup.py build +%else +%{python2_build} +%endif %else +%{py2_build} +%endif +%endif +%if 0%{?with_python3} %if 0%{?suse_version} %if 0%{?sle_version} && ( ( 0%{?sle_version} < 120300 && 0%{?is_opensuse} ) || ( ! 0%{?is_opensuse} ) ) python3 setup.py build @@ -69,9 +206,18 @@ %endif %install -%if 0%{?el6} || 0%{?el7} -%{py2_install} +%if 0%{?with_python2} +%if 0%{?suse_version} +%if 0%{?sle_version} && ( ( 0%{?sle_version} < 120300 && 0%{?is_opensuse} ) || ( ! 0%{?is_opensuse} ) ) +python2 setup.py install --skip-build --root %{buildroot} +%else +%{python2_install} --skip-build +%endif %else +%{py2_install} +%endif +%endif +%if 0%{?with_python3} %if 0%{?suse_version} %if 0%{?sle_version} && ( ( 0%{?sle_version} < 120300 && 0%{?is_opensuse} ) || ( ! 0%{?is_opensuse} ) ) python3 setup.py install -O1 --skip-build --prefix %{_prefix} --root %{buildroot} @@ -95,18 +241,34 @@ %defattr(-,root,root) %doc COPYING README TODO %{_bindir}/%{name} -%if 0%{?el6} || 0%{?el7} +%if 0%{?with_python2} +%if 0%{?suse_version} +%if ( 0%{?sle_version} && 0%{?sle_version} >= 120300 && 0%{?is_opensuse} ) || ( 0%{?suse_version} > 1500 ) %{python2_sitelib}/pyhoca/ %{python2_sitelib}/PyHoca_CLI* +%pycache_only %{python2_sitelib}/__pycache__ %else +%{python_sitelib}/pyhoca/ +%{python_sitelib}/PyHoca_CLI* +%endif +%else +%{python2_sitelib}/pyhoca/ +%{python2_sitelib}/PyHoca_CLI* +%endif +%endif +%if 0%{?with_python3} %{python3_sitelib}/pyhoca/ %{python3_sitelib}/PyHoca_CLI* %if 0%{?suse_version} %if ( 0%{?sle_version} && 0%{?sle_version} >= 120300 && 0%{?is_opensuse} ) || ( 0%{?suse_version} > 1500 ) +%if ( 0%{?sle_version} >= 150000 ) || ( 0%{?suse_version} > 1500 ) +%pycache_only %{python3_sitelib}/pyhoca/cli/__pycache__ +%else %pycache_only %{python3_sitelib}/__pycache__ %endif %endif %endif +%endif %{_mandir}/man1/%{name}.1*