diff --git a/python-ssh2-python.spec b/python-ssh2-python.spec index f4145f1..87ec373 100644 --- a/python-ssh2-python.spec +++ b/python-ssh2-python.spec @@ -2,58 +2,86 @@ %global modname ssh2-python +%global debug_package %{nil} + Name: python-%{modname} -Version: 0.15.0 -Release: 10%{?dist} +Version: 0.26.0 +Release: 1%{?dist} Summary: Super fast SSH library - bindings for libssh2 License: LGPLv2+ URL: https://github.com/ParallelSSH/ssh2-python Source0: %{url}/archive/%{version}/%{modname}-%{version}.tar.gz +Source1: conftest.py +BuildRequires: cmake BuildRequires: gcc BuildRequires: libssh2-devel +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-Cython +BuildRequires: python3-sphinx + +# test dependencies +BuildRequires: python3-jinja2 +BuildRequires: python3-paramiko +BuildRequires: python3-mock +BuildRequires: python3-pytest +BuildRequires: python3-mock-ssh-server + %description %{summary}. %package -n python3-%{modname} Summary: %{summary} %{?python_provide:%python_provide python3-%{modname}} -BuildRequires: python3-devel -BuildRequires: python3-setuptools -BuildRequires: python3-Cython %description -n python3-%{modname} %{summary}. Python 3 version. + %prep %autosetup -n %{modname}-%{version} # No bundled libs rm -vrf libssh2 - # Remove pre-generated sources rm $(grep -rl '/\* Generated by Cython') %build export HAVE_AGENT_FWD=0 -%py3_build +export SYSTEM_LIBSSH2=1 +#%%py3_build +# use build_ext to completely instruct cythonize options +CFLAGS="${CFLAGS:-${RPM_OPT_FLAGS}}" LDFLAGS="${LDFLAGS:-${RPM_LD_FLAGS}}" \ +%{__python3} setup.py build_ext --inplace +%{__python3} -msphinx -M html doc _build %install +export SYSTEM_LIBSSH2=1 %py3_install -#check -# Requires real SSH server +%check +# use mocked sshd +cp {SOURCE1} tests +sed -i -r "s:.*start_server:\#\0" tests/base_test.py +pytest %files -n python3-%{modname} %license COPYING LICENSE %doc README.rst Changelog.rst +%doc examples/ _build/html/ %{python3_sitearch}/ssh2_python-*.egg-info/ -%{python3_sitearch}/ssh2/ +#%{python3_sitearch}/ssh2/ %changelog +* Tue Jul 28 2021 Raphael Groner - 0.26.0-1 +- bump to v0.26.0 +- generate and ship documentation incl. examples +- try to execute some tests without need for sshd server + * Wed Jul 29 2020 Fedora Release Engineering - 0.15.0-10 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild