The code seems to work when building with Python 3. spec should be changed accordingly (a subpackage is needed for Python 3 libraries). https://fedoraproject.org/wiki/Packaging:Python https://fedoraproject.org/wiki/Changes/Python_3_as_Default
This bug appears to have been reported against 'rawhide' during the Fedora 24 development cycle. Changing version to '24'. More information and reason for this action is here: https://fedoraproject.org/wiki/Fedora_Program_Management/HouseKeeping/Fedora24#Rawhide_Rebase
Hello Chris, Do you need any help adding Python 3 support to the RPM? If you need more instructions, a [guide] for porting Python-based RPMs is available. [guide] http://python-rpm-porting.readthedocs.org/en/latest/index.html
There is reported a warning related to PyString_AsStringAndSize function in src/session.c, as argument 3 type has changed since Python 2.5 (have a look at https://docs.python.org/2/c-api/string.html). Github issue opened [https://github.com/snoack/ssh4py/issues/9], waiting for upstream fix.
This message is a reminder that Fedora 24 is nearing its end of life. Approximately 2 (two) weeks from now Fedora will stop maintaining and issuing updates for Fedora 24. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '24'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 24 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
Fedora 24 changed to end-of-life (EOL) status on 2017-08-08. Fedora 24 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed.
Still valid
Still valid.
This bug appears to have been reported against 'rawhide' during the Fedora 27 development cycle. Changing version to '27'.
Created attachment 1317561 [details] Python3 subpackage
Hello Chris, may I ask you to review the updated specfile, and if it is fine, to build the package in Fedora? Thank you. Jan
I'm sorry for the very long wait time here. I just took a look at the specfile. Things seem pretty reasonable, but there are at least a couple of problems that need to be solved. In particular, if I run rpmlint on the resulting rpms, I get the following: clalancette@archangel:~/fedora/libssh2-python (master u+1)$ rpmlint results_libssh2-python/0.7.1/18.fc28/python2-libssh2-0.7.1-18.fc28.x86_64.rpm python2-libssh2.x86_64: W: private-shared-object-provides /usr/lib64/python2.7/site-packages/libssh2.so libssh2.so()(64bit) python2-libssh2.x86_64: W: hidden-file-or-dir /usr/lib/.build-id python2-libssh2.x86_64: W: hidden-file-or-dir /usr/lib/.build-id 1 packages and 0 specfiles checked; 0 errors, 3 warnings. (a similar problem exists with the python3 version of the package). Indeed, if I take a look at the resulting RPM, it includes that /usr/lib/.build-id directory, which seems incorrect. Once we fix that (and the other rpmlint warning), I think this will be OK. Thanks for your work so far.
The .build-id issue is a bug with rpmlint and not an issue with the package, you can safely ignore that warning. See bug 1431408 .
I can see /usr/lib/debug/.build-id directory in the libssh2-python-debuginfo RPM file of the new version as well as previous versions, but neither any */.build-in directory in the python2-libssh2 nor python3-libssh2 RPM files. Please, could you check again?
All right, I've done a bit of digging, and Comment 13 was right, the .build-id issue was a red-herring. There was still the other rpmlint issue about .so provides; I took a look into that, and that was not new, but I fixed it anyway. I've pushed the whole thing onto the master branch (targetting F28). It would be easiest for me to just have it target f28 (instead of backporting to F27), but if you really need it in F27, let me know.
Hello Chris. If you don't mind, it would be great to have this for F27 as well. The changes can be fastforwarded to the F27 branch.
libssh2-python-0.7.1-18.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2017-b5b607a136
libssh2-python-0.7.1-18.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-b5b607a136
libssh2-python-0.7.1-18.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report.
Python 3 support was not actually achieved, see bug 2154193.