# # spec file for package python-py2pack # # 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-%{**}} Name: python-py2pack Version: 0.8.0 Release: 0 Url: http://github.com/saschpe/py2pack Summary: Generate distribution packages from Python packages on PyPI License: Apache-2.0 Group: Development/Languages/Python Source: https://files.pythonhosted.org/packages/source/p/py2pack/py2pack-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: fdupes BuildRequires: python-rpm-macros BuildRequires: %{python_module devel} BuildRequires: %{python_module setuptools} BuildRequires: %{python_module Jinja2} BuildRequires: %{python_module Sphinx} BuildRequires: %{python_module metaextract} BuildRequires: %{python_module pbr} BuildRequires: %{python_module six} BuildRequires: %{python_module sphinxcontrib-programoutput} Requires: python-Jinja2 Requires: python-metaextract Requires: python-pbr Requires: python-setuptools Requires: python-six BuildArch: noarch %python_subpackages %description This script allows to generate RPM spec or DEB dsc files from Python modules. It allows to list Python modules or search for them on the Python Package Index (PyPI). Conveniently, it can fetch tarballs and changelogs making it an universal tool to package Python modules. %package -n %{name}-doc Summary: Documentation for %{name} Provides: %{python_module py2pack-doc = %{version}} %description -n %{name}-doc Documentation and help files for %{name}. %prep %setup -q -n py2pack-%{version} %build %python_build python3 setup.py build_sphinx # remove the sphinx-build leftovers rm -rf doc/build/html/.{doctrees,buildinfo} %install %python_install %files %{python_files} %defattr(-,root,root,-) %python3_only %{_bindir}/py2pack %{python_sitelib}/py2pack-%{version}-py*.egg-info %{python_sitelib}/py2pack/ %files -n %{name}-doc %defattr(-,root,root,-) %doc AUTHORS LICENSE %doc doc/build/html/ %changelog