Browse code

Add python-atomicwrites package

Change-Id: Ic5bbb22e29277643c179f920b34aee7cd41eb6f0
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/3191
Tested-by: gerrit-photon <photon-checkins@vmware.com>
Reviewed-by: Anish Swaminathan <anishs@vmware.com>

DheerajSShetty authored on 2017/07/08 07:57:54
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,66 @@
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 Atomic file writes
4
+Name:           python-atomicwrites
5
+Version:        1.1.5
6
+Release:        1%{?dist}
7
+License:        MIT
8
+Group:          Development/Languages/Python
9
+Vendor:         VMware, Inc.
10
+Distribution:   Photon
11
+Url:            https://github.com/untitaker/python-atomicwrites
12
+Source0:        https://pypi.python.org/packages/a1/e1/2d9bc76838e6e6667fde5814aa25d7feb93d6fa471bf6816daac2596e8b2/atomicwrites-%{version}.tar.gz
13
+%define sha1    atomicwrites=89bfd295abb2c03e20f611a7c2205fc5c09e8509
14
+
15
+BuildRequires:  python-setuptools
16
+BuildRequires:  python2
17
+BuildRequires:  python2-devel
18
+BuildRequires:  python2-libs
19
+Requires:       python2
20
+BuildArch:      noarch
21
+%description
22
+Python Atomic file writes
23
+
24
+%package -n     python3-atomicwrites
25
+Summary:        Python Atomic file writes
26
+BuildRequires:  python3
27
+BuildRequires:  python3-devel
28
+BuildRequires:  python3-libs
29
+Requires:       python3
30
+
31
+%description -n python3-atomicwrites
32
+Python3 version of atomicwrites.
33
+
34
+%prep
35
+%setup -q -n atomicwrites-%{version}
36
+rm -rf ../p3dir
37
+cp -a . ../p3dir
38
+
39
+%build
40
+python2 setup.py build
41
+pushd ../p3dir
42
+python3 setup.py build
43
+popd
44
+
45
+%install
46
+pushd ../p3dir
47
+python3 setup.py install --prefix=%{_prefix} --root=%{buildroot}
48
+popd
49
+python2 setup.py install --prefix=%{_prefix} --root=%{buildroot}
50
+
51
+%files
52
+%defattr(-,root,root)
53
+%license LICENSE
54
+%doc README.rst
55
+%{python2_sitelib}/*
56
+
57
+%files -n python3-atomicwrites
58
+%defattr(-,root,root)
59
+%license LICENSE
60
+%doc README.rst
61
+%{python3_sitelib}/*
62
+
63
+%changelog
64
+*   Fri Jul 07 2017 Dheeraj Shetty <dheerajs@vmware.com> 1.1.5-1
65
+-   Initial packaging for Photon