diff --git a/python-pybeam.spec b/python-pybeam.spec index 4eb95f9..8b36a9b 100644 --- a/python-pybeam.spec +++ b/python-pybeam.spec @@ -1,19 +1,14 @@ -%global realname pybeam -%global upstream matwey -%global debug_package %{nil} +%global srcname pybeam -Name: python-%{realname} +Name: python-%{srcname} Version: 0.3.2 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Python module to parse Erlang BEAM files License: MIT Group: Development/Languages -URL: https://github.com/%{upstream}/%{realname} -%if 0%{?el7}%{?fedora} -VCS: scm:git:https://github.com/%{upstream}/%{realname}.git -%endif -Source0: https://github.com/%{upstream}/%{realname}/archive/%{version}/%{realname}-%{version}.tar.gz +URL: https://github.com/matwey/%{srcname} +Source0: https://github.com/matwey/%{srcname}/archive/%{version}/%{srcname}-%{version}.tar.gz BuildArch: noarch @@ -21,7 +16,7 @@ BuildArch: noarch Python module to parse Erlang BEAM files. -%package -n python2-%{realname} +%package -n python2-%{srcname} Summary: %{summary} BuildRequires: python-construct BuildRequires: python-devel @@ -30,30 +25,35 @@ Requires: python-construct Requires: python-six >= 1.4.0 -%description -n python2-%{realname} +%description -n python2-%{srcname} Python module to parse Erlang BEAM files. -%package -n python3-%{realname} +%if 0%{?fedora} +%package -n python3-%{srcname} Summary: %{summary} BuildRequires: python3-construct BuildRequires: python3-devel BuildRequires: python3-setuptools Requires: python3-construct Requires: python3-six >= 1.4.0 +%{?python_provide:%python_provide python3-%{srcname}} -%description -n python3-%{realname} +%description -n python3-%{srcname} Python module to parse Erlang BEAM files. +%endif %prep -%setup -q -n %{realname}-%{version} +%setup -q -n %{srcname}-%{version} %build %py2_build +%if 0%{?fedora} %py3_build +%endif %install @@ -61,26 +61,35 @@ Python module to parse Erlang BEAM files. # overwritten with every setup.py install, and in general we want the # python3 version to be the default. %py2_install +%if 0%{?fedora} %py3_install +%endif %check %{__python2} setup.py test +%if 0%{?fedora} %{__python3} setup.py test +%endif -%files -n python2-%{realname} +%files -n python2-%{srcname} %license LICENSE %doc README.md %{python2_sitelib}/* -%files -n python3-%{realname} +%if 0%{?fedora} +%files -n python3-%{srcname} %license LICENSE %doc README.md %{python3_sitelib}/* +%endif %changelog +* Tue Jun 7 2016 Peter Lemenkov - 0.3.2-2 +- Build for EL7 + * Mon Feb 15 2016 Peter Lemenkov - 0.3.2-1 - Initial build