LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File python-base36.spec of Package python-base36 (Project home:smarty12:Python)

# spec file for package python-base36
# Copyright (c) 2018 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_without test

%define pyname python-base36

Name:           python-base36
Version:        0.1.1
Release:        0
Summary:        Yet another implementation for the positional numeral system using 36 as the radix
License:        MIT
Group:          Development/Languages/Python
Url:            https://github.com/ikalchev/HAP-python
Source0:        %{pyname}-%{version}.tar.xz
Patch0:         fix-pytest-cfg.patch
BuildRequires:  python-rpm-macros
BuildRequires:  %{python_module devel}
BuildRequires:  %{python_module setuptools}
BuildRequires:  %{python_module packaging}
BuildRequires:  fdupes

%if %{with test}
BuildRequires:  %{python_module virtualenv >= 14.0.0}
BuildRequires:  %{python_module pytest}
BuildRequires:  %{python_module pytest-pep8}
BuildRequires:  %{python_module pytest-cov}
BuildRequires:  %{python_module tox}
BuildArch:      noarch


Yet another implementation for the positional numeral system using 36 as the radix.

%setup -q -n %{pyname}-%{version}
%patch0 -p1


%python_expand %fdupes %{buildroot}%{$python_sitelib}

%if %{with test}
%{python_expand virtualenv-%$python_bin_suffix --system-site-packages --no-download testvenv-%$python_bin_suffix
testvenv-%$python_bin_suffix/bin/pip install -e .[test,build]
export PYTHONPATH=$PWD/testvenv-%$python_bin_suffix/lib/python%$python_bin_suffix/site-packages/:$PWD
testvenv-%$python_bin_suffix/bin/python -m pytest && rm -Rf testvenv-%$python_bin_suffix

%files %{python_files}
%license LICENSE
%doc README.rst