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