3 %bcond_without doc # don't build doc
4 %bcond_without tests # do not perform "make test"
5 %bcond_without python2 # CPython 2.x module
6 %bcond_without python3 # CPython 3.x module
8 %define module jsonfield
9 %define egg_name jsonfield
10 %define pypi_name jsonfield
11 Summary: A reusable JSONField model for Django to store ad-hoc data
12 Name: python-%{pypi_name}
16 Group: Libraries/Python
17 Source0: https://files.pythonhosted.org/packages/source/j/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
18 # Source0-md5: a7c7df31627069a97c9ba91b599c0845
19 URL: https://github.com/bradjasper/django-jsonfield/
20 BuildRequires: rpm-pythonprov
21 BuildRequires: rpmbuild(macros) >= 1.714
23 BuildRequires: python-devel
24 BuildRequires: python-setuptools
27 BuildRequires: python3-devel
28 BuildRequires: python3-setuptools
31 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34 django-jsonfield is a reusable Django field that allows you to store
35 validated JSON in your model.
37 It silently takes care of serialization. To use, simply add the field
38 to one of your models.
40 %package -n python3-%{pypi_name}
41 Summary: A reusable JSONField model for Django to store ad-hoc data
42 Group: Libraries/Python
44 %description -n python3-%{pypi_name}
45 django-jsonfield is a reusable Django field that allows you to store
46 validated JSON in your model.
48 It silently takes care of serialization. To use, simply add the field
49 to one of your models.
52 %setup -q -n %{pypi_name}-%{version}
56 %py_build %{?with_tests:test}
60 %py3_build %{?with_tests:test}
64 rm -rf $RPM_BUILD_ROOT
75 rm -rf $RPM_BUILD_ROOT
80 %defattr(644,root,root,755)
82 %{py_sitescriptdir}/%{module}
83 %{py_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
87 %files -n python3-%{pypi_name}
88 %defattr(644,root,root,755)
90 %{py3_sitescriptdir}/%{module}
91 %{py3_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info