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