# commit for https://github.com/bashwork/pymodbus/releases/tag/v1.2.0
%global commit 75ac6a80573c332422067f9d72fc965306b6f141
%global shortcommit %(c=%{commit}; echo ${c:0:7})
Name: pymodbus
Version: 1.2.0
Release: 4%{?dist}
Summary: A Modbus Protocol Stack in Python
Group: Development/Languages
License: BSD
URL: https://github.com/bashwork/pymodbus
Source0: https://github.com/bashwork/pymodbus/archive/%{commit}/%{name}-%{commit}.tar.gz
# reverse upstream patch c44bc2e3b71b37bf5e330f7ae7789a62f2c605cb
# to avoid packaging ez_setup
Patch0: 0001-Fixing-issue-60-on-google-code-including-ez_setup.patch
BuildArch: noarch
BuildRequires: python2-devel
BuildRequires: python-setuptools
Requires: python-twisted >= 12.2.0
Requires: python-nose >= 1.2.1
Requires: pyserial >= 2.6
%description
Pymodbus is a full Modbus protocol implementation using twisted for its
asynchronous communications core.
The library currently supports the following:
Client Features
* Full read/write protocol on discrete and register
* Most of the extended protocol (diagnostic/file/pipe/setting/information)
* TCP, UDP, Serial ASCII, Serial RTU, and Serial Binary
* asynchronous(powered by twisted) and synchronous versions
* Payload builder/decoder utilities
Server Features
* Can function as a fully implemented Modbus server
* TCP, UDP, Serial ASCII, Serial RTU, and Serial Binary
* asynchronous(powered by twisted) and synchronous versions
* Full server control context (device information, counters, etc)
* A number of backing contexts (database, redis, a slave device)
%prep
%setup -q -n %{name}-%{commit}
%patch0 -p1 -R -b.no_ez_setup
%build
%{__python} setup.py build
%install
%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
%{__rm} -rf $RPM_BUILD_ROOT%{python_sitelib}/test
%files
%{python_sitelib}/*
%changelog
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.0-4
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Mon Feb 09 2015 Christian Krause <chkr@fedoraproject.org> - 1.2.0-1
- Update to new upstream release 1.2.0
- Add patch to avoid installation of ez_setup
- Change URL and Source URL
- Adjust requirements
* Mon Jun 30 2014 Toshio Kuratomi <toshio@fedoraproject.org> - 0.9.0-7
- Replace the python-setuptools-devel BR with python-setuptools
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.0-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
* Wed Dec 07 2011 Christian Krause <chkr@fedoraproject.org> - 0.9.0-1
- Initial Spec file