Browse code

python-PyHamcrest - new package

Added new package - PyHamcrest
Added PyHamcrest to be installed for Twisted

Change-Id: Ib41f6088eb6ec5ba8ecbd1bfa744e4eaba13b9f9
Signed-off-by: Tapas Kundu <tkundu@vmware.com>
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/7893
Tested-by: gerrit-photon <photon-checkins@vmware.com>
Reviewed-by: Srinidhi Rao <srinidhir@vmware.com>

Tapas Kundu authored on 2019/08/30 18:49:13
Showing 2 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,72 @@
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
+Name:           python-PyHamcrest
4
+Version:        1.9.0
5
+Release:        1%{?dist}
6
+Summary:        Python Hamcrest framework for matcher objects
7
+Group:          Development/Libraries
8
+License:        BSD License (New BSD)
9
+URL:            https://pypi.org/project/PyHamcrest
10
+Vendor:         VMware, Inc.
11
+Distribution:   Photon
12
+Source0:        https://pypi.python.org/packages/source/n/deepmerge/PyHamcrest-%{version}.tar.gz
13
+%define sha1    PyHamcrest=e9edf0bd613f10540a92e403005fbdaccbc8c868
14
+BuildRequires:  python2-devel
15
+BuildRequires:  python-setuptools
16
+BuildRequires:  python3-devel
17
+BuildRequires:  python3-setuptools
18
+BuildRequires:  python-xml
19
+BuildRequires:  python3-xml
20
+Requires:       python2
21
+Requires:       python2-libs
22
+BuildArch:      noarch
23
+
24
+%description
25
+PyHamcrest is a framework for writing matcher objects, allowing you to declaratively define “match” rules.
26
+
27
+%package -n python3-PyHamcrest
28
+Summary:        Python Hamcrest framework for matcher objects
29
+Requires:       python3
30
+Requires:       python3-libs
31
+
32
+%description -n python3-PyHamcrest
33
+PyHamcrest is a framework for writing matcher objects, allowing you to declaratively define “match” rules.
34
+
35
+%prep
36
+%setup -q -n PyHamcrest-%{version}
37
+rm -rf ../p3dir
38
+cp -a . ../p3dir
39
+
40
+%build
41
+python2 setup.py build
42
+pushd ../p3dir
43
+python3 setup.py build
44
+popd
45
+
46
+%install
47
+python2 setup.py install --prefix=%{_prefix} --root=%{buildroot}
48
+pushd ../p3dir
49
+python3 setup.py install --prefix=%{_prefix} --root=%{buildroot}
50
+popd
51
+
52
+%check
53
+#no test folder in source tar
54
+
55
+%clean
56
+rm -rf %{buildroot}/*
57
+
58
+
59
+%files
60
+%defattr(-,root,root)
61
+%{python2_sitelib}/*
62
+
63
+%files -n python3-PyHamcrest
64
+%defattr(-,root,root)
65
+%doc README.rst
66
+%doc LICENSE.txt
67
+%{python3_sitelib}/*
68
+
69
+%changelog
70
+*  Fri Aug 30 2019 Tapas Kundu <tkundu@vmware.com> 1.9.0-1
71
+-  Initial packaging for photon OS
... ...
@@ -4,7 +4,7 @@
4 4
 Summary:        An asynchronous networking framework written in Python
5 5
 Name:           python-Twisted
6 6
 Version:        18.7.0
7
-Release:        2%{?dist}
7
+Release:        3%{?dist}
8 8
 License:        MIT
9 9
 Group:          Development/Languages/Python
10 10
 Vendor:         VMware, Inc.
... ...
@@ -39,6 +39,7 @@ Requires:       python-incremental
39 39
 Requires:       python-constantly
40 40
 Requires:       python-hyperlink
41 41
 Requires:       python-attrs
42
+Requires:       python-PyHamcrest
42 43
 %description
43 44
 Twisted is an event-driven networking engine written in Python and licensed under the open source ​MIT license. Twisted runs on Python 2 and an ever growing subset also works with Python 3.
44 45
 
... ...
@@ -55,6 +56,7 @@ Requires:       python3-incremental
55 55
 Requires:       python3-constantly
56 56
 Requires:       python3-hyperlink
57 57
 Requires:       python3-attrs
58
+Requires:       python3-PyHamcrest
58 59
 
59 60
 %description -n python3-Twisted
60 61
 Python 3 version.
... ...
@@ -128,6 +130,8 @@ popd
128 128
 %{_bindir}/cftp3
129 129
 
130 130
 %changelog
131
+*   Fri Aug 30 2019 Tapas Kundu <tkundu@vmware.com> 18.7.0-3
132
+-   Added requires as PyHamcrest
131 133
 *   Tue Oct 30 2018 Tapas Kundu <tkundu@vmware.com> 18.7.0-2
132 134
 -   Moved build requires from subpackage
133 135
 -   Added attrs package in requires.