]> git.pld-linux.org Git - packages/python-cycler.git/blob - python-cycler.spec
- python2 note
[packages/python-cycler.git] / python-cycler.spec
1 #
2 # Conditional build:
3 %bcond_with     doc     # Sphinx documentation
4 %bcond_without  tests   # unit tests
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
10 Summary(pl.UTF-8):      Komponowalne cykle styli
11 Name:           python-%{module}
12 # keep 0.10.x here for python2 support
13 Version:        0.10.0
14 Release:        7
15 License:        BSD
16 Group:          Libraries/Python
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
20 Source0:        https://github.com/matplotlib/cycler/archive/v%{version}.tar.gz
21 # Source0-md5:  83dd0df7810e838b59e4dd9fa6e2d198
22 URL:            https://matplotlib.org/cycler/
23 BuildRequires:  rpm-pythonprov
24 BuildRequires:  rpmbuild(macros) >= 1.714
25 %if %{with python2}
26 BuildRequires:  python-modules >= 1:2.6
27 BuildRequires:  python-setuptools
28 %if %{with tests}
29 BuildRequires:  python-nose
30 BuildRequires:  python-six
31 %endif
32 %endif
33 %if %{with python3}
34 BuildRequires:  python3-modules >= 1:3.3
35 BuildRequires:  python3-setuptools
36 %if %{with tests}
37 BuildRequires:  python3-nose
38 BuildRequires:  python3-six
39 %endif
40 %endif
41 %if %{with doc}
42 BuildRequires:  ipython3
43 BuildRequires:  python3-matplotlib
44 BuildRequires:  python3-numpydoc
45 BuildRequires:  sphinx-pdg-3
46 %endif
47 Requires:       python-modules >= 1:2.6
48 BuildArch:      noarch
49 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
50
51 %description
52 Composable style cycles.
53
54 %description -l pl.UTF-8.
55 Komponowalne cykle styli.
56
57 %package -n python3-%{module}
58 Summary:        Composable style cycles
59 Summary(pl.UTF-8):      Komponowalne cykle styli
60 Group:          Libraries/Python
61 Requires:       python3-modules >= 1:3.3
62
63 %description -n python3-%{module}
64 Composable style cycles.
65
66 %description -n python3-%{module} -l pl.UTF-8.
67 Komponowalne cykle styli.
68
69 %package apidocs
70 Summary:        %{module} API documentation
71 Summary(pl.UTF-8):      Dokumentacja API modułu %{module}
72 Group:          Documentation
73
74 %description apidocs
75 API documentation for %{module}.
76
77 %description apidocs -l pl.UTF-8
78 Dokumentacja API modułu %{module}.
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}
93 %{__make} -C doc html \
94         SPHINXBUILD=sphinx-build-3
95 %{__rm} -r doc/_build/html/_sources
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)
116 %doc LICENSE README.rst
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)
124 %doc LICENSE README.rst
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
This page took 0.180046 seconds and 3 git commands to generate.