forked from girish946/plot-cat
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpython-plotcat.spec
More file actions
106 lines (84 loc) · 2.84 KB
/
python-plotcat.spec
File metadata and controls
106 lines (84 loc) · 2.84 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
# Created by pyp2rpm-3.1.3
%global pypi_name plotcat
%if 0%{?fedora} >= 24
%global with_python3 1
%endif
Name: python-%{pypi_name}
Version: 1.0.2
Release: 1%{?dist}
Summary: Tool to plot live serial input
License: GPLv3+
URL: https://github.com/girish946/plot-cat
Source0: https://files.pythonhosted.org/packages/source/p/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
BuildArch: noarch
%description
Tool to plot live serial input. plotcat works on python 2.7 and later.
plotcat comes handy when you want to plot live data that is coming form
different sensors over the serial port. For example you have to plot the output
of a temperature sensor that is coming from an Arduino or any other
micro controller for that matter; plotcat comes handy for such tasks. plotcat
sits on the top of Matplotlib and does all the initialization and drawing stuff
itself. you just have to provide the list of values to be plotted.
%package -n python2-%{pypi_name}
Summary: Tool to plot live serial input
%{?python_provide:%python_provide python2-%{pypi_name}}
BuildRequires: python-setuptools
BuildRequires: python2-devel
Requires: python-matplotlib
Requires: pyserial
%description -n python2-%{pypi_name}
Tool to plot live serial input
%if 0%{?with_python3}
%package -n python3-%{pypi_name}
Summary: Tool to plot live serial input
%{?python_provide:%python_provide python3-%{pypi_name}}
BuildRequires: python3-setuptools
BuildRequires: python3-devel
Requires: python3-matplotlib
Requires: python3-pyserial
%description -n python3-%{pypi_name}
Tool to plot live serial input
%endif
%prep
%autosetup -n %{pypi_name}-%{version}
# Remove bundled egg-info
rm -rf %{pypi_name}.egg-info
sed -i -e '/^#!\//, 1d' plotcat/*.py
%build
%py2_build
%if 0%{?with_python3}
%py3_build
%endif
%install
# Must do the subpackages' install first because the scripts in /usr/bin are
# overwritten with every setup.py install.
%if 0%{?with_python3}
%py3_install
%endif
%py2_install
%files -n python2-%{pypi_name}
%license LICENSE
%doc
%{_bindir}/live_plot.py
%{python2_sitelib}/%{pypi_name}/
%{python2_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info/
%if 0%{?with_python3}
%files -n python3-%{pypi_name}
%license LICENSE
%doc
%{_bindir}/live_plot.py
%{python3_sitelib}/%{pypi_name}/
%{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info/
%endif
%changelog
* Mon Jan 16 2017 girish joshi <girish946@gmail.com> - 1.0.2
- multiple figures can be used.
- issue with arguments for multiple plots solved.
- example for multiple figures added.
* Tue Nov 1 2016 girish joshi <girish946@gmail.com> - 1.0.1
- problem with multiple graphs corrected.
- examples corrected.
- live_plot.py updated
* Sun Aug 28 2016 girish joshi <girish946@gmail.com> - 1.0.0-2
- Initial package.
- Builds for python2 and 3 corrected.