Browse code

Adding zeromq, python-zeromq, python-lockfile and python-pbr

Change-Id: Ia6169abdc1ab3ebb58883842d33325db7fb39dba
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/2463
Tested-by: gerrit-photon <photon-checkins@vmware.com>
Reviewed-by: Dheeraj S Shetty <dheerajs@vmware.com>

DheerajSShetty authored on 2017/04/18 08:36:33
Showing 5 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,55 @@
0
+%define python3_sitearch /usr/lib/python3.5/site-packages
1
+Summary:        C extensions for Python
2
+Name:           cython3
3
+Version:        0.23.4
4
+Release:        1%{?dist}
5
+Group:          Development/Libraries
6
+License:        Apache License
7
+URL:            http://cython.org/
8
+Source0:        http://cython.org/release/Cython-%{version}.tar.gz
9
+%define sha1 Cython=fc574c5050cd5a8e34435432e2a4a693353ed807
10
+Vendor:		VMware, Inc.
11
+Distribution:	Photon
12
+BuildRequires:	python3
13
+BuildRequires:	python3-devel
14
+BuildRequires:	python3-libs
15
+BuildRequires:  python2
16
+BuildRequires:  python2-libs
17
+BuildRequires:  python-xml
18
+Requires:	python3
19
+
20
+%description
21
+Cython is an optimising static compiler for both the Python programming language and the extended Cython programming language (based on Pyrex). It makes writing C extensions for Python as easy as Python itself.
22
+
23
+%prep
24
+%setup -q -n Cython-%{version}
25
+
26
+
27
+%build
28
+/usr/bin/python3 setup.py build
29
+
30
+%install
31
+/usr/bin/python3 setup.py install --skip-build --root %{buildroot}
32
+mv %{buildroot}%{_bindir}/cython %{buildroot}%{_bindir}/cython3
33
+mv %{buildroot}%{_bindir}/cythonize %{buildroot}%{_bindir}/cythonize3
34
+mv %{buildroot}%{_bindir}/cygdb %{buildroot}%{_bindir}/cygdb3
35
+
36
+%check
37
+make %{?_smp_mflags} test
38
+
39
+%clean
40
+rm -rf %{buildroot}
41
+
42
+
43
+%files
44
+%defattr(-,root,root,-)
45
+%{_bindir}/*
46
+%{python3_sitearch}/*.egg-info
47
+%{python3_sitearch}/Cython/*
48
+%{python3_sitearch}/cython.py*
49
+%{python3_sitearch}/pyximport/*
50
+%{python3_sitearch}/__pycache__/*
51
+
52
+%changelog
53
+* 	Fri Jan 27 2017 Dheeraj Shetty <dheerajs@vmware.com> 0.23.4-1
54
+- 	Initial build.
0 55
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:        file locking module
4
+Name:           python-lockfile
5
+Version:        0.12.2
6
+Release:        1%{?dist}
7
+License:        MIT
8
+Group:          Development/Languages/Python
9
+Vendor:         VMware, Inc.
10
+Distribution:   Photon
11
+Url:            https://github.com/openstack/pylockfile
12
+Source0:        https://pypi.python.org/packages/source/l/lockfile/lockfile-%{version}.tar.gz
13
+%define sha1	lockfile=c2ac46e48585e5f8f8d57ccc55ca83faa8b53b86
14
+
15
+BuildRequires:  python2-devel
16
+BuildRequires:  python-setuptools
17
+BuildRequires:  python-pbr
18
+
19
+%description
20
+The lockfile package exports a LockFile class which provides a simple API for locking files.
21
+Unlike the Windows msvcrt.locking function, the fcntl.lockf and flock functions, and the
22
+deprecated posixfile module, the API is identical across both Unix (including Linux and Mac)
23
+and Windows platforms. The lock mechanism relies on the atomic nature of the link (on Unix)
24
+and mkdir (on Windows) system calls. An implementation based on SQLite is also provided, more
25
+as a demonstration of the possibilities it provides than as production-quality code.
26
+
27
+%package -n     python3-lockfile
28
+Summary:        Python Build Reasonableness
29
+BuildRequires:  python3-devel
30
+BuildRequires:  python-setuptools
31
+BuildRequires:  python3-pbr
32
+
33
+%description -n python3-lockfile
34
+The lockfile package exports a LockFile class which provides a simple API for locking files.
35
+Unlike the Windows msvcrt.locking function, the fcntl.lockf and flock functions, and the
36
+deprecated posixfile module, the API is identical across both Unix (including Linux and Mac)
37
+and Windows platforms. The lock mechanism relies on the atomic nature of the link (on Unix)
38
+and mkdir (on Windows) system calls. An implementation based on SQLite is also provided, more
39
+as a demonstration of the possibilities it provides than as production-quality code.
40
+
41
+%prep
42
+%setup -q -n lockfile-%{version}
43
+rm -rf ../p3dir
44
+cp -a . ../p3dir
45
+
46
+%build
47
+python2 setup.py build
48
+pushd ../p3dir
49
+python3 setup.py build
50
+popd
51
+
52
+%install
53
+python2 setup.py install --prefix=%{_prefix} --root=%{buildroot}
54
+pushd ../p3dir
55
+python3 setup.py install --prefix=%{_prefix} --root=%{buildroot}
56
+popd
57
+
58
+%files
59
+%defattr(-,root,root)
60
+%doc ACKS AUTHORS LICENSE PKG-INFO README.rst RELEASE-NOTES doc/
61
+%{python2_sitelib}/lockfile-%{version}-*.egg-info
62
+%{python2_sitelib}/lockfile
63
+
64
+%files -n python3-lockfile
65
+%defattr(-,root,root)
66
+%doc ACKS AUTHORS LICENSE PKG-INFO README.rst RELEASE-NOTES doc/
67
+%{python3_sitelib}/lockfile-%{version}-*.egg-info
68
+%{python3_sitelib}/lockfile
69
+
70
+%changelog
71
+*   Fri Apr 14 2017 Dheeraj Shetty <dheerajs@vmware.com> 0.12.2-1
72
+-   Initial packaging for Photon
0 73
new file mode 100644
... ...
@@ -0,0 +1,71 @@
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:        Python Build Reasonableness
4
+Name:           python-pbr
5
+Version:        2.1.0
6
+Release:        1%{?dist}
7
+License:        ASL 2.0
8
+Group:          Development/Languages/Python
9
+Vendor:         VMware, Inc.
10
+Distribution:   Photon
11
+Url:            https://docs.openstack.org/developer/pbr/
12
+Source0:        https://pypi.io/packages/source/p/pbr/pbr-%{version}.tar.gz
13
+%define sha1	pbr=cb5278676a96b429e491435ac04cfaf97b41d1c5
14
+
15
+BuildRequires:  python-docutils
16
+BuildRequires:  python-setuptools
17
+BuildRequires:  python2-devel
18
+Requires:       python2
19
+%description
20
+A library for managing setuptools packaging needs in a consistent manner.
21
+
22
+%package -n     python3-pbr
23
+Summary:        Python Build Reasonableness
24
+BuildRequires:  python3-devel
25
+Requires:       python3
26
+
27
+%description -n python3-pbr
28
+Python 3 version.
29
+
30
+%prep
31
+%setup -q -n pbr-%{version}
32
+rm -rf ../p3dir
33
+cp -a . ../p3dir
34
+
35
+%build
36
+python2 setup.py build
37
+pushd ../p3dir
38
+python3 setup.py build
39
+popd
40
+
41
+%install
42
+pushd ../p3dir
43
+python3 setup.py install --prefix=%{_prefix} --root=%{buildroot}
44
+popd
45
+python2 setup.py install --prefix=%{_prefix} --root=%{buildroot}
46
+
47
+%check
48
+python2 setup.py test
49
+pushd ../p3dir
50
+python3 setup.py test
51
+popd
52
+
53
+%files
54
+%defattr(-,root,root)
55
+%license LICENSE
56
+%doc README.rst
57
+%{_bindir}/pbr
58
+%{python2_sitelib}/pbr-%{version}-*.egg-info
59
+%{python2_sitelib}/pbr
60
+
61
+%files -n python3-pbr
62
+%defattr(-,root,root)
63
+%license LICENSE
64
+%doc README.rst
65
+%{python3_sitelib}/pbr-%{version}-*.egg-info
66
+%{python3_sitelib}/pbr
67
+
68
+%changelog
69
+*   Fri Apr 14 2017 Dheeraj Shetty <dheerajs@vmware.com> 2.1.0-1
70
+-   Initial packaging for Photon
0 71
new file mode 100644
... ...
@@ -0,0 +1,65 @@
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:        Software library for fast, message-based applications
4
+Name:           python-zmq
5
+Version:        16.0.2
6
+Release:        1%{?dist}
7
+License:        LGPLv3+ and BSD3
8
+Group:          Development/Languages/Python
9
+Vendor:         VMware, Inc.
10
+Distribution:   Photon
11
+Url:            http://zeromq.org/bindings:python
12
+Source0:        https://pypi.python.org/packages/af/37/8e0bf3800823bc247c36715a52e924e8f8fd5d1432f04b44b8cd7a5d7e55/pyzmq-%{version}.tar.gz
13
+%define sha1	pyzmq=ad91c8d50f4c85e2e321511914d2420ad3603c49
14
+
15
+BuildRequires:  python2-devel
16
+BuildRequires:  python-setuptools
17
+BuildRequires:  zeromq-devel
18
+BuildRequires:  cython
19
+
20
+%description
21
+python bindings for zeromq
22
+
23
+%package -n     python3-zmq
24
+Summary:        Software library for fast, message-based applications
25
+BuildRequires:  python3
26
+BuildRequires:  python3-devel
27
+BuildRequires:  cython3
28
+Requires:       python3
29
+
30
+%description -n python3-zmq
31
+Python 3 version bindings for zeromq
32
+
33
+%prep
34
+%setup -q -n pyzmq-%{version}
35
+rm -rf ../p3dir
36
+cp -a . ../p3dir
37
+
38
+%build
39
+python2 setup.py build
40
+pushd ../p3dir
41
+python3 setup.py build
42
+popd
43
+
44
+%install
45
+pushd ../p3dir
46
+python3 setup.py install --prefix=%{_prefix} --root=%{buildroot}
47
+popd
48
+python2 setup.py install --prefix=%{_prefix} --root=%{buildroot}
49
+
50
+%files
51
+%defattr(-,root,root)
52
+%doc README.md COPYING.* examples/
53
+%{python2_sitelib}/pyzmq-*.egg-info
54
+%{python2_sitelib}/zmq
55
+
56
+%files -n python3-zmq
57
+%defattr(-,root,root)
58
+%doc README.md COPYING.* examples/
59
+%{python3_sitelib}/pyzmq-*.egg-info
60
+%{python3_sitelib}/zmq
61
+
62
+%changelog
63
+*   Fri Apr 14 2017 Dheeraj Shetty <dheerajs@vmware.com> 16.0.2-1
64
+-   Initial packaging for Photon
0 65
new file mode 100644
... ...
@@ -0,0 +1,61 @@
0
+Summary:        library for fast, message-based applications
1
+Name:           zeromq
2
+Version:        4.1.4
3
+Release:        1%{?dist}
4
+URL:            http://www.zeromq.org
5
+License:        LGPLv3+
6
+Group:          System Environment/Libraries
7
+Vendor:         VMware, Inc.
8
+Distribution:   Photon
9
+Source0:        https://archive.org/download/zeromq_4.1.4/%{name}-%{version}.tar.gz
10
+%define sha1 zeromq=b632a4b6f8a14390dc17824e37ff7b10831ce2b4
11
+Requires:       libstdc++
12
+
13
+%description
14
+The 0MQ lightweight messaging kernel is a library which extends the standard
15
+socket interfaces with features traditionally provided by specialised messaging
16
+middleware products. 0MQ sockets provide an abstraction of asynchronous message
17
+queues, multiple messaging patterns, message filtering (subscriptions), seamless
18
+access to multiple transport protocols and more.
19
+
20
+%package    devel
21
+Summary:    Header and development files for zeromq
22
+Requires:   %{name} = %{version}
23
+%description    devel
24
+It contains the libraries and header files to create applications 
25
+
26
+%prep
27
+%setup -q
28
+%build
29
+./configure \
30
+    --prefix=%{_prefix} \
31
+    --with-libsodium=no \
32
+    --disable-static
33
+make %{?_smp_mflags}
34
+
35
+%install
36
+make DESTDIR=%{buildroot} install
37
+find %{buildroot}%{_libdir} -name '*.la' -delete
38
+
39
+%check
40
+make %{?_smp_mflags} check
41
+
42
+%post   -p /sbin/ldconfig
43
+%postun -p /sbin/ldconfig
44
+
45
+%files
46
+%defattr(-,root,root)
47
+%doc AUTHORS ChangeLog COPYING COPYING.LESSER NEWS
48
+%{_bindir}/
49
+%{_libdir}/libzmq.so.*
50
+
51
+%files devel
52
+%defattr(-,root,root,-)
53
+%{_libdir}/libzmq.so
54
+%{_libdir}/pkgconfig/libzmq.pc
55
+%{_includedir}/
56
+%{_mandir}/*
57
+
58
+%changelog
59
+*   Thu Apr 13 2017 Dheeraj Shetty <dheerajs@vmware.com> 4.1.4-1
60
+-   Initial build. First version