%global srcname intelhex %global sum IntelHex library Name: python-%{srcname} Version: 2.2.1 Release: 1%{?dist} Summary: %{sum} License: BSD URL: https://pypi.python.org/pypi/IntelHex Source0: https://pypi.python.org/packages/01/66/8fab869edcc0eaf8fc030472ff379b8eeee2ef3b42f8aec6bd84e9f735e3/%{srcname}-%{version}.tar.gz BuildArch: noarch BuildRequires: python2-devel python3-devel %description The Intel HEX file format is widely used in microprocessors and microcontrollers area (embedded systems etc) as the de facto standard for representation of code to be programmed into microelectronic devices. This work implements an intelhex Python library to read, write, create from scratch and manipulate data from Intel HEX file format. %package -n python2-%{srcname} Summary: %{sum} %{?python_provide:%python_provide python2-%{srcname}} %description -n python2-%{srcname} The Intel HEX file format is widely used in microprocessors and microcontrollers area (embedded systems etc) as the de facto standard for representation of code to be programmed into microelectronic devices. This work implements an intelhex Python library to read, write, create from scratch and manipulate data from Intel HEX file format. %package -n python3-%{srcname} Summary: %{sum} %{?python_provide:%python_provide python3-%{srcname}} %description -n python3-%{srcname} The Intel HEX file format is widely used in microprocessors and microcontrollers area (embedded systems etc) as the de facto standard for representation of code to be programmed into microelectronic devices. This work implements an intelhex Python library to read, write, create from scratch and manipulate data from Intel HEX file format. %prep %autosetup -n %{srcname}-%{version} %build %py2_build %py3_build %install # Must do the python2 install first because the scripts in /usr/bin are # overwritten with every setup.py install, and in general we want the # python3 version to be the default. # If, however, we're installing separate executables for python2 and python3, # the order needs to be reversed so the unversioned executable is the python2 one. %py2_install %py3_install #check #{__python2} setup.py test #{__python3} setup.py test # Note that there is no %%files section for the unversioned python module if we are building for several python runtimes %files -n python2-%{srcname} %license LICENSE.txt %doc Readme.rst %{python2_sitelib}/* %files -n python3-%{srcname} %license LICENSE.txt %doc Readme.rst %{python3_sitelib}/* %{_bindir}/bin2hex.py %{_bindir}/hex2bin.py %{_bindir}/hex2dump.py %{_bindir}/hexdiff.py %{_bindir}/hexinfo.py %{_bindir}/hexmerge.py %changelog * Sun Mar 25 2018 Thomas Sailer - 2.2.1-1 - initial spec file