2014-02-04 13:41:12 +01:00
|
|
|
#
|
|
|
|
# spec file for package python-pkginfo
|
|
|
|
#
|
2018-05-20 18:41:20 +02:00
|
|
|
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
|
2014-02-04 13:41:12 +01: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.
|
|
|
|
|
2018-12-04 14:47:24 +01:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2014-02-04 13:41:12 +01:00
|
|
|
#
|
|
|
|
|
|
|
|
|
2018-12-04 18:18:22 +01:00
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
2017-04-19 18:14:06 +02:00
|
|
|
# Tests are currently broken.
|
2018-05-20 18:41:20 +02:00
|
|
|
%bcond_without tests
|
2014-02-04 13:41:12 +01:00
|
|
|
Name: python-pkginfo
|
2018-05-20 18:41:20 +02:00
|
|
|
Version: 1.4.2
|
2014-02-04 13:41:12 +01:00
|
|
|
Release: 0
|
|
|
|
Summary: Query metadatdata from sdists / bdists / installed packages
|
2017-04-19 18:14:06 +02:00
|
|
|
License: MIT
|
2014-02-04 13:41:12 +01:00
|
|
|
Group: Development/Languages/Python
|
2018-12-04 18:18:22 +01:00
|
|
|
URL: http://pypi.python.org/pypi/pkginfo/
|
2017-04-19 18:14:06 +02:00
|
|
|
Source: https://files.pythonhosted.org/packages/source/p/pkginfo/pkginfo-%{version}.tar.gz
|
|
|
|
BuildRequires: %{python_module setuptools}
|
2018-05-20 18:41:20 +02:00
|
|
|
BuildRequires: fdupes
|
|
|
|
BuildRequires: python-rpm-macros
|
2018-12-04 18:18:22 +01:00
|
|
|
Requires(post): update-alternatives
|
|
|
|
Requires(preun): update-alternatives
|
|
|
|
BuildArch: noarch
|
2017-04-19 18:14:06 +02:00
|
|
|
%if %{with tests}
|
|
|
|
BuildRequires: %{python_module nose}
|
|
|
|
%endif
|
|
|
|
%python_subpackages
|
2014-02-04 13:41:12 +01:00
|
|
|
|
|
|
|
%description
|
|
|
|
This package provides an API for querying the distutils metadata written in
|
|
|
|
the PKG-INFO file inside a source distriubtion (an sdist) or a
|
|
|
|
binary distribution (e.g., created by running bdist_egg). It can
|
|
|
|
also query the EGG-INFO directory of an installed distribution, and
|
|
|
|
the *.egg-info stored in a "development checkout"
|
|
|
|
(e.g, created by running setup.py develop).
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n pkginfo-%{version}
|
2018-05-20 18:41:20 +02:00
|
|
|
# fix tests until fixed upstream
|
|
|
|
sed -i 's|1\.1|2.1|' pkginfo/tests/__init__.py
|
|
|
|
sed -i "s|'1\.1'|None|" pkginfo/tests/test_installed.py
|
2014-02-04 13:41:12 +01:00
|
|
|
|
|
|
|
%build
|
2017-04-19 18:14:06 +02:00
|
|
|
%python_build
|
2014-02-04 13:41:12 +01:00
|
|
|
|
|
|
|
%install
|
2017-04-19 18:14:06 +02:00
|
|
|
%python_install
|
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
|
|
|
%python_clone -a %{buildroot}%{_bindir}/pkginfo
|
|
|
|
|
|
|
|
%if %{with tests}
|
|
|
|
%check
|
|
|
|
%{python_expand $python setup.py develop --user
|
|
|
|
$python setup.py test -q
|
|
|
|
}
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%post
|
|
|
|
%python_install_alternative pkginfo
|
|
|
|
|
|
|
|
%preun
|
|
|
|
%python_uninstall_alternative pkginfo
|
2014-02-04 13:41:12 +01:00
|
|
|
|
2017-04-19 18:14:06 +02:00
|
|
|
%files %{python_files}
|
2018-12-04 18:18:22 +01:00
|
|
|
%license LICENSE.txt
|
|
|
|
%doc README.txt CHANGES.txt TODO.txt
|
2017-04-19 18:14:06 +02:00
|
|
|
%python_alternative %{_bindir}/pkginfo
|
2014-02-04 13:41:12 +01:00
|
|
|
%{python_sitelib}/pkginfo
|
2017-04-19 18:14:06 +02:00
|
|
|
%{python_sitelib}/pkginfo-%{version}-py*.egg-info
|
2014-02-04 13:41:12 +01:00
|
|
|
|
|
|
|
%changelog
|