commit c7dc106ef05f133ef2af1cd875df981bfcbaaa687d90459eddcc4b1ca3e939be Author: Matej Cepl Date: Fri Feb 7 19:03:19 2025 +0000 new package, needed for FawltyDeps OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pip-requirements-parser?expand=0&rev=1 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -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 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/pip-requirements-parser-32.0.1.tar.gz b/pip-requirements-parser-32.0.1.tar.gz new file mode 100644 index 0000000..5ac3eff --- /dev/null +++ b/pip-requirements-parser-32.0.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b4fa3a7a0be38243123cf9d1f3518da10c51bdb165a2b2985566247f9155a7d3 +size 209359 diff --git a/python-pip-requirements-parser.changes b/python-pip-requirements-parser.changes new file mode 100644 index 0000000..e8dbfcf --- /dev/null +++ b/python-pip-requirements-parser.changes @@ -0,0 +1,4 @@ +------------------------------------------------------------------- +Mon Feb 3 16:09:44 UTC 2025 - Nico Krapp + +- initial packaging, v32.0.1 diff --git a/python-pip-requirements-parser.spec b/python-pip-requirements-parser.spec new file mode 100644 index 0000000..72a96cc --- /dev/null +++ b/python-pip-requirements-parser.spec @@ -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