]>
Commit | Line | Data |
---|---|---|
01b69abe ER |
1 | # |
2 | # Conditional build: | |
01b69abe ER |
3 | %bcond_with tests # do not perform "make test" |
4 | %bcond_without python2 # CPython 2.x module | |
4132b3bb | 5 | %bcond_with python3 # CPython 3.x module |
01b69abe | 6 | |
2bc1944e ER |
7 | %define module social_core |
8 | %define pypi_name social-auth-core | |
9 | %define egg_name social_auth_core | |
10 | Summary: Python Social Auth - Core | |
11 | Name: python-%{pypi_name} | |
f7a20d20 | 12 | Version: 1.3.0 |
35a9be4f | 13 | Release: 2 |
01b69abe | 14 | License: BSD |
aedd3c87 | 15 | Group: Libraries/Python |
2bc1944e | 16 | Source0: https://files.pythonhosted.org/packages/source/s/%{pypi_name}/%{pypi_name}-%{version}.tar.gz |
f7a20d20 ER |
17 | # Source0-md5: 7adc1a6f92a7847c09692b2ecb831891 |
18 | URL: https://python-social-auth-docs.readthedocs.io/ | |
01b69abe ER |
19 | BuildRequires: rpm-pythonprov |
20 | BuildRequires: rpmbuild(macros) >= 1.714 | |
21 | %if %{with python2} | |
22 | BuildRequires: python-modules | |
23 | BuildRequires: python-setuptools | |
f7a20d20 ER |
24 | %if %{with tests} |
25 | BuildRequires: python-mock = 1.0.1 | |
26 | BuildRequires: python-saml >= 2.2.1 | |
27 | %endif | |
01b69abe ER |
28 | %endif |
29 | %if %{with python3} | |
30 | BuildRequires: python3-modules | |
31 | BuildRequires: python3-setuptools | |
f7a20d20 ER |
32 | %if %{with tests} |
33 | BuildRequires: python3-mock = 1.0.1 | |
34 | BuildRequires: python3-saml >= 2.2.1 | |
35 | %endif | |
01b69abe ER |
36 | %endif |
37 | Requires: python-modules | |
01b69abe ER |
38 | BuildArch: noarch |
39 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
40 | ||
41 | %description | |
42 | Python Social Auth is an easy to setup social | |
43 | authentication/registration mechanism with support for several | |
44 | frameworks and auth providers. | |
45 | ||
2bc1944e ER |
46 | This is the core component of the python-social-auth ecosystem, it |
47 | implements the common interface to define new authentication backends | |
48 | to third parties services, implement integrations with web frameworks | |
49 | and storage solutions. | |
01b69abe | 50 | |
771af505 | 51 | %package -n python3-%{pypi_name} |
aedd3c87 ER |
52 | Summary: Python Social Auth - Core |
53 | Group: Libraries/Python | |
01b69abe | 54 | |
771af505 | 55 | %description -n python3-%{pypi_name} |
01b69abe ER |
56 | Python Social Auth is an easy to setup social |
57 | authentication/registration mechanism with support for several | |
58 | frameworks and auth providers. | |
59 | ||
2bc1944e ER |
60 | This is the core component of the python-social-auth ecosystem, it |
61 | implements the common interface to define new authentication backends | |
62 | to third parties services, implement integrations with web frameworks | |
63 | and storage solutions. | |
01b69abe ER |
64 | |
65 | %prep | |
2bc1944e | 66 | %setup -q -n %{pypi_name}-%{version} |
01b69abe ER |
67 | |
68 | %build | |
69 | %if %{with python2} | |
70 | %py_build %{?with_tests:test} | |
71 | %endif | |
72 | ||
73 | %if %{with python3} | |
74 | %py3_build %{?with_tests:test} | |
75 | %endif | |
76 | ||
77 | %install | |
78 | rm -rf $RPM_BUILD_ROOT | |
79 | %if %{with python2} | |
80 | %py_install | |
81 | %py_postclean | |
82 | ||
83 | # rm tests (or subpackage?) | |
2bc1944e | 84 | %{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/social_core/tests |
01b69abe ER |
85 | %endif |
86 | ||
87 | %if %{with python3} | |
88 | %py3_install | |
89 | ||
90 | # rm tests (or subpackage?) | |
2bc1944e | 91 | %{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/social_core/tests |
01b69abe ER |
92 | %endif |
93 | ||
94 | %clean | |
95 | rm -rf $RPM_BUILD_ROOT | |
96 | ||
97 | %if %{with python2} | |
98 | %files | |
99 | %defattr(644,root,root,755) | |
2bc1944e | 100 | %doc README.md LICENSE |
a2844430 | 101 | %{py_sitescriptdir}/%{module} |
2bc1944e | 102 | %{py_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info |
01b69abe ER |
103 | %endif |
104 | ||
105 | %if %{with python3} | |
771af505 | 106 | %files -n python3-%{pypi_name} |
01b69abe | 107 | %defattr(644,root,root,755) |
2bc1944e | 108 | %doc README.md LICENSE |
a2844430 | 109 | %{py3_sitescriptdir}/%{module} |
2bc1944e | 110 | %{py3_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info |
01b69abe | 111 | %endif |