2025-02-07 19:03:19 +00:00
committed by Git OBS Bridge
commit c7dc106ef0
5 changed files with 111 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
.osc

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:b4fa3a7a0be38243123cf9d1f3518da10c51bdb165a2b2985566247f9155a7d3
size 209359

View File

@@ -0,0 +1,4 @@
-------------------------------------------------------------------
Mon Feb 3 16:09:44 UTC 2025 - Nico Krapp <nico.krapp@suse.com>
- initial packaging, v32.0.1

View File

@@ -0,0 +1,80 @@
#
# spec file for package python-pip-requirements-parser
#
# 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-pip-requirements-parser
Version: 32.0.1
Release: 0
Summary: Pip requirements parsing library
License: MIT
URL: https://github.com/nexB/pip-requirements-parser
Source: https://files.pythonhosted.org/packages/source/p/pip-requirements-parser/pip-requirements-parser-%{version}.tar.gz
BuildRequires: python-rpm-macros
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module setuptools_scm >= 4}
BuildRequires: %{python_module pip}
# SECTION test requirements
BuildRequires: %{python_module packaging}
BuildRequires: %{python_module pytest}
# /SECTION
BuildRequires: fdupes
Requires: python-packaging
Requires: python-pyparsing
BuildArch: noarch
%python_subpackages
%description
A mostly correct pip requirements parsing library because it uses pip's own code.
%package -n %{name}-doc
Summary: Documentation files for %name
BuildRequires: %{python_module Sphinx >= 5.0.2}
BuildRequires: %{python_module sphinx_rtd_theme}
%description -n %{name}-doc
Documentation files for %name
%prep
%autosetup -p1 -n pip-requirements-parser-%{version}
%build
%pyproject_wheel
pushd docs
make text
%install
%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
install -m 644 -D docs/build/text/skeleton-usage.txt %{buildroot}%{_docdir}/%{name}-doc/skeleton-usage.txt
%check
# skip tests because of wrong error message (https://github.com/aboutcode-org/pip-requirements-parser/issues/22)
skip="test_RequirementsFile_to_dict or test_RequirementsFile_dumps_unparse"
%pytest -k "not ($skip)"
%files %{python_files}
%license mit.LICENSE apache-2.0.LICENSE src/packaging_legacy_version.py.LICENSE.APACHE src/packaging_legacy_version.py.LICENSE.BSD
%{python_sitelib}/pip_requirements_parser.py
%pycache_only %{python_sitelib}/__pycache__/
%{python_sitelib}/pip_requirements_parser-%{version}.dist-info
%{python_sitelib}/packaging_legacy_version.py
%files -n %{name}-doc
%doc AUTHORS.txt CHANGELOG.rst README.rst src/packaging_legacy_version.py.ABOUT
%{_docdir}/%{name}-doc/skeleton-usage.txt
%changelog