Blame python-neomodel.spec

b0461e8
%global srcname neomodel
b0461e8
%global sum A Python OGM for Neo4j
b0461e8
%global desc A Python Object Graph Mapper (OGM) for the Neo4j graph database
b0461e8
b0461e8
Name:           python-%{srcname}
b0461e8
Version:        3.2.5
b0461e8
Release:        1%{?dist}
b0461e8
Summary:        %{sum}
b0461e8
b0461e8
License:        MIT
b0461e8
URL:            https://pypi.python.org/pypi/%{srcname}
b0461e8
Source0:        https://files.pythonhosted.org/packages/source/n/%{srcname}/%{srcname}-%{version}.tar.gz
b0461e8
Patch0:         db_property-install-labels.patch
b0461e8
Patch1:         db_property-get_or_create.patch
b0461e8
b0461e8
BuildArch:      noarch
b0461e8
BuildRequires:  python2-devel
b0461e8
BuildRequires:  python2-setuptools
b0461e8
%if 0%{?fedora} || 0%{?rhel} > 7
b0461e8
BuildRequires:  python%{python3_pkgversion}-devel
b0461e8
BuildRequires:  python%{python3_pkgversion}-setuptools
b0461e8
%endif
b0461e8
b0461e8
b0461e8
%description
b0461e8
%{desc}
b0461e8
b0461e8
%if 0%{?fedora} || 0%{?rhel} > 7
b0461e8
%package -n python%{python3_pkgversion}-%{srcname}
b0461e8
Summary:        %{sum}
b0461e8
%{?python_provide:%python_provide python%{python3_pkgversion}-%{srcname}}
b0461e8
Requires:       python3-neo4j-driver
b0461e8
Requires:       python3-pytz
b0461e8
b0461e8
%description -n python%{python3_pkgversion}-%{srcname}
b0461e8
%{desc}
b0461e8
%endif
b0461e8
b0461e8
b0461e8
%package -n python2-%{srcname}
b0461e8
Summary:        %{sum}
b0461e8
%{?python_provide:%python_provide python2-%{srcname}}
b0461e8
Requires:       python2-neo4j-driver
b0461e8
%if 0%{?fedora} || 0%{?rhel} > 7
b0461e8
Requires:       python2-pytz
b0461e8
%else
b0461e8
Requires:       pytz
b0461e8
%endif
b0461e8
b0461e8
%description -n python2-%{srcname}
b0461e8
%{desc}
b0461e8
b0461e8
b0461e8
%prep
b0461e8
%autosetup -p1 -n %{srcname}-%{version}
b0461e8
b0461e8
b0461e8
%build
b0461e8
%if 0%{?fedora} || 0%{?rhel} > 7
b0461e8
%py3_build
b0461e8
%endif
b0461e8
b0461e8
%py2_build
b0461e8
b0461e8
%install
b0461e8
%if 0%{?fedora} || 0%{?rhel} > 7
b0461e8
%py3_install
b0461e8
mv %{buildroot}/%{_bindir}/neomodel_install_labels %{buildroot}/%{_bindir}/neomodel_install_labels-3
b0461e8
ln -s %{_bindir}/neomodel_install_labels-3 %{buildroot}/%{_bindir}/neomodel_install_labels-%{python3_version}
b0461e8
%endif
b0461e8
b0461e8
%py2_install
b0461e8
ln -s %{_bindir}/neomodel_install_labels %{buildroot}/%{_bindir}/neomodel_install_labels-2
b0461e8
ln -s %{_bindir}/neomodel_install_labels %{buildroot}/%{_bindir}/neomodel_install_labels-%{python2_version}
b0461e8
b0461e8
b0461e8
%if 0%{?fedora} || 0%{?rhel} > 7
b0461e8
%files -n python%{python3_pkgversion}-%{srcname}
b0461e8
%license LICENSE
b0461e8
%doc README.rst
b0461e8
%{python3_sitelib}/*
b0461e8
%{_bindir}/neomodel_install_labels-3
b0461e8
%{_bindir}/neomodel_install_labels-%{python3_version}
b0461e8
%endif
b0461e8
b0461e8
%files -n python2-%{srcname}
b0461e8
%license LICENSE
b0461e8
%doc README.rst
b0461e8
%{python2_sitelib}/*
b0461e8
%{_bindir}/neomodel_install_labels
b0461e8
%{_bindir}/neomodel_install_labels-2
b0461e8
%{_bindir}/neomodel_install_labels-%{python2_version}
b0461e8
b0461e8
b0461e8
%changelog
b0461e8
* Mon Apr 02 2018 mprahl <mprahl@redhat.com> - 3.2.5.1
b0461e8
- Initial release