File python-stdeb.spec of Package python-stdeb
#
# spec file for package python-stdeb
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%bcond_with test
Name: python-stdeb
Version: 0.8.5
Release: 0
Summary: Python to Debian source package conversion utility
License: MIT
Group: Development/Languages/Python
Url: http://github.com/astraw/stdeb
Source: https://files.pythonhosted.org/packages/source/s/stdeb/stdeb-%{version}.tar.gz
# PATCH-FIX-UPSTREAM 126.patch -- fixes https://github.com/astraw/stdeb/issues/78
Patch0: https://github.com/astraw/stdeb/pull/126.patch
BuildRequires: %{python_module devel}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-requests
BuildArch: noarch
%python_subpackages
%description
The stdeb package produces Debian source packages from Python packages
via a new distutils command, sdist_dsc. Automatic defaults are provided
for the Debian package, but many aspects of the resulting package can be
customized (see the customizing section, below). An additional command,
bdist_deb, creates a Debian binary package, a .deb file. The install_deb
command installs this .deb file. The debianize command builds a
debian/ directory directly alongside your setup.py.
%prep
%setup -q -n stdeb-%{version}
%patch0 -p1
%build
%python_build
%install
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%if %{with test}
%check
%python_exec setup.py test
%endif
%files %{python_files}
%defattr(-,root,root,-)
%doc CHANGELOG.txt LICENSE.txt README.rst
%python3_only %{_bindir}/py2dsc
%python3_only %{_bindir}/py2dsc-deb
%python3_only %{_bindir}/pypi-download
%python3_only %{_bindir}/pypi-install
%{python_sitelib}/*
%changelog