]> git.pld-linux.org Git - packages/python-alabaster.git/blob - python-alabaster.spec
3b6f4ac306b449e47ee3db4d37fab37194146ba5
[packages/python-alabaster.git] / python-alabaster.spec
1 #
2 # Conditional build:
3 %bcond_without  python2 # CPython 2.x module
4 %bcond_without  python3 # CPython 3.x module
5
6 %define         module  alabaster
7 Summary:        A configurable sidebar-enabled Sphinx theme
8 Name:           python-%{module}
9 Version:        0.7.4
10 Release:        1
11 License:        BSD
12 Group:          Libraries/Python
13 Source0:        https://pypi.python.org/packages/source/a/alabaster/%{module}-%{version}.tar.gz
14 # Source0-md5:  ba31bf652194200428aa4e3d976f5ccd
15 URL:            https://pypi.python.org/pypi/alabaster
16 BuildRequires:  rpm-pythonprov
17 BuildRequires:  rpmbuild(macros) >= 1.219
18 %if %{with python2}
19 BuildRequires:  python-devel
20 BuildRequires:  python-setuptools >= 7.0
21 %endif
22 %if %{with python3}
23 BuildRequires:  python3-devel
24 BuildRequires:  python3-modules
25 BuildRequires:  python3-setuptools >= 7.0
26 %endif
27 Requires:       python-modules
28 BuildArch:      noarch
29 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30
31 %description
32 A configurable sidebar-enabled Sphinx theme
33
34 This theme is a modified “Kr” Sphinx theme from @kennethreitz
35 (especially as used in his Requests project), which was itself
36 originally based on @mitsuhiko’s theme used for Flask & related
37 projects.
38
39 %package -n python3-%{module}
40 Summary:        A configurable sidebar-enabled Sphinx theme
41 Group:          Libraries/Python
42 Requires:       python3-modules
43
44 %description -n python3-%{module}
45 A configurable sidebar-enabled Sphinx theme
46
47 This theme is a modified “Kr” Sphinx theme from @kennethreitz
48 (especially as used in his Requests project), which was itself
49 originally based on @mitsuhiko’s theme used for Flask & related
50 projects.
51
52 %prep
53 %setup -q -n %{module}-%{version}
54
55 %build
56 %if %{with python2}
57 %{__python} setup.py build --build-base build-2 %{?with_tests:test}
58 %endif
59
60 %if %{with python3}
61 %{__python3} setup.py build --build-base build-3 %{?with_tests:test}
62 %endif
63
64 %install
65 rm -rf $RPM_BUILD_ROOT
66
67 %if %{with python2}
68 %{__python} setup.py \
69         build --build-base build-2 \
70         install --skip-build \
71         --optimize=2 \
72         --root=$RPM_BUILD_ROOT
73
74 %py_postclean
75 %endif
76
77 %if %{with python3}
78 %{__python3} setup.py \
79         build --build-base build-3 \
80         install --skip-build \
81         --optimize=2 \
82         --root=$RPM_BUILD_ROOT
83 %endif
84
85 %clean
86 rm -rf $RPM_BUILD_ROOT
87
88 %if %{with python2}
89 %files
90 %defattr(644,root,root,755)
91 %doc README.rst
92 %{py_sitescriptdir}/%{module}
93 %{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
94 %endif
95
96 %if %{with python3}
97 %files -n python3-%{module}
98 %defattr(644,root,root,755)
99 %doc README.rst
100 %{py3_sitescriptdir}/%{module}
101 %{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
102 %endif
103
This page took 0.077667 seconds and 3 git commands to generate.