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