forked from pool/python-pkginfo
- update to 1.12.1.2:
* Fix *another* packaging error (more missing testcase data!).
LP #2098833
* Fix packaging error which prevents running tests from the
released sdist.
* Disuse the metadata of the installed 'pkginfo' package for
testing:
* during creation of the various 'tox' environments,
different versions of 'setuptools' will overwrite that file
with different metadata (version, 'Dynamic' headers, etc).
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pkginfo?expand=0&rev=30
This commit is contained in:
81
python-pkginfo.spec
Normal file
81
python-pkginfo.spec
Normal file
@@ -0,0 +1,81 @@
|
||||
#
|
||||
# spec file for package python-pkginfo
|
||||
#
|
||||
# Copyright (c) 2025 SUSE LLC
|
||||
#
|
||||
# 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 https://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
%{?sle15_python_module_pythons}
|
||||
Name: python-pkginfo
|
||||
Version: 1.12.1.2
|
||||
Release: 0
|
||||
Summary: Python package for querying metadatdata from sdists/bdists/installed packages
|
||||
License: MIT
|
||||
Group: Development/Languages/Python
|
||||
URL: https://pypi.python.org/pypi/pkginfo/
|
||||
Source: https://files.pythonhosted.org/packages/source/p/pkginfo/pkginfo-%{version}.tar.gz
|
||||
BuildRequires: %{python_module base >= 3.7}
|
||||
BuildRequires: %{python_module pip}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: %{python_module wheel}
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python-rpm-macros
|
||||
Requires: python-setuptools
|
||||
Requires(post): update-alternatives
|
||||
Requires(postun): update-alternatives
|
||||
BuildArch: noarch
|
||||
# SECTION test requirements
|
||||
BuildRequires: %{python_module pytest}
|
||||
BuildRequires: %{python_module wheel}
|
||||
# /SECTION
|
||||
%python_subpackages
|
||||
|
||||
%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}
|
||||
|
||||
%build
|
||||
%pyproject_wheel
|
||||
|
||||
%install
|
||||
%pyproject_install
|
||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||
%python_clone -a %{buildroot}%{_bindir}/pkginfo
|
||||
|
||||
%check
|
||||
# install wheel in tests with an explicit metadata version, looks like we have a different default (openSUSE-only)
|
||||
sed -iE "s/_make_installed('wheel')/_make_installed('wheel', metadata_version='2.3')/" pkginfo/tests/test_installed.py
|
||||
%pytest
|
||||
|
||||
%post
|
||||
%python_install_alternative pkginfo
|
||||
|
||||
%postun
|
||||
%python_uninstall_alternative pkginfo
|
||||
|
||||
%files %{python_files}
|
||||
%license LICENSE.txt
|
||||
%doc README.txt CHANGES.txt TODO.txt
|
||||
%python_alternative %{_bindir}/pkginfo
|
||||
%{python_sitelib}/pkginfo
|
||||
%{python_sitelib}/pkginfo-%{version}.dist-info
|
||||
|
||||
%changelog
|
||||
Reference in New Issue
Block a user