Sophie

Sophie

distrib > Mageia > 7 > x86_64 > by-pkgid > 5a2c7cde5f90452c10c9c47e9f2df57f > files > 2

python-fasteners-0.14.1-4.mga7.src.rpm

%global pypi_name fasteners

%global with_python3 1

Name:           python-%{pypi_name}
Version:        0.14.1
Release:        %mkrel 4
Group:          Development/Python
Summary:        A python package that provides useful locks

License:        ASL 2.0
URL:            https://github.com/harlowja/fasteners
Source0:        https://files.pythonhosted.org/packages/source/f/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
BuildArch:      noarch

BuildRequires:  python-devel
BuildRequires:  python-six
BuildRequires:  python2-monotonic >= 0.1
BuildRequires:  python2-setuptools

%if 0%{?with_python3}
BuildRequires:  python3-devel
BuildRequires:  python3-six
BuildRequires:  python3-monotonic >= 0.1
BuildRequires:  python3-setuptools
%endif # if with_python3

%description
Fasteners Overview A python package_ that provides useful locks.

%package -n	python2-%{pypi_name}
Summary:	A python package that provides useful locks
Provides:	python-%{pypi_name} = %{version}-%{release}

%description -n python2-%{pypi_name}
Fasteners Overview A python package_ that provides useful locks.

%if 0%{?with_python3}
%package -n     python3-%{pypi_name}
Summary:        A python package that provides useful locks

%description -n python3-%{pypi_name}
Fasteners Overview A python package_ that provides useful locks.
%endif # with_python3


%prep
%setup -q -n %{pypi_name}-%{version}

# Remove bundled egg-info
rm -rf %{pypi_name}.egg-info

%if 0%{?with_python3}
rm -rf %{py3dir}
cp -a . %{py3dir}
find %{py3dir} -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|'

%endif # with_python3


%build
%py2_build

%if 0%{?with_python3}
pushd %{py3dir}
%py3_build
popd
%endif # with_python3


%install
# Must do the subpackages' install first because the scripts in /usr/bin are
# overwritten with every setup.py install (and we want the python2 version
# to be the default for now).
%if 0%{?with_python3}
pushd %{py3dir}
%py3_install
popd
%endif # with_python3

%py2_install

%files -n python2-%{pypi_name}
%doc README.rst
%{python_sitelib}/%{pypi_name}/
%{python_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info/

%if 0%{?with_python3}
%files -n python3-%{pypi_name}
%doc README.rst
%{python3_sitelib}/%{pypi_name}/
%{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info/
%endif # with_python3


%changelog
* Sat Jan 12 2019 tmb <tmb> 0.14.1-4.mga7
+ Revision: 1355230
- rebuild for python 3.7
+ shlomif <shlomif>
- Rebuild for python3 3.7

* Thu Sep 20 2018 umeabot <umeabot> 0.14.1-2.mga7
+ Revision: 1288845
- Mageia 7 Mass Rebuild

* Fri Dec 22 2017 wally <wally> 0.14.1-1.mga7
+ Revision: 1183801
- imported package python-fasteners