]> git.pld-linux.org Git - packages/python-scales.git/blob - python-scales.spec
- python 3.8 compatibility fix
[packages/python-scales.git] / python-scales.spec
1 #
2 # Conditional build:
3 %bcond_with     doc             # don't build doc
4 %bcond_without  tests   # do not perform "make test"
5 %bcond_without  python2 # CPython 2.x module
6 %bcond_without  python3 # CPython 3.x module
7
8 %define         module  scales
9 Summary:        Stats for Python processes
10 Summary(pl.UTF-8):      Statyski dla procesów Pythona
11 Name:           python-%{module}
12 Version:        1.0.9
13 Release:        8
14 License:        Apache
15 Group:          Libraries/Python
16 Source0:        https://pypi.python.org/packages/source/s/%{module}/%{module}-%{version}.tar.gz
17 # Source0-md5:  c61167f2b5f506f0a34a7b8a295a9567
18 Patch0:         python-3.8.patch
19 URL:            https://www.github.com/Cue/scales
20 BuildRequires:  rpm-pythonprov
21 BuildRequires:  rpmbuild(macros) >= 1.710
22 %if %{with python2}
23 BuildRequires:  python-nose
24 BuildRequires:  python-setuptools > 7.0
25 BuildRequires:  python-six
26 %endif
27 %if %{with python3}
28 BuildRequires:  python3-modules
29 BuildRequires:  python3-nose
30 BuildRequires:  python3-setuptools > 7.0
31 BuildRequires:  python3-six
32 %endif
33 Requires:       python-modules
34 BuildArch:      noarch
35 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
36
37 %description
38 Tracks server state and statistics, allowing you to see what your
39 server is doing. It can also send metrics to Graphite for graphing or
40 to a file for crash forensics.
41
42 %description -l pl.UTF-8
43 Śledzi stan serwerqa i jego statystyki pozwalając zobaczyć co serwer
44 robi. Pozwala wysłać dane do Graphite albo do pliku do analizy.
45
46 %package -n python3-%{module}
47 Summary:        -
48 Group:          Libraries/Python
49 Requires:       python3-modules
50
51 %description -n python3-%{module}
52 Tracks server state and statistics, allowing you to see what your
53 server is doing. It can also send metrics to Graphite for graphing or
54 to a file for crash forensics.
55
56 %description -n python3-%{module} -l pl.UTF-8
57 Śledzi stan serwerqa i jego statystyki pozwalając zobaczyć co serwer
58 robi. Pozwala wysłać dane do Graphite albo do pliku do analizy.
59
60 %package apidocs
61 Summary:        %{module} API documentation
62 Summary(pl.UTF-8):      Dokumentacja API %{module}
63 Group:          Documentation
64
65 %description apidocs
66 API documentation for %{module}.
67
68 %description apidocs -l pl.UTF-8
69 Dokumentacja API %{module}.
70
71 %prep
72 %setup -q -n %{module}-%{version}
73 %patch0 -p1
74
75 %build
76 %if %{with python2}
77 %py_build %{?with_tests:test}
78 %endif
79
80 %if %{with python3}
81 %py3_build %{?with_tests:test}
82 %endif
83
84 %if %{with doc}
85 cd docs
86 %{__make} -j1 html
87 rm -rf _build/html/_sources
88 %endif
89
90 %install
91 rm -rf $RPM_BUILD_ROOT
92
93 %if %{with python2}
94 %py_install
95
96 %py_postclean
97 %endif
98
99 %if %{with python3}
100 %py3_install
101 %endif
102
103 %clean
104 rm -rf $RPM_BUILD_ROOT
105
106 %if %{with python2}
107 %files
108 %defattr(644,root,root,755)
109 %dir %{py_sitescriptdir}/greplin
110 %dir %{py_sitescriptdir}/greplin/scales
111 %{py_sitescriptdir}/greplin/scales/*.py[co]
112 %{py_sitescriptdir}/scales-%{version}-py*.egg-info
113 %{py_sitescriptdir}/scales-%{version}-py*-nspkg.pth
114 %endif
115
116 %if %{with python3}
117 %files -n python3-%{module}
118 %defattr(644,root,root,755)
119 %dir %{py3_sitescriptdir}/greplin
120 %{py3_sitescriptdir}/greplin/scales
121 %{py3_sitescriptdir}/scales-%{version}-py*.egg-info
122 %{py3_sitescriptdir}/scales-%{version}-py*-nspkg.pth
123 %endif
124
125 %if %{with doc}
126 %files apidocs
127 %defattr(644,root,root,755)
128 %doc docs/_build/html/*
129 %endif
This page took 0.060397 seconds and 3 git commands to generate.