2011-11-28 17:27:08 +00:00
|
|
|
#
|
|
|
|
# spec file for package python-py
|
|
|
|
#
|
2020-01-06 12:57:39 +00:00
|
|
|
# Copyright (c) 2020 SUSE LLC
|
2011-11-28 17:27:08 +00:00
|
|
|
#
|
|
|
|
# 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.
|
2012-02-22 14:54:36 +00:00
|
|
|
|
2018-10-26 13:10:14 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2011-11-28 17:27:08 +00:00
|
|
|
#
|
|
|
|
|
2012-02-22 14:54:36 +00:00
|
|
|
|
2019-02-12 14:51:00 +00:00
|
|
|
%define oldpython python
|
2017-02-27 17:32:01 +00:00
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
2019-06-19 10:09:47 +00:00
|
|
|
%global flavor @BUILD_FLAVOR@%{nil}
|
|
|
|
%if "%{flavor}" == "test"
|
|
|
|
%define psuffix -test
|
|
|
|
%bcond_without test
|
|
|
|
%else
|
|
|
|
%define psuffix %{nil}
|
|
|
|
%bcond_with test
|
|
|
|
%endif
|
|
|
|
Name: python-py%{psuffix}
|
2020-06-29 10:13:17 +00:00
|
|
|
Version: 1.9.0
|
2011-11-28 17:27:08 +00:00
|
|
|
Release: 0
|
|
|
|
Summary: Library with cross-python path, ini-parsing, io, code, log facilities
|
2011-12-06 17:57:07 +00:00
|
|
|
License: MIT
|
2011-11-28 17:27:08 +00:00
|
|
|
Group: Development/Languages/Python
|
2018-10-26 13:10:14 +00:00
|
|
|
URL: https://github.com/pytest-dev/py
|
2017-07-04 09:57:16 +00:00
|
|
|
Source: https://files.pythonhosted.org/packages/source/p/py/py-%{version}.tar.gz
|
2018-08-07 07:41:04 +00:00
|
|
|
BuildRequires: %{python_module setuptools_scm}
|
2019-02-12 14:51:00 +00:00
|
|
|
BuildRequires: %{python_module setuptools}
|
2018-06-05 10:49:41 +00:00
|
|
|
BuildRequires: fdupes
|
2017-02-27 17:32:01 +00:00
|
|
|
BuildRequires: python-rpm-macros
|
2019-02-12 14:51:00 +00:00
|
|
|
Obsoletes: %{oldpython}-py-docs
|
2011-11-28 17:27:08 +00:00
|
|
|
BuildArch: noarch
|
2019-06-19 10:09:47 +00:00
|
|
|
%if %{with test}
|
|
|
|
BuildRequires: %{python_module pytest}
|
|
|
|
%endif
|
2017-02-27 17:32:01 +00:00
|
|
|
%python_subpackages
|
2011-11-28 17:27:08 +00:00
|
|
|
|
|
|
|
%description
|
|
|
|
The py lib is a Python development support library featuring
|
|
|
|
the following tools and modules:
|
|
|
|
|
|
|
|
* py.path: uniform local and svn path objects
|
|
|
|
* py.apipkg: explicit API control and lazy-importing
|
|
|
|
* py.iniconfig: easy parsing of .ini files
|
|
|
|
* py.code: dynamic code generation and introspection
|
|
|
|
* py.path: uniform local and svn path objects
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n py-%{version}
|
2019-02-15 11:19:51 +00:00
|
|
|
|
2017-07-04 09:57:16 +00:00
|
|
|
rm -rf py.egg-info
|
2019-02-12 14:51:00 +00:00
|
|
|
rm -f tox.ini
|
2019-02-15 11:19:51 +00:00
|
|
|
# https://github.com/pytest-dev/py/issues/162
|
2019-02-15 11:01:54 +00:00
|
|
|
rm -f testing/log/test_warning.py
|
2011-11-28 17:27:08 +00:00
|
|
|
|
|
|
|
%build
|
2017-02-27 17:32:01 +00:00
|
|
|
%python_build
|
2011-11-28 17:27:08 +00:00
|
|
|
|
|
|
|
%install
|
2019-06-19 10:09:47 +00:00
|
|
|
%if !%{with test}
|
2017-02-27 17:32:01 +00:00
|
|
|
%python_install
|
2018-06-05 10:49:41 +00:00
|
|
|
%python_exec %fdupes %{buildroot}%{$python_sitelib}
|
2019-06-19 10:09:47 +00:00
|
|
|
%endif
|
2011-11-28 17:27:08 +00:00
|
|
|
|
2019-02-12 14:51:00 +00:00
|
|
|
%check
|
2019-06-19 10:09:47 +00:00
|
|
|
%if %{with test}
|
2019-02-15 11:01:54 +00:00
|
|
|
export LANG=en_US.UTF-8
|
2019-02-15 11:19:51 +00:00
|
|
|
# the passing is because upstream does not care about the results for now and
|
|
|
|
# pinned pytest 3 in the repo (as this module is deprecated)
|
|
|
|
# https://github.com/pytest-dev/py/issues/209
|
2019-06-19 10:09:47 +00:00
|
|
|
%pytest || :
|
|
|
|
%endif
|
2019-02-12 14:51:00 +00:00
|
|
|
|
2019-06-19 10:09:47 +00:00
|
|
|
%if !%{with test}
|
2017-02-27 17:32:01 +00:00
|
|
|
%files %{python_files}
|
2018-06-05 10:49:41 +00:00
|
|
|
%doc README.rst
|
|
|
|
%license LICENSE
|
2011-11-28 17:27:08 +00:00
|
|
|
%{python_sitelib}/*
|
2019-06-19 10:09:47 +00:00
|
|
|
%endif
|
2011-11-28 17:27:08 +00:00
|
|
|
|
|
|
|
%changelog
|