]> git.pld-linux.org Git - packages/python-social-auth-core.git/blob - python-social-auth-core.spec
fb9f1eb286ce37e8246b6d99aae73e9bf0e15ba3
[packages/python-social-auth-core.git] / python-social-auth-core.spec
1 #
2 # Conditional build:
3 %bcond_with     tests   # do not perform "make test"
4 %bcond_without  python2 # CPython 2.x module
5 %bcond_with     python3 # CPython 3.x module
6
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}
12 Version:        1.3.0
13 Release:        1
14 License:        BSD
15 Group:          Libraries/Python
16 Source0:        https://files.pythonhosted.org/packages/source/s/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
17 # Source0-md5:  7adc1a6f92a7847c09692b2ecb831891
18 URL:            https://python-social-auth-docs.readthedocs.io/
19 BuildRequires:  rpm-pythonprov
20 BuildRequires:  rpmbuild(macros) >= 1.714
21 %if %{with python2}
22 BuildRequires:  python-modules
23 BuildRequires:  python-setuptools
24 %if %{with tests}
25 BuildRequires:  python-mock = 1.0.1
26 BuildRequires:  python-saml >= 2.2.1
27 %endif
28 %endif
29 %if %{with python3}
30 BuildRequires:  python3-modules
31 BuildRequires:  python3-setuptools
32 %if %{with tests}
33 BuildRequires:  python3-mock = 1.0.1
34 BuildRequires:  python3-saml >= 2.2.1
35 %endif
36 %endif
37 Requires:       python-modules
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
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.
50
51 %package -n python3-%{pypi_name}
52 Summary:        Python Social Auth - Core
53 Group:          Libraries/Python
54
55 %description -n python3-%{pypi_name}
56 Python Social Auth is an easy to setup social
57 authentication/registration mechanism with support for several
58 frameworks and auth providers.
59
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.
64
65 %prep
66 %setup -q -n %{pypi_name}-%{version}
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?)
84 %{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/social_core/tests
85 %endif
86
87 %if %{with python3}
88 %py3_install
89
90 # rm tests (or subpackage?)
91 %{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/social_core/tests
92 %endif
93
94 %clean
95 rm -rf $RPM_BUILD_ROOT
96
97 %if %{with python2}
98 %files
99 %defattr(644,root,root,755)
100 %doc README.md LICENSE
101 %{py_sitescriptdir}/%{module}
102 %{py_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
103 %endif
104
105 %if %{with python3}
106 %files -n python3-%{pypi_name}
107 %defattr(644,root,root,755)
108 %doc README.md LICENSE
109 %{py3_sitescriptdir}/%{module}
110 %{py3_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
111 %endif
This page took 0.057235 seconds and 2 git commands to generate.