Change-Id: I9c209724ccf3ac872bdedb89fcdab6ccb6cecfbd
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/2188
Tested-by: gerrit-photon <photon-checkins@vmware.com>
Reviewed-by: Anish Swaminathan <anishs@vmware.com>
| ... | ... |
@@ -4,7 +4,7 @@ |
| 4 | 4 |
Summary: An asynchronous networking framework written in Python |
| 5 | 5 |
Name: python-Twisted |
| 6 | 6 |
Version: 17.1.0 |
| 7 |
-Release: 2%{?dist}
|
|
| 7 |
+Release: 3%{?dist}
|
|
| 8 | 8 |
License: MIT |
| 9 | 9 |
Group: Development/Languages/Python |
| 10 | 10 |
Vendor: VMware, Inc. |
| ... | ... |
@@ -22,7 +22,9 @@ BuildRequires: python-zope.interface |
| 22 | 22 |
|
| 23 | 23 |
Requires: python2 |
| 24 | 24 |
Requires: python2-libs |
| 25 |
-requires: python-zope.interface |
|
| 25 |
+Requires: python-zope.interface |
|
| 26 |
+Requires: python-netaddr |
|
| 27 |
+Requires: python-incremental |
|
| 26 | 28 |
|
| 27 | 29 |
BuildArch: x86_64 |
| 28 | 30 |
|
| ... | ... |
@@ -41,6 +43,8 @@ BuildRequires: python3-zope.interface |
| 41 | 41 |
Requires: python3 |
| 42 | 42 |
Requires: python3-libs |
| 43 | 43 |
Requires: python3-zope.interface |
| 44 |
+Requires: python3-netaddr |
|
| 45 |
+Requires: python3-incremental |
|
| 44 | 46 |
|
| 45 | 47 |
%description -n python3-Twisted |
| 46 | 48 |
Python 3 version. |
| ... | ... |
@@ -76,6 +80,8 @@ tox -e py27-tests |
| 76 | 76 |
%{_bindir}/*
|
| 77 | 77 |
|
| 78 | 78 |
%changelog |
| 79 |
+* Mon Mar 27 2017 Xiaolin Li <xiaolinl@vmware.com> 17.1.0-3 |
|
| 80 |
+- Added python-netaddr and python-incremental to the requires. |
|
| 79 | 81 |
* Thu Mar 23 2017 Xiaolin Li <xiaolinl@vmware.com> 17.1.0-2 |
| 80 | 82 |
- Change requires |
| 81 | 83 |
* Wed Mar 01 2017 Xiaolin Li <xiaolinl@vmware.com> 17.1.0-1 |
| ... | ... |
@@ -1,13 +1,13 @@ |
| 1 |
-%{!?python_sitelib: %define python_sitelib %(python -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")}
|
|
| 1 |
+%{!?python2_sitelib: %define python2_sitelib %(python2 -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")}
|
|
| 2 | 2 |
%{!?python3_sitelib: %define python3_sitelib %(python3 -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")}
|
| 3 | 3 |
|
| 4 | 4 |
Name: python-netaddr |
| 5 | 5 |
Version: 0.7.19 |
| 6 |
-Release: 1%{?dist}
|
|
| 6 |
+Release: 2%{?dist}
|
|
| 7 | 7 |
Summary: A network address manipulation library for Python |
| 8 |
-License: MIT |
|
| 8 |
+License: BSD |
|
| 9 | 9 |
Group: Development/Languages/Python |
| 10 |
-Url: https://pypi.python.org/packages/0c/13/7cbb180b52201c07c796243eeff4c256b053656da5cfe3916c3f5b57b3a0/netaddr-0.7.19.tar.gz |
|
| 10 |
+Url: https://files.pythonhosted.org/packages/source/n/netaddr/netaddr-%{version}.tar.gz
|
|
| 11 | 11 |
Source0: netaddr-%{version}.tar.gz
|
| 12 | 12 |
%define sha1 netaddr=00e0ce7d7ebc1d6e7943e884aa51ccb7becdc9ea |
| 13 | 13 |
|
| ... | ... |
@@ -23,24 +23,51 @@ BuildArch: noarch |
| 23 | 23 |
%description |
| 24 | 24 |
A network address manipulation library for Python |
| 25 | 25 |
|
| 26 |
+%package -n python3-netaddr |
|
| 27 |
+Summary: Python3-netaddr |
|
| 28 |
+BuildRequires: python3-devel |
|
| 29 |
+ |
|
| 30 |
+%description -n python3-netaddr |
|
| 31 |
+Python 3 version. |
|
| 32 |
+ |
|
| 26 | 33 |
%prep |
| 27 | 34 |
%setup -n netaddr-%{version}
|
| 35 |
+rm -rf ../p3dir |
|
| 36 |
+cp -a . ../p3dir |
|
| 28 | 37 |
|
| 29 | 38 |
%build |
| 30 |
-python setup.py build |
|
| 39 |
+python2 setup.py build |
|
| 40 |
+pushd ../p3dir |
|
| 41 |
+python3 setup.py build |
|
| 42 |
+popd |
|
| 31 | 43 |
|
| 32 | 44 |
%install |
| 33 |
-python setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
|
| 45 |
+pushd ../p3dir |
|
| 46 |
+python3 setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
|
| 47 |
+mv %{buildroot}/%{_bindir}/netaddr %{buildroot}/%{_bindir}/netaddr3
|
|
| 48 |
+popd |
|
| 49 |
+python2 setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
|
| 50 |
+ |
|
| 34 | 51 |
|
| 35 | 52 |
%check |
| 36 | 53 |
easy_install py |
| 37 |
-%{__python} test_netadr.py
|
|
| 54 |
+python2 test_netadr.py |
|
| 55 |
+pushd ../p3dir |
|
| 56 |
+python3 test_netadr.py |
|
| 57 |
+popd |
|
| 38 | 58 |
|
| 39 | 59 |
%files |
| 40 | 60 |
%defattr(-,root,root,-) |
| 41 | 61 |
/usr/bin/netaddr |
| 42 |
-%{python_sitelib}/*
|
|
| 62 |
+%{python2_sitelib}/*
|
|
| 63 |
+ |
|
| 64 |
+%files -n python3-netaddr |
|
| 65 |
+%defattr(-,root,root,-) |
|
| 66 |
+/usr/bin/netaddr3 |
|
| 67 |
+%{python3_sitelib}/*
|
|
| 43 | 68 |
|
| 44 | 69 |
%changelog |
| 70 |
+* Mon Mar 27 2017 XIaolin Li <xiaolinl@vmware.com> 0.7.19-2 |
|
| 71 |
+- Added python3 package. |
|
| 45 | 72 |
* Fri Feb 03 2017 Vinay Kulkarni <kulkarniv@vmware.com> 0.7.19-1 |
| 46 | 73 |
- Initial version of python-netaddr package for Photon. |