Blame python-ssh-python.spec

c19915f
%{?python_enable_dependency_generator}
c19915f
c19915f
%global modname ssh-python
c19915f
c19915f
Name:           python-%{modname}
db9cd31
Version:        0.10.0
7496c0f
Release:        6%{?dist}
c19915f
Summary:        Bindings for libssh C library
c19915f
c19915f
License:        LGPLv2+
c19915f
URL:            https://github.com/ParallelSSH/ssh-python
c19915f
Source0:        %{url}/archive/%{version}/%{modname}-%{version}.tar.gz
c19915f
c19915f
Patch0001:      0001-Set-master_doc-to-index-in-conf.py-for-sphinx.patch
c19915f
c19915f
BuildRequires:  cmake
c19915f
BuildRequires:  gcc
c19915f
BuildRequires:  libssh-devel
c19915f
c19915f
BuildRequires:  python3-devel
c19915f
BuildRequires:  python3-setuptools
c19915f
BuildRequires:  python3-Cython
c19915f
BuildRequires:  python3-sphinx
c19915f
BuildRequires:  python3-sphinx_rtd_theme
c19915f
c19915f
# test dependencies
c19915f
BuildRequires:  python3-pytest
c19915f
BuildRequires:  %{_sbindir}/sshd %{_bindir}/ssh-agent
c19915f
c19915f
Recommends: python3-%{modname}-doc
c19915f
c19915f
%description
c19915f
%{summary}.
c19915f
c19915f
%package -n python3-%{modname}
c19915f
Summary:        %{summary}
c19915f
%{?python_provide:%python_provide python3-%{modname}}
c19915f
c19915f
%description -n python3-%{modname}
c19915f
%{summary}.
c19915f
c19915f
Python 3 version.
c19915f
c19915f
c19915f
%prep
c19915f
%setup -n %{modname}-%{version}
c19915f
%patch1 -p1
c19915f
# No bundled libs
c19915f
rm -vrf libssh
c19915f
sed -i -r 's:build_ssh[(].*:pass:' setup.py
c19915f
# Remove pre-generated sources
c19915f
rm $(grep -rl '/\* Generated by Cython')
c19915f
c19915f
%build
c19915f
%py3_build
c19915f
export HAVE_AGENT_FWD=0
c19915f
# use build_ext to completely instruct cythonize options
c19915f
export CFLAGS="${CFLAGS:-${RPM_OPT_FLAGS}}"
c19915f
export LDFLAGS="${LDFLAGS:-${RPM_LD_FLAGS}}"
c19915f
export CXXFLAGS="${CXXFLAGS:-${RPM_OPT_FLAGS}}"
c19915f
%{python3} setup.py build_ext --inplace
c19915f
%{python3} -msphinx -M html doc _build
c19915f
c19915f
%install
c19915f
%py3_install
c19915f
# remove 0 length files
c19915f
rm -f %{buildroot}/%{python3_sitearch}/ssh/__init__.pxd
c19915f
chmod 0755 %{buildroot}/%{python3_sitearch}/ssh/*.so
c19915f
c19915f
c19915f
%check
c19915f
# disable some options for sshd running inside mock
c19915f
echo UsePrivilegeSeparation no >> tests/embedded_server/sshd_config.tmpl
c19915f
echo StrictModes no >> tests/embedded_server/sshd_config.tmpl
c19915f
# test_statvfs/test_fstatvfs do not seem to work in mock
c19915f
rm -f tests/test_sftp.py
c19915f
%pytest -v tests
c19915f
c19915f
%files -n python3-%{modname}
c19915f
%license COPYING LICENSE
c19915f
%doc README.rst Changelog.rst
c19915f
%{python3_sitearch}/ssh_python-*.egg-info/
c19915f
%{python3_sitearch}/ssh/
c19915f
c19915f
%package -n python3-%{modname}-doc
c19915f
Summary:        %{summary} documentation
c19915f
c19915f
%description -n python3-%{modname}-doc
c19915f
%{summary} documentation.
c19915f
c19915f
%files -n python3-%{modname}-doc
c19915f
%doc examples/ _build/html/
c19915f
c19915f
%changelog
7496c0f
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.10.0-6
7496c0f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
7496c0f
27b4a19
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.10.0-5
27b4a19
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
27b4a19
da5d2c5
* Thu Jun 16 2022 Python Maint <python-maint@redhat.com> - 0.10.0-4
da5d2c5
- Rebuilt for Python 3.11
da5d2c5
db9cd31
* Thu Jun 16 2022 James Slagle <jslagle@redhat> - 0.10.0-1
db9cd31
- Update to 0.10.0
db9cd31
31239c2
* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 0.9.0-3
31239c2
- Rebuilt for Python 3.11
31239c2
2ce12ae
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.0-2
2ce12ae
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
2ce12ae
c19915f
* Wed Dec 8 2021 James Slagle <jslagle@redhat.com> - 0.9.0-1
c19915f
- Initial package