Blob Blame Raw
%global srcname neomodel
%global sum A Python OGM for Neo4j
%global desc A Python Object Graph Mapper (OGM) for the Neo4j graph database

Name:           python-%{srcname}
Version:        3.3.1
Release:        1%{?dist}
Summary:        %{sum}

License:        MIT
URL:            https://pypi.python.org/pypi/%{srcname}
Source0:        https://files.pythonhosted.org/packages/source/n/%{srcname}/%{srcname}-%{version}.tar.gz

BuildArch:      noarch
BuildRequires:  python2-devel
BuildRequires:  python2-setuptools
%if 0%{?fedora} || 0%{?rhel} > 7
BuildRequires:  python%{python3_pkgversion}-devel
BuildRequires:  python%{python3_pkgversion}-setuptools
%endif


%description
%{desc}

%if 0%{?fedora} || 0%{?rhel} > 7
%package -n python%{python3_pkgversion}-%{srcname}
Summary:        %{sum}
%{?python_provide:%python_provide python%{python3_pkgversion}-%{srcname}}
Requires:       python3-neo4j-driver
Requires:       python3-pytz

%description -n python%{python3_pkgversion}-%{srcname}
%{desc}
%endif


%package -n python2-%{srcname}
Summary:        %{sum}
%{?python_provide:%python_provide python2-%{srcname}}
Requires:       python2-neo4j-driver
%if 0%{?fedora} || 0%{?rhel} > 7
Requires:       python2-pytz
%else
Requires:       pytz
%endif

%description -n python2-%{srcname}
%{desc}


%prep
%autosetup -n %{srcname}-%{version}


%build
%if 0%{?fedora} || 0%{?rhel} > 7
%py3_build
%endif

%py2_build

%install
%if 0%{?fedora} || 0%{?rhel} > 7
%py3_install
mv %{buildroot}/%{_bindir}/neomodel_install_labels %{buildroot}/%{_bindir}/neomodel_install_labels-3
ln -s %{_bindir}/neomodel_install_labels-3 %{buildroot}/%{_bindir}/neomodel_install_labels-%{python3_version}
mv %{buildroot}/%{_bindir}/neomodel_remove_labels %{buildroot}/%{_bindir}/neomodel_remove_labels-3
ln -s %{_bindir}/neomodel_remove_labels-3 %{buildroot}/%{_bindir}/neomodel_remove_labels-%{python3_version}
%endif

%py2_install
ln -s %{_bindir}/neomodel_install_labels %{buildroot}/%{_bindir}/neomodel_install_labels-2
ln -s %{_bindir}/neomodel_install_labels %{buildroot}/%{_bindir}/neomodel_install_labels-%{python2_version}
ln -s %{_bindir}/neomodel_remove_labels %{buildroot}/%{_bindir}/neomodel_remove_labels-2
ln -s %{_bindir}/neomodel_remove_labels %{buildroot}/%{_bindir}/neomodel_remove_labels-%{python2_version}


%if 0%{?fedora} || 0%{?rhel} > 7
%files -n python%{python3_pkgversion}-%{srcname}
%license LICENSE
%doc README.rst
%{python3_sitelib}/*
%{_bindir}/neomodel_install_labels-3
%{_bindir}/neomodel_install_labels-%{python3_version}
%{_bindir}/neomodel_remove_labels-3
%{_bindir}/neomodel_remove_labels-%{python3_version}
%endif

%files -n python2-%{srcname}
%license LICENSE
%doc README.rst
%{python2_sitelib}/*
%{_bindir}/neomodel_install_labels
%{_bindir}/neomodel_install_labels-2
%{_bindir}/neomodel_install_labels-%{python2_version}
%{_bindir}/neomodel_remove_labels
%{_bindir}/neomodel_remove_labels-2
%{_bindir}/neomodel_remove_labels-%{python2_version}


%changelog
* Tue Apr 09 2019 mprahl <mprahl@redhat.com> - 3.3.1-1
- new version

* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.3.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild

* Fri Nov 16 2018 mprahl <mprahl@redhat.com> - 3.3.0-1
- new version

* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.2.8-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild

* Mon Jul 02 2018 Miro Hrončok <mhroncok@redhat.com> - 3.2.8-6
- Rebuilt for Python 3.7

* Tue Jun 19 2018 mprahl <mprahl@redhat.com> - 3.2.8-5
- unpin the python-neo4j-driver version

* Tue Jun 19 2018 mprahl <mprahl@redhat.com> - 3.2.8-4
- add upstream patch to support python neo4j-driver 1.6.x

* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 3.2.8-3
- Rebuilt for Python 3.7

* Thu Jun 14 2018 mprahl <mprahl@redhat.com> - 3.2.8-2
- pin the python-neo4j-driver version

* Tue May 01 2018 mprahl <mprahl@redhat.com> - 3.2.8-1
- new version

* Thu Apr 26 2018 mprahl <mprahl@redhat.com> - 3.2.7-1
- new version

* Mon Apr 02 2018 mprahl <mprahl@redhat.com> - 3.2.5.1
- Initial release