1
0
forked from pool/python-distro
python-distro/python-distro.spec
2017-12-24 19:11:57 +00:00

69 lines
2.1 KiB
RPMSpec

#
# spec file for package python-distro
#
# 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-%{**}}
%{!?license: %global license %doc}
%bcond_without test
Name: python-distro
Version: 1.2.0
Release: 0
Summary: Linux Distribution - a Linux OS platform information API
License: Apache-2.0
Group: Development/Languages/Python
Url: https://github.com/nir0s/distro
Source: https://files.pythonhosted.org/packages/source/d/distro/distro-%{version}.tar.gz
BuildRequires: %{python_module devel}
BuildRequires: %{python_module setuptools}
BuildRequires: python-rpm-macros
# SECTION test
%if %{with test}
BuildRequires: %{python_module pytest}
%endif
# /SECTION
BuildArch: noarch
%python_subpackages
%description
distro (for: Linux Distribution) provides information about the Linux distribution it runs on, such as a reliable machine-readable ID, or version information.
It is a renewed alternative implementation for Python's original platform.linux_distribution function, but it also provides much more functionality which isn't necessarily Python bound like a command-line interface.
%prep
%setup -q -n distro-%{version}
%build
%python_build
%install
%python_install
%if %{with test}
%check
%python_exec setup.py test
%endif
%files %{python_files}
%defattr(-,root,root,-)
%doc CHANGES README.md README.rst
%python3_only %{_bindir}/distro
%{python_sitelib}/*
%%license LICENSE
%changelog