Blame python-neomodel.spec

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