1 |
%define module django-guardian |
2 |
|
3 |
Name: python-%{module} |
4 |
Version: 1.2.4 |
5 |
Release: %mkrel 2 |
6 |
Summary: Implementation of per object permissions for Django |
7 |
License: BSD |
8 |
Group: Development/Python |
9 |
URL: https://github.com/lukaszb/django-guardian/ |
10 |
Source0: https://pypi.python.org/packages/source/d/%{module}/%{module}-%{version}.tar.gz |
11 |
BuildArch: noarch |
12 |
BuildRequires: python-setuptools |
13 |
BuildRequires: python-pyflakes |
14 |
|
15 |
%description |
16 |
django-guardian is implementation of per object permissions as |
17 |
authorization backend which is supported since Django 1.2. It won't |
18 |
work with older Django releases. |
19 |
|
20 |
#--------------------------------------------------------------------------- |
21 |
|
22 |
%package -n python3-%{module} |
23 |
Summary: Implementation of per object permissions for Django |
24 |
Group: Development/Python |
25 |
BuildArch: noarch |
26 |
BuildRequires: python3-setuptools |
27 |
BuildRequires: python3-pyflakes |
28 |
|
29 |
%description -n python3-%{module} |
30 |
django-guardian is implementation of per object permissions as |
31 |
authorization backend which is supported since Django 1.2. It won't |
32 |
work with older Django releases. |
33 |
This is the Python 3 build of %{module}. |
34 |
|
35 |
#--------------------------------------------------------------------------- |
36 |
|
37 |
%prep |
38 |
%setup -q -n %{module}-%{version} |
39 |
cp -a . %{py3dir} |
40 |
|
41 |
%build |
42 |
%{__python} setup.py build |
43 |
|
44 |
pushd %{py3dir} |
45 |
%{__python3} setup.py build |
46 |
popd |
47 |
|
48 |
%install |
49 |
%{__python} setup.py install --root=%{buildroot} --skip-build |
50 |
|
51 |
pushd %{py3dir} |
52 |
%{__python3} setup.py install --root=%{buildroot} --skip-build |
53 |
popd |
54 |
|
55 |
%files |
56 |
%doc CHANGES README.rst |
57 |
# list some files explicitly to avoid listing locale files twice |
58 |
%{python_sitelib}/guardian/*.py* |
59 |
%{python_sitelib}/guardian/conf/ |
60 |
%{python_sitelib}/guardian/management/ |
61 |
%{python_sitelib}/guardian/migrations/ |
62 |
%{python_sitelib}/guardian/templates/ |
63 |
%{python_sitelib}/guardian/templatetags/ |
64 |
%{python_sitelib}/guardian/testapp/ |
65 |
%{python_sitelib}/guardian/.ropeproject/ |
66 |
%{python_sitelib}/django_guardian-%{version}-py%{pyver}.egg-info |
67 |
# locale files |
68 |
%lang(es) %{python_sitelib}/guardian/locale/es/LC_MESSAGES/django.?o |
69 |
%lang(pl) %{python_sitelib}/guardian/locale/pl/LC_MESSAGES/django.?o |
70 |
%lang(pt_BR) %{python_sitelib}/guardian/locale/pt_BR/LC_MESSAGES/django.?o |
71 |
|
72 |
%files -n python3-%{module} |
73 |
%doc CHANGES README.rst |
74 |
# list some files explicitly to avoid listing locale files twice |
75 |
%{python3_sitelib}/guardian/*py* |
76 |
%{python3_sitelib}/guardian/conf/ |
77 |
%{python3_sitelib}/guardian/management/ |
78 |
%{python3_sitelib}/guardian/migrations/ |
79 |
%{python3_sitelib}/guardian/templates/ |
80 |
%{python3_sitelib}/guardian/templatetags/ |
81 |
%{python3_sitelib}/guardian/testapp/ |
82 |
%{python3_sitelib}/guardian/.ropeproject/ |
83 |
%{python3_sitelib}/django_guardian-%{version}-py%{py3ver}.egg-info |
84 |
# locale files |
85 |
%lang(es) %{python3_sitelib}/guardian/locale/es/LC_MESSAGES/django.?o |
86 |
%lang(pl) %{python3_sitelib}/guardian/locale/pl/LC_MESSAGES/django.?o |
87 |
%lang(pt_BR) %{python3_sitelib}/guardian/locale/pt_BR/LC_MESSAGES/django.?o |