From 74834a0447d63f5d8d1eceae2afa399e31f80393 Mon Sep 17 00:00:00 2001 From: Germano Massullo Date: Aug 22 2016 14:56:29 +0000 Subject: first commit --- diff --git a/.gitignore b/.gitignore index e69de29..7cab652 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/django-model-utils-2.5.2.tar.gz diff --git a/python-django-model-utils.spec b/python-django-model-utils.spec new file mode 100644 index 0000000..8de1d6e --- /dev/null +++ b/python-django-model-utils.spec @@ -0,0 +1,83 @@ +%global pypi_name django-model-utils +# Python 3 only for Fedora for now. +%if 0%{?rhel} && 0%{?rhel} <= 7 +%bcond_with python3 +%else +%bcond_without python3 +%endif + +Name: python-%{pypi_name} +Version: 2.5.2 +Release: 1%{?dist} +Summary: Django model mixins and utilities + +License: BSD +URL: https://github.com/carljm/django-model-utils +Source0: https://files.pythonhosted.org/packages/source/%(n=%{pypi_name}; echo ${n:0:1})/%{pypi_name}/%{pypi_name}-%{version}.tar.gz + +BuildArch: noarch + +BuildRequires: python2-devel +BuildRequires: python2-django +BuildRequires: python2-setuptools +%if %{with python3} +BuildRequires: python3-django +BuildRequires: python3-devel +BuildRequires: python3-setuptools +%endif # if with_python3 + +%description +%{summary}. + +%package -n python2-%{pypi_name} +Summary: %{summary} +%{?python_provide:%python_provide python2-%{pypi_name}} +Requires: python2-django +%description -n python2-%{pypi_name} +%{summary}. + +%if %{with python3} +%package -n python3-%{pypi_name} +Summary: %{summary} +%{?python_provide:%python_provide python3-%{pypi_name}} +Requires: python3-django +%description -n python3-%{pypi_name} +%{summary}. +%endif # if with_python3 + +%prep +%setup -q -n %{pypi_name}-%{version} + +%build +%py2_build +%if %{with python3} +%py3_build +%endif # if with_python3 + +%install +%py2_install +%if %{with python3} +%py3_install +%endif # if with_python3 + +%check +%{__python2} setup.py test +%if %{with python3} +%{__python3} setup.py test +%endif # if with_python3 + +%files -n python2-%{pypi_name} +%license LICENSE.txt +%doc README.rst +%{python2_sitelib}/* + +%if %{with python3} +%files -n python3-%{pypi_name} +%license LICENSE.txt +%doc README.rst +%{python3_sitelib}/* +%endif # if with_python3 + +%changelog +* Wed Aug 10 2016 Germano Massullo - 2.5.2-1 +- First commit on Fedora's Git diff --git a/sources b/sources index e69de29..d828ae4 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +fadced37f6d46d88f41f3a90684bc37d django-model-utils-2.5.2.tar.gz