]>
Commit | Line | Data |
---|---|---|
84feb8b5 | 1 | # |
777ad971 | 2 | # Conditional build: |
84feb8b5 JB |
3 | %bcond_with doc # Sphinx documentation |
4 | %bcond_without tests # unit tests | |
777ad971 AM |
5 | %bcond_without python2 # CPython 2.x module |
6 | %bcond_without python3 # CPython 3.x module | |
7 | ||
8 | %define module cycler | |
9 | Summary: Composable style cycles | |
84feb8b5 | 10 | Summary(pl.UTF-8): Komponowalne cykle styli |
777ad971 AM |
11 | Name: python-%{module} |
12 | Version: 0.10.0 | |
55eef06c | 13 | Release: 5 |
777ad971 AM |
14 | License: BSD |
15 | Group: Libraries/Python | |
84feb8b5 JB |
16 | #Source0Download: https://github.com/matplotlib/cycler/releases |
17 | # FIXME: use | |
18 | #Source0: https://github.com/matplotlib/cycler/archive/v%{version}/%{module}-%{version}.tar.gz | |
777ad971 AM |
19 | Source0: https://github.com/matplotlib/cycler/archive/v%{version}.tar.gz |
20 | # Source0-md5: 83dd0df7810e838b59e4dd9fa6e2d198 | |
84feb8b5 | 21 | URL: https://matplotlib.org/cycler/ |
777ad971 AM |
22 | BuildRequires: rpm-pythonprov |
23 | BuildRequires: rpmbuild(macros) >= 1.714 | |
24 | %if %{with python2} | |
84feb8b5 | 25 | BuildRequires: python-modules >= 1:2.6 |
777ad971 AM |
26 | BuildRequires: python-setuptools |
27 | %if %{with tests} | |
28 | BuildRequires: python-nose | |
84feb8b5 | 29 | BuildRequires: python-six |
777ad971 AM |
30 | %endif |
31 | %endif | |
32 | %if %{with python3} | |
84feb8b5 | 33 | BuildRequires: python3-modules >= 1:3.3 |
777ad971 AM |
34 | BuildRequires: python3-setuptools |
35 | %if %{with tests} | |
36 | BuildRequires: python3-nose | |
84feb8b5 JB |
37 | BuildRequires: python3-six |
38 | %endif | |
777ad971 AM |
39 | %endif |
40 | %if %{with doc} | |
41 | BuildRequires: ipython3 | |
42 | BuildRequires: python3-matplotlib | |
84feb8b5 JB |
43 | BuildRequires: python3-numpydoc |
44 | BuildRequires: sphinx-pdg-3 | |
777ad971 | 45 | %endif |
84feb8b5 | 46 | Requires: python-modules >= 1:2.6 |
777ad971 AM |
47 | BuildArch: noarch |
48 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
49 | ||
50 | %description | |
51 | Composable style cycles. | |
52 | ||
84feb8b5 JB |
53 | %description -l pl.UTF-8. |
54 | Komponowalne cykle styli. | |
55 | ||
777ad971 AM |
56 | %package -n python3-%{module} |
57 | Summary: Composable style cycles | |
84feb8b5 | 58 | Summary(pl.UTF-8): Komponowalne cykle styli |
777ad971 | 59 | Group: Libraries/Python |
84feb8b5 | 60 | Requires: python3-modules >= 1:3.3 |
777ad971 AM |
61 | |
62 | %description -n python3-%{module} | |
63 | Composable style cycles. | |
64 | ||
84feb8b5 JB |
65 | %description -n python3-%{module} -l pl.UTF-8. |
66 | Komponowalne cykle styli. | |
67 | ||
777ad971 AM |
68 | %package apidocs |
69 | Summary: %{module} API documentation | |
84feb8b5 | 70 | Summary(pl.UTF-8): Dokumentacja API modułu %{module} |
777ad971 AM |
71 | Group: Documentation |
72 | ||
73 | %description apidocs | |
74 | API documentation for %{module}. | |
75 | ||
76 | %description apidocs -l pl.UTF-8 | |
84feb8b5 | 77 | Dokumentacja API modułu %{module}. |
777ad971 AM |
78 | |
79 | %prep | |
80 | %setup -q -n %{module}-%{version} | |
81 | ||
82 | %build | |
83 | %if %{with python2} | |
84 | %py_build %{?with_tests:test} | |
85 | %endif | |
86 | ||
87 | %if %{with python3} | |
88 | %py3_build %{?with_tests:test} | |
89 | %endif | |
90 | ||
91 | %if %{with doc} | |
84feb8b5 JB |
92 | %{__make} -C doc html \ |
93 | SPHINXBUILD=sphinx-build-3 | |
94 | %{__rm} -r doc/_build/html/_sources | |
777ad971 AM |
95 | %endif |
96 | ||
97 | %install | |
98 | rm -rf $RPM_BUILD_ROOT | |
99 | ||
100 | %if %{with python2} | |
101 | %py_install | |
102 | %py_postclean | |
103 | %endif | |
104 | ||
105 | %if %{with python3} | |
106 | %py3_install | |
107 | %endif | |
108 | ||
109 | %clean | |
110 | rm -rf $RPM_BUILD_ROOT | |
111 | ||
112 | %if %{with python2} | |
113 | %files | |
114 | %defattr(644,root,root,755) | |
84feb8b5 | 115 | %doc LICENSE README.rst |
777ad971 AM |
116 | %{py_sitescriptdir}/%{module}.py* |
117 | %{py_sitescriptdir}/%{module}-%{version}-py*.egg-info | |
118 | %endif | |
119 | ||
120 | %if %{with python3} | |
121 | %files -n python3-%{module} | |
122 | %defattr(644,root,root,755) | |
84feb8b5 | 123 | %doc LICENSE README.rst |
777ad971 AM |
124 | %{py3_sitescriptdir}/%{module}.py* |
125 | %{py3_sitescriptdir}/__pycache__/%{module}*.py* | |
126 | %{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info | |
127 | %endif | |
128 | ||
129 | %if %{with doc} | |
130 | %files apidocs | |
131 | %defattr(644,root,root,755) | |
132 | %doc docs/_build/html/* | |
133 | %endif |