summaryrefslogtreecommitdiffstats
path: root/SPECS/python-pywinrm.spec
blob: 23bcedecfb70992264b436770d21f0da23634ecd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# sitelib for noarch packages, sitearch for others (remove the unneeded one)
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}

%global commit 31bcc48327c6e50908d1cdc208daf4cb0b799af3
%global shortcommit %(c=%{commit}; echo ${c:0:7})
%global checkout 20140726git%{shortcommit}
Name:           python-pywinrm
Version:        0.0.2
Release:        2.%{checkout}%{?dist}
Summary:        Python library for Windows Remote Management

License:        MIT
URL:            http://github.com/diyan/pywinrm/
Source0:        https://github.com/diyan/pywinrm/archive/%{commit}/pywinrm-%{commit}.tar.gz 

BuildArch:      noarch
BuildRequires:  python-devel
BuildRequires:  python-setuptools
Requires:       python-isodate
Requires:       python-xmltodict
Requires:       pytest
Requires:       python-pytest-cov
Requires:       python-pytest-pep8
%description
pywinrm is a Python client for Windows Remote Management (WinRM). This allows 
you to invoke commands on target Windows machines from any machine that can 
run Python.
WinRM allows you to call native objects in Windows. This includes, running batch
scripts or powershell scripts, fetching WMI variables, and more.

%package -n python3-pywinrm
Summary:        Python3 library for Windows Remote Management
BuildRequires:  python3-devel
BuildRequires:  python3-setuptools
Requires:       python3-isodate
Requires:       python3-xmltodict
Requires:       python3-pytest
Requires:       python3-pytest-cov
Requires:       python3-pytest-pep8
%description -n python3-pywinrm
pywinrm is a Python client for Windows Remote Management (WinRM). This allows 
you to invoke commands on target Windows machines from any machine that can 
run Python.
WinRM allows you to call native objects in Windows. This includes, running batch
scripts or powershell scripts, fetching WMI variables, and more.

%prep
%setup -qn pywinrm-%{commit}
find . -empty -exec rm {} \;
rm -rf %{py3dir}
cp -a  . %{py3dir}

%build
pushd %{py3dir}
%{__python3} setup.py build
popd
%{__python2} setup.py build

%install
pushd %{py3dir}
%{__python3} setup.py install -O1 --skip-build --root %{buildroot}
popd 
%{__python2} setup.py install -O1 --skip-build --root %{buildroot}

%files
%doc LICENSE README.md
%{python2_sitelib}/winrm/*
%{python2_sitelib}/pywinrm*
%files -n python3-pywinrm
%doc LICENSE README.md
%{python3_sitelib}/winrm/*
%{python3_sitelib}/pywinrm*

%changelog
* Sat Jul 26 2014 Pete Travis <immanetize@fedoraproject.org> 0.0.2-2.20140726git31bcc48
- Add python3 subpackage
- Use git snapshot instead of pypi shapshot; pypi did not have license or docs
* Fri Jul 25 2014 Pete Travis <immanetize@fedoraproject.org> 0.0.2-1.20140726git31bcc48
- Initial packaging