]> git.pld-linux.org Git - SPECS.git/blob - python-jsonfield.spec
SPECS updated Wed 28 Jul 14:48:01 CEST 2021
[SPECS.git] / python-jsonfield.spec
1 #
2 # Conditional build:
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
7
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}
13 Version:        1.0.3
14 Release:        1
15 License:        MIT
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
22 %if %{with python2}
23 BuildRequires:  python-devel
24 BuildRequires:  python-setuptools
25 %endif
26 %if %{with python3}
27 BuildRequires:  python3-devel
28 BuildRequires:  python3-setuptools
29 %endif
30 BuildArch:      noarch
31 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32
33 %description
34 django-jsonfield is a reusable Django field that allows you to store
35 validated JSON in your model.
36
37 It silently takes care of serialization. To use, simply add the field
38 to one of your models.
39
40 %package -n python3-%{pypi_name}
41 Summary:        A reusable JSONField model for Django to store ad-hoc data
42 Group:          Libraries/Python
43
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.
47
48 It silently takes care of serialization. To use, simply add the field
49 to one of your models.
50
51 %prep
52 %setup -q -n %{pypi_name}-%{version}
53
54 %build
55 %if %{with python2}
56 %py_build %{?with_tests:test}
57 %endif
58
59 %if %{with python3}
60 %py3_build %{?with_tests:test}
61 %endif
62
63 %install
64 rm -rf $RPM_BUILD_ROOT
65 %if %{with python2}
66 %py_install
67 %py_postclean
68 %endif
69
70 %if %{with python3}
71 %py3_install
72 %endif
73
74 %clean
75 rm -rf $RPM_BUILD_ROOT
76
77
78 %if %{with python2}
79 %files
80 %defattr(644,root,root,755)
81 %doc README.rst
82 %{py_sitescriptdir}/%{module}
83 %{py_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
84 %endif
85
86 %if %{with python3}
87 %files -n python3-%{pypi_name}
88 %defattr(644,root,root,755)
89 %doc README.rst
90 %{py3_sitescriptdir}/%{module}
91 %{py3_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
92 %endif
This page took 0.187837 seconds and 3 git commands to generate.