eb0a7af
%if 0%{?fedora}
fb7a04e
%global with_python3 1
eb0a7af
%endif
eb0a7af
eb0a7af
%global pypi_name ryu
eb0a7af
3ca20c7
%global with_check 1
Arie 15ebddf
eb0a7af
Name:           python-%{pypi_name}
a7cfc3b
Version:        4.26
2ff8fc1
Release:        2%{?dist}
eb0a7af
Summary:        Component-based Software-defined Networking Framework
eb0a7af
eb0a7af
License:        Apache-2.0
eb0a7af
Url:            https://osrg.github.io/ryu
fb7a04e
Source:         https://pypi.io/packages/source/r/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
eb0a7af
BuildArch:      noarch
eb0a7af
eb0a7af
%description
eb0a7af
Ryu provides software components with well defined API that make it easy for developers to create new
eb0a7af
network management and control applications.
eb0a7af
eb0a7af
%package -n     python2-%{pypi_name}
eb0a7af
Summary:        Component-based Software-defined Networking Framework
a2e6d15
%{?python_provide:%python_provide python2-%{pypi_name}}
eb0a7af
080c98a
Requires:  python2-eventlet
080c98a
Requires:  python2-debtcollector
080c98a
Requires:  python2-lxml
080c98a
Requires:  python2-msgpack
080c98a
Requires:  python2-netaddr
080c98a
Requires:  python2-openvswitch
080c98a
Requires:  python2-oslo-config
080c98a
Requires:  python2-paramiko
080c98a
Requires:  python2-routes
080c98a
Requires:  python2-six
080c98a
Requires:  python2-tinyrpc
080c98a
Requires:  python2-webob
fb7a04e
Requires:  python-%{pypi_name}-common = %{version}-%{release}
eb0a7af
eb0a7af
BuildRequires:  python2-devel
080c98a
BuildRequires:  python2-debtcollector
080c98a
BuildRequires:  python2-eventlet
080c98a
BuildRequires:  python2-greenlet
080c98a
BuildRequires:  python2-lxml
080c98a
BuildRequires:  python2-msgpack
080c98a
BuildRequires:  python2-openvswitch
080c98a
BuildRequires:  python2-oslo-config
080c98a
BuildRequires:  python2-paramiko
080c98a
BuildRequires:  python2-repoze-lru
080c98a
BuildRequires:  python2-routes
080c98a
BuildRequires:  python2-sphinx
080c98a
BuildRequires:  python2-tinyrpc
080c98a
BuildRequires:  python2-setuptools
080c98a
BuildRequires:  python2-webob
eb0a7af
Arie 15ebddf
%if 0%{?with_check}
Arie 15ebddf
BuildRequires:  pylint
080c98a
BuildRequires:  python2-coverage
080c98a
BuildRequires:  python2-formencode
080c98a
BuildRequires:  python2-nose
080c98a
BuildRequires:  python2-mock
080c98a
BuildRequires:  python2-pep8
080c98a
BuildRequires:  python2-tinyrpc
Arie 15ebddf
%endif
Arie 15ebddf
eb0a7af
%description -n python2-%{pypi_name}
eb0a7af
Ryu provides software components with well defined API that make it easy for developers to create new
eb0a7af
network management and control applications.
eb0a7af
eb0a7af
%if 0%{?with_python3}
eb0a7af
%package -n     python3-%{pypi_name}
eb0a7af
Summary:        Component-based Software-defined Networking Framework
eb0a7af
%{?python_provide:%python_provide python3-%{pypi_name}}
eb0a7af
eb0a7af
Requires:  python3-eventlet
fb7a04e
Requires:  python3-debtcollector
eb0a7af
Requires:  python3-lxml
eb0a7af
Requires:  python3-msgpack
eb0a7af
Requires:  python3-netaddr
3ca20c7
Requires:  python3-openvswitch
eb0a7af
Requires:  python3-oslo-config
eb0a7af
Requires:  python3-paramiko
eb0a7af
Requires:  python3-routes
eb0a7af
Requires:  python3-six
Alan Pevec c2d691f
Requires:  python3-tinyrpc
eb0a7af
Requires:  python3-webob
fb7a04e
Requires:  python-%{pypi_name}-common = %{version}-%{release}
eb0a7af
eb0a7af
BuildRequires:  python3-devel
fb7a04e
BuildRequires:  python3-debtcollector
eb0a7af
BuildRequires:  python3-eventlet
eb0a7af
BuildRequires:  python3-greenlet
eb0a7af
BuildRequires:  python3-lxml
eb0a7af
BuildRequires:  python3-msgpack
3ca20c7
BuildRequires:  python3-openvswitch
eb0a7af
BuildRequires:  python3-oslo-config
eb0a7af
BuildRequires:  python3-paramiko
eb0a7af
BuildRequires:  python3-repoze-lru
eb0a7af
BuildRequires:  python3-routes
eb0a7af
BuildRequires:  python3-sphinx
eb0a7af
BuildRequires:  python3-setuptools
Alan Pevec c2d691f
BuildRequires:  python3-tinyrpc
eb0a7af
BuildRequires:  python3-webob
eb0a7af
Arie 15ebddf
%if 0%{?with_check}
Arie 15ebddf
BuildRequires:  python3-coverage
Arie 15ebddf
BuildRequires:  python3-formencode
Arie 15ebddf
BuildRequires:  python3-mock
Arie 15ebddf
BuildRequires:  python3-nose
Arie 15ebddf
BuildRequires:  python3-pep8
Arie 15ebddf
%endif
Arie 15ebddf
eb0a7af
%description -n python3-%{pypi_name}
eb0a7af
Ryu provides software components with well defined API that make it easy for developers to create new
eb0a7af
network management and control applications.
eb0a7af
eb0a7af
This is the Python 3 version.
eb0a7af
%endif
eb0a7af
fb7a04e
%package -n python-%{pypi_name}-common
fb7a04e
Summary:        Component-based Software-defined Networking Framework
fb7a04e
fb7a04e
%description -n python-%{pypi_name}-common
fb7a04e
Ryu provides software components with well defined API that make it easy for developers to create new
fb7a04e
network management and control applications.
fb7a04e
fb7a04e
This package contains common data between python 2 and 3 versions
fb7a04e
eb0a7af
%prep
eb0a7af
%setup -q -n %{pypi_name}-%{version}
eb0a7af
rm -rf %{pypi_name}.egg-info
Alan Pevec c2d691f
# drop deps in egginfo, let rpm handle them
Alan Pevec c2d691f
rm tools/*-requires
3ca20c7
rm tools/install_venv.py
3ca20c7
# Remove non-working tests (internet connection needed)
3ca20c7
rm -vf %{pypi_name}/tests/unit/test_requirements.py
3ca20c7
# Remove pip usage (used only in test_requirements.py)
3ca20c7
sed -i '/^from pip/d' ryu/utils.py
eb0a7af
eb0a7af
%build
eb0a7af
%py2_build
eb0a7af
%if 0%{?with_python3}
eb0a7af
%py3_build
eb0a7af
%endif
eb0a7af
eb0a7af
cd doc && make man
eb0a7af
eb0a7af
%install
eb0a7af
%if 0%{?with_python3}
eb0a7af
%py3_install
fb7a04e
for bin in %{pypi_name}{,-manager}; do
fb7a04e
    mv %{buildroot}%{_bindir}/$bin  %{buildroot}%{_bindir}/$bin-%{python3_version}
fb7a04e
    ln -s ./$bin-%{python3_version} %{buildroot}%{_bindir}/$bin-3
fb7a04e
done;
eb0a7af
%endif
fb7a04e
eb0a7af
%py2_install
fb7a04e
for bin in %{pypi_name}{,-manager}; do
fb7a04e
    mv %{buildroot}%{_bindir}/$bin  %{buildroot}%{_bindir}/$bin-%{python2_version}
fb7a04e
    ln -s ./$bin-%{python2_version} %{buildroot}%{_bindir}/$bin-2
fb7a04e
    ln -s ./$bin-%{python2_version} %{buildroot}%{_bindir}/$bin
fb7a04e
done;
eb0a7af
eb0a7af
install -d -m 755 %{buildroot}%{_sysconfdir}/%{pypi_name}
eb0a7af
mv %{buildroot}%{_prefix}%{_sysconfdir}/%{pypi_name}/%{pypi_name}.conf %{buildroot}%{_sysconfdir}/%{pypi_name}/%{pypi_name}.conf
eb0a7af
Arie 15ebddf
%if 0%{?with_check}
eb0a7af
%check
Arie 15ebddf
%if 0%{?with_python3}
3ca20c7
# Tests without virtualenv (N) and without PEP8 tests (P)
3ca20c7
PYTHON=%{__python3} ./run_tests.sh -N -P
Arie 15ebddf
%endif
3ca20c7
PYTHON=%{__python2} ./run_tests.sh -N -P
Arie 15ebddf
%endif
eb0a7af
fb7a04e
%files -n     python2-%{pypi_name}
eb0a7af
%{python2_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
eb0a7af
%{python2_sitelib}/%{pypi_name}
eb0a7af
%{_bindir}/%{pypi_name}
fb7a04e
%{_bindir}/%{pypi_name}-2
fb7a04e
%{_bindir}/%{pypi_name}-%{python2_version}
eb0a7af
%{_bindir}/%{pypi_name}-manager
fb7a04e
%{_bindir}/%{pypi_name}-manager-2
fb7a04e
%{_bindir}/%{pypi_name}-manager-%{python2_version}
fb7a04e
fb7a04e
eb0a7af
%if 0%{?with_python3}
fb7a04e
%files -n     python3-%{pypi_name}
eb0a7af
%{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
eb0a7af
%{python3_sitelib}/%{pypi_name}
fb7a04e
%{_bindir}/%{pypi_name}
fb7a04e
%{_bindir}/%{pypi_name}-3
fb7a04e
%{_bindir}/%{pypi_name}-%{python3_version}
fb7a04e
%{_bindir}/%{pypi_name}-manager
fb7a04e
%{_bindir}/%{pypi_name}-manager-3
fb7a04e
%{_bindir}/%{pypi_name}-manager-%{python3_version}
eb0a7af
%endif
eb0a7af
fb7a04e
%files -n     python-%{pypi_name}-common
fb7a04e
%doc AUTHORS ChangeLog README.rst
fb7a04e
%license LICENSE
fb7a04e
%{_sysconfdir}/%{pypi_name}/%{pypi_name}.conf
fb7a04e
fb7a04e
fb7a04e
eb0a7af
%changelog
2ff8fc1
* Thu Aug 16 2018 Slawek Kaplonski <skaplons@redhat.com> 4.26-2
2ff8fc1
- Stop removing integration tests code before build, it requires docker to
2ff8fc1
  run properly but it shouldn't be run if docker is not available on build
2ff8fc1
  machine
2ff8fc1
a7cfc3b
* Wed Aug 08 2018 Slawek Kaplonski <skaplons@redhat.com> 4.26-1
a7cfc3b
- Update to 4.26
a7cfc3b
Alan Pevec ba09b67
* Tue Jul 03 2018 Alan Pevec <alan.pevec@redhat.com> 4.25-1
Alan Pevec ba09b67
- Update to 4.25
Alan Pevec ba09b67
70bc5b1
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 4.15-4
70bc5b1
- Rebuilt for Python 3.7
70bc5b1
080c98a
* Mon Mar 26 2018 Iryna Shcherbina <ishcherb@redhat.com> - 4.15-3
080c98a
- Update Python 2 dependency declarations to new packaging standards
080c98a
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
080c98a
54833ca
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 4.15-2
54833ca
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
54833ca
Alan Pevec 8926e1b
* Thu Jul 27 2017 Alan Pevec <alan.pevec@redhat.com> 4.15-1
Alan Pevec 8926e1b
- Update to 4.15
Alan Pevec 8926e1b
b68df7a
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 4.13-3
b68df7a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
b68df7a
3ca20c7
* Mon May 29 2017 Lumír Balhar <lbalhar@redhat.com> - 4.13-2
3ca20c7
- Tests enabled
3ca20c7
Alan Pevec c2d691f
* Mon May 29 2017 Alan Pevec <alan.pevec@redhat.com> 4.13-1
Alan Pevec c2d691f
- Update to 4.13
Alan Pevec c2d691f
- Add missing dependencies
Alan Pevec c2d691f
ebe29c6
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 4.3-6
ebe29c6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
ebe29c6
8ae0ff1
* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 4.3-5
8ae0ff1
- Rebuild for Python 3.6
8ae0ff1
Arie 15ebddf
* Wed Sep 07 2016 Arie Bregman <abregman@redhat.com> - 4.3-4
Arie 15ebddf
- Moved tests related lines to depend on with_check
Arie 15ebddf
bb55840
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.3-3
bb55840
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
bb55840
a2e6d15
* Fri Jul 01 2016 Matthias Runge <mrunge@redhat.com> - 4.3-2
a2e6d15
- add python_provides for python2 package
a2e6d15
fb7a04e
* Thu Jun 23 2016 Haïkel Guémar <hguemar@fedoraproject.org> - 4.3-1
fb7a04e
- Upstream 4.3
fb7a04e
- Enable python3 subpackage
fb7a04e
ecdac37
* Thu Apr  7 2016 Haïkel Guémar <hguemar@fedoraproject.org> - 3.30-1
ecdac37
- Upstream 3.30
ecdac37
ef31b51
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 3.26-2
ef31b51
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
ef31b51
eb0a7af
* Sun Nov 22 2015 Arie Bregman <abregman@redhat.com> - 3.26-1
eb0a7af
- Initial package.