Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 436218 - net-misc/pssh with dev-lang/python-3.2 - pssh --help: ImportError: No module named version
Summary: net-misc/pssh with dev-lang/python-3.2 - pssh --help: ImportError: No module ...
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Deadline: 2020-10-09
Assignee: Gentoo Cluster Team
URL:
Whiteboard:
Keywords: EBUILD, PATCH, PMASKED
Depends on:
Blocks:
 
Reported: 2012-09-25 13:22 UTC by Rob Bruce
Modified: 2020-10-09 07:45 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
net-misc/pssh ebuild to use python 2.7 (pssh-2.3.1-r1.ebuild,890 bytes, text/plain)
2012-09-25 13:24 UTC, Rob Bruce
Details
pssh_python3.patch (pssh_python3.patch,298 bytes, text/plain)
2013-01-04 06:29 UTC, Tomáš Mózes
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rob Bruce 2012-09-25 13:22:50 UTC
Although pssh does compile against python 3.2, when trying to use it, errors occur

$ pssh --help
Traceback (most recent call last):
  File "/usr/bin/pssh", line 26, in <module>
    from psshlib.cli import common_parser, common_defaults
  File "/usr/lib64/python3.2/site-packages/psshlib/cli.py", line 9, in <module>
    import version
ImportError: No module named version


Reproducible: Always

Steps to Reproduce:
1. Compile pssh
2. Use pssh
Comment 1 Rob Bruce 2012-09-25 13:24:48 UTC
Created attachment 324948 [details]
net-misc/pssh ebuild to use python 2.7

Added additional flags etc to ebuild to not use python 3.2
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2012-09-25 14:33:56 UTC
Comment on attachment 324948 [details]
net-misc/pssh ebuild to use python 2.7

--- pssh-2.3.1.ebuild   2012-08-18 12:33:33.000000000 +0200
+++ -   2012-09-25 16:33:47.178320189 +0200
@@ -4,7 +4,7 @@
 
 EAPI=4
 
-PYTHON_DEPEND="*:2.5"
+PYTHON_DEPEND="2:2.5"
 inherit distutils
 
 DESCRIPTION="PSSH provides parallel versions of OpenSSH and related tools"
@@ -21,11 +21,18 @@
 DEPEND="${RDEPEND}
        dev-python/setuptools"
 
+RESTRICT_PYTHON_ABIS="3.2"
+
 # Requires ssh access to run.
 RESTRICT="test"
 
 PYTHON_MODNAME=psshlib
 
+pkg_setup() {
+       python_set_active_version 2
+       python_pkg_setup
+}
+
 src_prepare() {
        sed -i -e "s|man/man1'|share/&|g" setup.py || die
        distutils_src_prepare
Comment 3 Walter 2012-11-26 09:33:34 UTC
A patch for Python3 can be found here: http://code.google.com/p/parallel-ssh/issues/detail?id=66
Comment 4 Tomáš Mózes 2013-01-04 06:29:45 UTC
Created attachment 334386 [details]
pssh_python3.patch
Comment 5 Tomáš Mózes 2013-01-04 06:30:38 UTC
Here is a modified ebuild that works with python 3.2 (thanks Walter for the link):

--- /usr/portage/net-misc/pssh/pssh-2.3.1.ebuild        2012-08-18 12:33:33.000000000 +0200
+++ pssh-2.3.1.ebuild   2013-01-04 07:26:44.643297937 +0100
@@ -5,7 +5,7 @@
 EAPI=4
 
 PYTHON_DEPEND="*:2.5"
-inherit distutils
+inherit distutils eutils
 
 DESCRIPTION="PSSH provides parallel versions of OpenSSH and related tools"
 HOMEPAGE="http://code.google.com/p/parallel-ssh/"
@@ -27,6 +27,7 @@
 PYTHON_MODNAME=psshlib
 
 src_prepare() {
+    epatch "${FILESDIR}"/pssh_python3.patch || die "epatch failed"
        sed -i -e "s|man/man1'|share/&|g" setup.py || die
        distutils_src_prepare
 }
Comment 6 Stefan Schmiedl 2013-06-01 12:27:25 UTC
(In reply to Tomas Mozes from comment #5)
> Here is a modified ebuild that works with python 3.2 (thanks Walter for the
> link):
> 

I ran into the same issue today after python-updater rebuilt pssh. The patch and modified ebuild solved the problem for me.

Thanks,
s.
Comment 7 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2020-10-09 07:45:47 UTC
Package removed.