Browse code

Add python-atomicwrites package

Change-Id: I11d93ae79c40bfe53243805d28a368940a4701c8
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/3189
Tested-by: gerrit-photon <photon-checkins@vmware.com>
Reviewed-by: Xiaolin Li <xiaolinl@vmware.com>

DheerajSShetty authored on 2017/07/08 07:47:33
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,74 @@
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-devel
17
+BuildRequires:  python-xml
18
+BuildRequires:  python-pytest
19
+Requires:       python2
20
+BuildArch:      noarch
21
+
22
+%description
23
+Python Atomic file writes
24
+
25
+%package -n     python3-atomicwrites
26
+Summary:        Python Atomic file writes
27
+BuildRequires:  python3-devel
28
+BuildRequires:  python3-setuptools
29
+BuildRequires:  python3-xml
30
+BuildRequires:  python3-pytest
31
+Requires:       python3
32
+
33
+%description -n python3-atomicwrites
34
+Python3 version of atomicwrites.
35
+
36
+%prep
37
+%setup -q -n atomicwrites-%{version}
38
+rm -rf ../p3dir
39
+cp -a . ../p3dir
40
+
41
+%build
42
+python2 setup.py build
43
+pushd ../p3dir
44
+python3 setup.py build
45
+popd
46
+
47
+%install
48
+pushd ../p3dir
49
+python3 setup.py install --prefix=%{_prefix} --root=%{buildroot}
50
+popd
51
+python2 setup.py install --prefix=%{_prefix} --root=%{buildroot}
52
+
53
+%check
54
+py.test-2
55
+pushd ../p3dir
56
+py.test-3
57
+popd
58
+
59
+%files
60
+%defattr(-,root,root)
61
+%license LICENSE
62
+%doc README.rst
63
+%{python2_sitelib}/*
64
+
65
+%files -n python3-atomicwrites
66
+%defattr(-,root,root)
67
+%license LICENSE
68
+%doc README.rst
69
+%{python3_sitelib}/*
70
+
71
+%changelog
72
+*   Fri Jul 07 2017 Dheeraj Shetty <dheerajs@vmware.com> 1.1.5-1
73
+-   Initial packaging for Photon