Blob Blame History Raw
# Created by pyp2rpm-1.0.1
%global sname pycadf

%{!?upstream_version: %global upstream_version %{version}%{?milestone}}

%if 0%{?fedora}
%global with_python3 1
%endif

Name:           python-%{sname}
Version:        2.4.0
Release:        3%{?dist}
Summary:        DMTF Cloud Audit (CADF) data model

License:        ASL 2.0
URL:            https://launchpad.net/pycadf
Source0:        https://pypi.io/packages/source/p/%{sname}/%{sname}-%{version}.tar.gz
BuildArch:      noarch


%description
DMTF Cloud Audit (CADF) data model


%package -n python2-%{sname}
Summary:        DMTF Cloud Audit (CADF) data model

BuildRequires:  python2-devel
BuildRequires:  python-setuptools
BuildRequires:  python-pbr

Requires:       python-babel
Requires:       python-debtcollector >= 1.2.0
Requires:       python-iso8601
Requires:       python-netaddr
Requires:       python-oslo-config >= 1:3.7.0
Requires:       python-oslo-messaging
Requires:       python-oslo-serialization >= 1.10.0
Requires:       pytz
Requires:       python-six >= 1.9.0
Requires:       python-webob >= 1.2.3
Requires:       python-%{sname}-common = %{version}-%{release}

%{?python_provide:%python_provide python2-%{sname}}

%description -n python2-%{sname}
DMTF Cloud Audit (CADF) data model

%if 0%{?with_python3}
%package -n python3-%{sname}
Summary:        DMTF Cloud Audit (CADF) data model

BuildRequires:  python3-devel
BuildRequires:  python3-setuptools
BuildRequires:  python3-pbr

Requires:       python3-babel
Requires:       python3-debtcollector >= 1.2.0
Requires:       python3-iso8601
Requires:       python3-netaddr
Requires:       python3-oslo-config >= 1:3.7.0
Requires:       python3-oslo-messaging
Requires:       python3-oslo-serialization >= 1.10.0
Requires:       python3-pytz
Requires:       python3-six >= 1.9.0
Requires:       python3-webob >= 1.2.3
Requires:       python-%{sname}-common = %{version}-%{release}

%{?python_provide:%python_provide python3-%{sname}}

%description -n python3-%{sname}
DMTF Cloud Audit (CADF) data model
%endif

%package -n python-%{sname}-common
Summary:        DMTF Cloud Audit (CADF) data model

%description -n python-%{sname}-common
DMTF Cloud Audit (CADF) data model (common data file)


%prep
%setup -q -n %{sname}-%{upstream_version}
# Remove bundled egg-info
rm -rf %{sname}.egg-info


%build
%py2_build
%if 0%{?with_python3}
%py3_build
%endif


%install
%py2_install
%if 0%{?with_python3}
%py3_install
%endif

mkdir -p %{buildroot}/%{_sysconfdir}
mv %{buildroot}/usr/etc/%{sname} %{buildroot}/%{_sysconfdir}/


%files -n python2-%{sname}
%{python2_sitelib}/%{sname}
%{python2_sitelib}/%{sname}-%{upstream_version}-py?.?.egg-info

%if 0%{?with_python3}
%files -n python3-%{sname}
%{python3_sitelib}/%{sname}
%{python3_sitelib}/%{sname}-%{upstream_version}-py?.?.egg-info
%endif

%files -n python-%{sname}-common
%doc README.rst
%license LICENSE
%dir %{_sysconfdir}/%{sname}
%config(noreplace) %{_sysconfdir}/%{sname}/*.conf


%changelog
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild

* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 2.4.0-2
- Rebuild for Python 3.6

* Tue Sep 06 2016 Haikel Guemar <hguemar@fedoraproject.org> 2.4.0-1
- Update to 2.4.0

* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2.0-2
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages

* Sun Jun 26 2016 Haikel Guemar <hguemar@fedoraproject.org> 2.2.0-1
- Update to 2.2.0

* Wed Mar 23 2016 Haikel Guemar <hguemar@fedoraproject.org> 2.1.0-1
- Update to 2.1.0

* Fri Jun 13 2014 Pádraig Brady <pbrady@redhat.com> - 0.5.1-1
- Latest upstream

* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Mon Apr 07 2014 Lon Hohberger <lhh@redhat.com> - 0.4.1-3
- Add python-setuptools build requirement

* Fri Mar 07 2014 Padraig Brady <P@draigBrady.com> - 0.4.1-2
- Initial package.