-
Notifications
You must be signed in to change notification settings - Fork 2
/
python-django-sortedm2m.spec
77 lines (58 loc) · 2.32 KB
/
python-django-sortedm2m.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# Created by pyp2rpm-3.2.1
# Missing test requires, python3 version macro
%global pypi_name django-sortedm2m
Name: python-%{pypi_name}
Version: 1.3.3
Release: 1%{?dist}
Summary: Drop-in replacement for django's many to many field with sorted relations
License: BSD
URL: http://github.com/gregmuellegger/django-sortedm2m
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: python-setuptools
BuildRequires: python3-devel
BuildRequires: python3-setuptools
%description
sortedm2m is a drop-in replacement for django's own ManyToManyField. The
provided SortedManyToManyField behaves like the original one but remembers
the order of added relations.
%package -n python2-%{pypi_name}
Summary: Drop-in replacement for django's many to many field with sorted relations
%{?python_provide:%python_provide python2-%{pypi_name}}
%description -n python2-%{pypi_name}
sortedm2m is a drop-in replacement for django's own ManyToManyField. The
provided SortedManyToManyField behaves like the original one but remembers
the order of added relations.
%package -n python3-%{pypi_name}
Summary: Drop-in replacement for django's many to many field with sorted relations
%{?python_provide:%python_provide python3-%{pypi_name}}
%description -n python3-%{pypi_name}
sortedm2m is a drop-in replacement for django's own ManyToManyField. The
provided SortedManyToManyField behaves like the original one but remembers
the order of added relations.
%prep
%autosetup -n %{pypi_name}-%{version}
# Remove bundled egg-info
rm -rf %{pypi_name}.egg-info
%build
%py2_build
%py3_build
%install
# Must do the subpackages' install first because the scripts in /usr/bin are
# overwritten with every setup.py install.
%py3_install
%py2_install
%files -n python2-%{pypi_name}
%license LICENSE.txt
%doc README.rst
%{python2_sitelib}/sortedm2m
%{python2_sitelib}/django_sortedm2m-%{version}-py?.?.egg-info
%files -n python3-%{pypi_name}
%license LICENSE.txt
%doc README.rst
%{python3_sitelib}/sortedm2m
%{python3_sitelib}/django_sortedm2m-%{version}-py?.?.egg-info
%changelog
* Sat Jan 14 2017 Germano Massullo <[email protected]> - 1.3.3-1
- Initial package.