]> git.pld-linux.org Git - packages/python-flask-openid.git/blob - python-flask-openid.spec
f6d7f37489effcb451f332541224b656f4e30d89
[packages/python-flask-openid.git] / python-flask-openid.spec
1 #
2 # Conditional build:
3 %bcond_without  tests   # do not perform "make test"
4 %bcond_without  python2 # CPython 2.x module
5 %bcond_with     python3 # CPython 3.x module
6
7 %global module Flask-OpenID
8 Summary:        OpenID support for Flask
9 Name:           python-flask-openid
10 Version:        1.2.4
11 Release:        1
12 License:        BSD
13 Group:          Development/Libraries
14 Source0:        http://pypi.python.org/packages/source/F/%{module}/%{module}-%{version}.tar.gz
15 # Source0-md5:  4ee3c1de53d27f4a8491afda1d67c665
16 URL:            http://github.com/mitsuhiko/flask-openid/
17 BuildRequires:  python-openid
18 BuildRequires:  python-setuptools
19 BuildRequires:  rpm-pythonprov
20 BuildRequires:  rpmbuild(macros) >= 1.219
21 %if %{with python3}
22 BuildRequires:  python3-modules
23 BuildRequires:  python3-openid
24 BuildRequires:  python3-setuptools
25 %endif
26 Requires:       python-openid
27 BuildArch:      noarch
28 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29
30 %description
31 Flask-OpenID is an extension to flask that allows you to add openid
32 based authentication to your website in a matter of minutes.
33
34 This package includes the Python 2 version of the module.
35
36 %package -n python3-flask-openid
37 Summary:        OpenID support for Flask
38 Group:          Development/Libraries
39 Requires:       python3-openid
40
41 %description -n python3-flask-openid
42 Flask-OpenID is an extension to flask that allows you to add openid
43 based authentication to your website in a matter of minutes.
44
45 This package includes the Python 3 version of the module.
46
47 %prep
48 %setup -q -n %{module}-%{version}
49
50 rm docs/_themes/.git
51 rm docs/_themes/.gitignore
52
53 %build
54 %if %{with python2}
55 %{__python} setup.py build --build-base build-2 %{?with_tests:test}
56 %endif
57
58 %if %{with python3}
59 %{__python3} setup.py build --build-base build-3 %{?with_tests:test}
60 %endif
61
62 %install
63 rm -rf $RPM_BUILD_ROOT
64
65 %if %{with python2}
66 %{__python} setup.py \
67         build --build-base build-2 \
68         install --skip-build \
69         --optimize=2 \
70         --root=$RPM_BUILD_ROOT
71
72 %py_postclean
73 %endif
74
75 %if %{with python3}
76 %{__python3} setup.py \
77         build --build-base build-3 \
78         install --skip-build \
79         --optimize=2 \
80         --root=$RPM_BUILD_ROOT
81 %endif
82
83 %clean
84 rm -rf $RPM_BUILD_ROOT
85
86 %if %{with python2}
87 %files
88 %defattr(644,root,root,755)
89 %doc docs LICENSE PKG-INFO README
90 %{py_sitescriptdir}/flask_openid.py[co]
91 %{py_sitescriptdir}/Flask_OpenID-%{version}-py*.egg-info
92 %endif
93
94 %if %{with python3}
95 %files -n python3-flask-openid
96 %defattr(644,root,root,755)
97 %doc docs README LICENSE PKG-INFO
98 %{py3_sitescriptdir}/flask_openid.py*
99 %{py3_sitescriptdir}/Flask_OpenID-%{version}-py*.egg-info
100 %endif
This page took 0.043201 seconds and 2 git commands to generate.