Sophie

Sophie

distrib > Mageia > 6 > armv7hl > media > core-updates-src > by-pkgid > 58b9103691b4cf67a9fc7e78cb15829c > files > 2

python-fasteners-0.14.1-1.mga6.src.rpm

%global pypi_name fasteners

%global with_python3 1

Name:           python-%{pypi_name}
Version:        0.14.1
Release:        %mkrel 1
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:  python-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
* Fri Dec 22 2017 wally <wally> 0.14.1-1.mga6
+ Revision: 1183813
- Import from cauldron as required by latest duplicity (mga#22234)

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