diff --git a/.gitignore b/.gitignore index e69de29..4be42c5 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/pywinrm-0.2.1.tar.gz diff --git a/python-winrm.spec b/python-winrm.spec new file mode 100644 index 0000000..e6c12ec --- /dev/null +++ b/python-winrm.spec @@ -0,0 +1,85 @@ +%global srcname winrm +%global sum Python libraries for interacting with windows remote management +%global gh_owner diyan +%global pypi_name py%{srcname} + +Name: python-%{srcname} +Version: 0.2.1 +Release: 1%{?dist} +Summary: %{sum} + +License: MIT +URL: https://pypi.python.org/pypi/%{pypi_name} +Source0: https://github.com/%{gh_owner}/%{pypi_name}/archive/v%{version}.tar.gz#/%{pypi_name}-%{version}.tar.gz +BuildArch: noarch +BuildRequires: python2-devel python3-devel + +# For tests +BuildRequires: python2-six +BuildRequires: python3-six +BuildRequires: python2-requests +BuildRequires: python3-requests +BuildRequires: python2-xmltodict +BuildRequires: python3-xmltodict +BuildRequires: python2-pytest +BuildRequires: python3-pytest +BuildRequires: python2-mock +BuildRequires: python3-mock +BuildRequires: python2-requests_ntlm +BuildRequires: python3-requests_ntlm + +%description +This has the python libraries for interacting with Windows Remote Management + +%package -n python2-%{srcname} +Summary: %{sum} +Requires: python2-xmltodict +Requires: python2-requests_ntlm +%{?python_provide:%python_provide python2-%{srcname}} + +%description -n python2-%{srcname} +This has the python libraries for interacting with Windows Remote Management + + +%package -n python3-%{srcname} +Summary: %{sum} +Requires: python3-xmltodict +Requires: python3-requests_ntlm +%{?python_provide:%python_provide python3-%{srcname}} + +%description -n python3-%{srcname} +This has the python libraries for interacting with Windows Remote Management + + +%prep +%autosetup -n %{pypi_name}-%{version} + +%build +%py2_build +%py3_build + +%install +# Must do the python2 install first because the scripts in /usr/bin are +# overwritten with every setup.py install, and in general we want the +# python3 version to be the default. +%py2_install +%py3_install + +%check +%{__python2} -m pytest winrm/tests +%{__python3} -m pytest winrm/tests + +# Note that there is no %%files section for the unversioned python module if we are building for several python runtimes +%files -n python2-%{srcname} +%license LICENSE +%doc README.md CHANGELOG.md +%{python2_sitelib}/* + +%files -n python3-%{srcname} +%license LICENSE +%doc README.md CHANGELOG.md +%{python3_sitelib}/* + +%changelog +* Mon 24 Oct 2016 James Hogarth - 0.2.1-1 +- Initial package diff --git a/sources b/sources index e69de29..289847c 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +4f28f425a2d7ab9af1433cc8ee5f96bd pywinrm-0.2.1.tar.gz