Browse code

Added coverage 4.3.4. (Bug 1837233)

Change-Id: I6be0f02474ddc1a4bf24231521ead16841d58192
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/2298
Tested-by: gerrit-photon <photon-checkins@vmware.com>
Reviewed-by: Priyesh Padmavilasom <ppadmavilasom@vmware.com>

xiaolin-vmware authored on 2017/04/06 07:16:14
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,73 @@
0
+%{!?python2_sitelib: %define python2_sitelib %(python2 -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")}
1
+%{!?python3_sitelib: %define python3_sitelib %(python3 -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")}
2
+
3
+Summary:        Code coverage measurement for Python.
4
+Name:           python-coverage
5
+Version:        4.3.4
6
+Release:        1%{?dist}
7
+License:        Apache 2.0
8
+Group:          Development/Languages/Python
9
+Vendor:         VMware, Inc.
10
+Distribution:   Photon
11
+Url:            https://pypi.python.org/pypi/coverage
12
+Source0:        https://files.pythonhosted.org/packages/source/c/coverage/coverage-%{version}.tar.gz
13
+%define         sha1 coverage=8ffe985cb6efd4b747fd8ee75a9a41e4f319cc71
14
+
15
+BuildRequires:  python2
16
+BuildRequires:  python2-libs
17
+BuildRequires:  python2-devel
18
+BuildRequires:  python-setuptools
19
+
20
+Requires:       python2
21
+Requires:       python2-libs
22
+
23
+%description
24
+Code coverage measurement for Python.
25
+Coverage.py measures code coverage, typically during test execution. It uses the code analysis tools and tracing hooks provided in the Python standard library to determine which lines are executable, and which have been executed.
26
+
27
+%package -n     python3-coverage
28
+Summary:        python-coverage
29
+BuildRequires:  python3-devel
30
+BuildRequires:  python3-libs
31
+
32
+Requires:       python3
33
+Requires:       python3-libs
34
+
35
+%description -n python3-coverage
36
+Python 3 version.
37
+
38
+%prep
39
+%setup -q -n coverage-%{version}
40
+rm -rf ../p3dir
41
+cp -a . ../p3dir
42
+
43
+%build
44
+python2 setup.py build
45
+pushd ../p3dir
46
+python3 setup.py build
47
+popd
48
+
49
+%install
50
+python2 setup.py install --prefix=%{_prefix} --root=%{buildroot}
51
+pushd ../p3dir
52
+python3 setup.py install --prefix=%{_prefix} --root=%{buildroot}
53
+popd
54
+
55
+%check
56
+python2 setup.py test
57
+pushd ../p3dir
58
+python3 setup.py test
59
+popd
60
+
61
+%files
62
+%defattr(-,root,root)
63
+%{python2_sitelib}/*
64
+
65
+%files -n python3-coverage
66
+%defattr(-,root,root)
67
+%{python3_sitelib}/*
68
+%{_bindir}/*
69
+
70
+%changelog
71
+*   Wed Apr 05 2017 Xiaolin Li <xiaolinl@vmware.com> 4.3.4-1
72
+-   Initial packaging for Photon