|
|
ea8b775 |
%global srcname winrm
|
|
|
ea8b775 |
%global sum Python libraries for interacting with windows remote management
|
|
|
ea8b775 |
%global gh_owner diyan
|
|
|
ea8b775 |
%global pypi_name py%{srcname}
|
|
|
ea8b775 |
|
|
|
afce2e3 |
%if 0%{?fedora}
|
|
|
afce2e3 |
# escaping for EPEL.
|
|
|
afce2e3 |
%global with_python3 1
|
|
|
afce2e3 |
%endif
|
|
|
afce2e3 |
|
|
|
afce2e3 |
%if 0%{?rhel} && 0%{?rhel} <= 6
|
|
|
afce2e3 |
%{!?__python2: %global __python2 /usr/bin/python2}
|
|
|
afce2e3 |
%{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
|
|
|
afce2e3 |
%{!?python2_sitearch: %global python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
|
|
|
afce2e3 |
%{!?py2_build: %global py2_build %{expand: CFLAGS="%{optflags}" %{__python2} setup.py %{?py_setup_args} build --executable="%{__python2} -s"}}
|
|
|
afce2e3 |
%{!?py2_install: %global py2_install %{expand: CFLAGS="%{optflags}" %{__python2} setup.py %{?py_setup_args} install -O1 --skip-build --root %{buildroot}}}
|
|
|
afce2e3 |
%endif
|
|
|
afce2e3 |
|
|
|
ea8b775 |
Name: python-%{srcname}
|
|
|
73cc2aa |
Version: 0.3.0
|
|
|
1d97ef9 |
Release: 3%{?dist}
|
|
|
ea8b775 |
Summary: %{sum}
|
|
|
ea8b775 |
|
|
|
ea8b775 |
License: MIT
|
|
|
ea8b775 |
URL: https://pypi.python.org/pypi/%{pypi_name}
|
|
|
ea8b775 |
Source0: https://github.com/%{gh_owner}/%{pypi_name}/archive/v%{version}.tar.gz#/%{pypi_name}-%{version}.tar.gz
|
|
|
ea8b775 |
BuildArch: noarch
|
|
|
afce2e3 |
|
|
|
afce2e3 |
BuildRequires: python2-devel
|
|
|
bbef981 |
%if 0%{?with_python3}
|
|
|
afce2e3 |
BuildRequires: python3-devel
|
|
|
afce2e3 |
%endif
|
|
|
ea8b775 |
|
|
|
ea8b775 |
# For tests
|
|
|
afce2e3 |
%if 0%{?fedora}
|
|
|
afce2e3 |
BuildRequires: python2-pytest
|
|
|
ea8b775 |
BuildRequires: python2-six
|
|
|
ea8b775 |
BuildRequires: python2-requests
|
|
|
ea8b775 |
BuildRequires: python2-xmltodict
|
|
|
afce2e3 |
%else
|
|
|
afce2e3 |
BuildRequires: pytest
|
|
|
afce2e3 |
BuildRequires: python-six
|
|
|
afce2e3 |
BuildRequires: python-requests
|
|
|
afce2e3 |
BuildRequires: python-xmltodict
|
|
|
afce2e3 |
%endif
|
|
|
bbef981 |
%if 0%{?rhel} && 0%{?rhel} <= 6
|
|
|
bbef981 |
BuildRequires: python-mock
|
|
|
bbef981 |
%else
|
|
|
afce2e3 |
BuildRequires: python2-mock
|
|
|
bbef981 |
%endif
|
|
|
afce2e3 |
BuildRequires: python2-requests_ntlm
|
|
|
afce2e3 |
|
|
|
bbef981 |
%if 0%{?with_python3}
|
|
|
afce2e3 |
BuildRequires: python3-six
|
|
|
afce2e3 |
BuildRequires: python3-requests
|
|
|
ea8b775 |
BuildRequires: python3-xmltodict
|
|
|
ea8b775 |
BuildRequires: python3-pytest
|
|
|
ea8b775 |
BuildRequires: python3-mock
|
|
|
ea8b775 |
BuildRequires: python3-requests_ntlm
|
|
|
afce2e3 |
%endif
|
|
|
ea8b775 |
|
|
|
ea8b775 |
%description
|
|
|
ea8b775 |
This has the python libraries for interacting with Windows Remote Management
|
|
|
ea8b775 |
|
|
|
ea8b775 |
%package -n python2-%{srcname}
|
|
|
ea8b775 |
Summary: %{sum}
|
|
|
bbef981 |
%if 0%{?fedora}
|
|
|
ea8b775 |
Requires: python2-xmltodict
|
|
|
19cfcd5 |
BuildRequires: python2-requests
|
|
|
bbef981 |
%else
|
|
|
bbef981 |
Requires: python-xmltodict
|
|
|
19cfcd5 |
Requires: python-requests
|
|
|
bbef981 |
%endif
|
|
|
ea8b775 |
Requires: python2-requests_ntlm
|
|
|
ea8b775 |
%{?python_provide:%python_provide python2-%{srcname}}
|
|
|
ea8b775 |
|
|
|
ea8b775 |
%description -n python2-%{srcname}
|
|
|
ea8b775 |
This has the python libraries for interacting with Windows Remote Management
|
|
|
ea8b775 |
|
|
|
ea8b775 |
|
|
|
afce2e3 |
%if 0%{?with_python3}
|
|
|
ea8b775 |
%package -n python3-%{srcname}
|
|
|
ea8b775 |
Summary: %{sum}
|
|
|
ea8b775 |
Requires: python3-xmltodict
|
|
|
ea8b775 |
Requires: python3-requests_ntlm
|
|
|
19cfcd5 |
Requires: python3-requests
|
|
|
ea8b775 |
%{?python_provide:%python_provide python3-%{srcname}}
|
|
|
ea8b775 |
|
|
|
ea8b775 |
%description -n python3-%{srcname}
|
|
|
ea8b775 |
This has the python libraries for interacting with Windows Remote Management
|
|
|
afce2e3 |
%endif
|
|
|
ea8b775 |
|
|
|
ea8b775 |
|
|
|
ea8b775 |
%prep
|
|
|
ea8b775 |
%autosetup -n %{pypi_name}-%{version}
|
|
|
ea8b775 |
|
|
|
ea8b775 |
%build
|
|
|
ea8b775 |
%py2_build
|
|
|
afce2e3 |
%if 0%{?with_python3}
|
|
|
ea8b775 |
%py3_build
|
|
|
afce2e3 |
%endif
|
|
|
ea8b775 |
|
|
|
ea8b775 |
%install
|
|
|
ea8b775 |
# Must do the python2 install first because the scripts in /usr/bin are
|
|
|
ea8b775 |
# overwritten with every setup.py install, and in general we want the
|
|
|
ea8b775 |
# python3 version to be the default.
|
|
|
ea8b775 |
%py2_install
|
|
|
afce2e3 |
%if 0%{?with_python3}
|
|
|
ea8b775 |
%py3_install
|
|
|
afce2e3 |
%endif
|
|
|
ea8b775 |
|
|
|
ea8b775 |
%check
|
|
|
ea8b775 |
%{__python2} -m pytest winrm/tests
|
|
|
afce2e3 |
%if 0%{?with_python3}
|
|
|
ea8b775 |
%{__python3} -m pytest winrm/tests
|
|
|
afce2e3 |
%endif
|
|
|
ea8b775 |
|
|
|
ea8b775 |
# Note that there is no %%files section for the unversioned python module if we are building for several python runtimes
|
|
|
ea8b775 |
%files -n python2-%{srcname}
|
|
|
ea8b775 |
%license LICENSE
|
|
|
ea8b775 |
%doc README.md CHANGELOG.md
|
|
|
ea8b775 |
%{python2_sitelib}/*
|
|
|
ea8b775 |
|
|
|
afce2e3 |
%if 0%{?with_python3}
|
|
|
ea8b775 |
%files -n python3-%{srcname}
|
|
|
ea8b775 |
%license LICENSE
|
|
|
ea8b775 |
%doc README.md CHANGELOG.md
|
|
|
ea8b775 |
%{python3_sitelib}/*
|
|
|
afce2e3 |
%endif
|
|
|
ea8b775 |
|
|
|
ea8b775 |
%changelog
|
|
|
1d97ef9 |
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.0-3
|
|
|
1d97ef9 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
|
|
1d97ef9 |
|
|
|
ff348fb |
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 0.3.0-2
|
|
|
ff348fb |
- Rebuilt for Python 3.7
|
|
|
ff348fb |
|
|
|
73cc2aa |
* Tue Apr 17 2018 James Hogarth <james.hogarth@gmail.com> - 0.3.0-1
|
|
|
73cc2aa |
- Update to 0.3.0
|
|
|
73cc2aa |
|
|
|
8b7aca8 |
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.2-4
|
|
|
8b7aca8 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
|
|
8b7aca8 |
|
|
|
8b91dbe |
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.2-3
|
|
|
8b91dbe |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
|
|
8b91dbe |
|
|
|
6fbc92f |
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.2-2
|
|
|
6fbc92f |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
|
|
6fbc92f |
|
|
|
19cfcd5 |
* Sat Feb 04 2017 James Hogarth <james.hogarth@gmail.com> - 0.2.2-1
|
|
|
19cfcd5 |
- Update to 0.2.2
|
|
|
19cfcd5 |
- Update requires to fix bz#1409670
|
|
|
19cfcd5 |
|
|
|
bbef981 |
* Tue Dec 20 2016 James Hogarth <james.hogarth@gmail.com> - 0.2.1-3
|
|
|
bbef981 |
- Fix broken requires for epel
|
|
|
bbef981 |
|
|
|
7eaac16 |
* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 0.2.1-2
|
|
|
7eaac16 |
- Rebuild for Python 3.6
|
|
|
7eaac16 |
|
|
|
1738fd5 |
* Mon Oct 24 2016 James Hogarth <james.hogarth@gmail.com> - 0.2.1-1
|
|
|
ea8b775 |
- Initial package
|