commit 236e233e0a4ae55d56221414573c2eca629afb27 Author: MSVSphere Packaging Team Date: Thu Feb 1 18:21:24 2024 +0300 import python-poetry-core-1.0.7-2.el9 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..760dd42 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/poetry-core-1.0.7.tar.gz diff --git a/.python-poetry-core.metadata b/.python-poetry-core.metadata new file mode 100644 index 0000000..4a8bd81 --- /dev/null +++ b/.python-poetry-core.metadata @@ -0,0 +1 @@ +c15928bd7a37829b50626005fcb57f40e478ead9 SOURCES/poetry-core-1.0.7.tar.gz diff --git a/SOURCES/poetry-core-1.0.2-devendor.patch b/SOURCES/poetry-core-1.0.2-devendor.patch new file mode 100644 index 0000000..c33054e --- /dev/null +++ b/SOURCES/poetry-core-1.0.2-devendor.patch @@ -0,0 +1,32 @@ +diff --git a/pyproject.toml b/pyproject.toml +index d55b844..822c584 100644 +--- a/pyproject.toml ++++ b/pyproject.toml +@@ -43,6 +43,13 @@ enum34 = {version = "^1.1.10", python = "~2.7"} + # required by tomlkit, jsonschema + functools32 = {version = "^3.2.3-2", python = "~2.7"} + ++# moved here from vendors/pyproject.toml ++jsonschema = "^3.2.0" ++lark-parser = "^0.9.0" ++packaging = "*" ++pyrsistent = ">=0.16.0,<0.19.0" ++tomlkit = ">=0.7.0,<1.0.0" ++ + [tool.poetry.dev-dependencies] + pre-commit = "^1.10" + pyrsistent = "^0.16.0" +diff --git a/vendors/pyproject.toml b/vendors/pyproject.toml +index 2671380..fb0b28e 100644 +--- a/vendors/pyproject.toml ++++ b/vendors/pyproject.toml +@@ -20,9 +20,3 @@ classifiers = [ + + [tool.poetry.dependencies] + python = "^3.6" +- +-jsonschema = "^3.2.0" +-lark-parser = "^0.9.0" +-packaging = "^20.9" +-pyrsistent = "^0.16.0" +-tomlkit = ">=0.7.0,<1.0.0" diff --git a/SPECS/python-poetry-core.spec b/SPECS/python-poetry-core.spec new file mode 100644 index 0000000..8288872 --- /dev/null +++ b/SPECS/python-poetry-core.spec @@ -0,0 +1,146 @@ +Name: python-poetry-core +Version: 1.0.7 +Release: 2%{?dist} +Summary: Poetry PEP 517 Build Backend + +# We bundle a lot of libraries with poetry, which itself is under MIT license. +# Here is the list of the libraries with corresponding licenses: + +# attrs: MIT +# jsonschema: MIT +# lark-parser: MIT +# packaging: ASL 2.0 or BSD +# pyparsing: MIT +# pyrsistent: MIT +# six: MIT +# tomlkit: MIT + +License: MIT and (ASL 2.0 or BSD) +URL: https://github.com/python-poetry/poetry-core +Source0: %{url}/archive/%{version}/poetry-core-%{version}.tar.gz + +# This patch moves the vendored requires definition +# from vendors/pyproject.toml to pyproject.toml +# Intentionally contains the removed hunk to prevent patch aging + +# poetry is broken with packaging 21+ (https://github.com/python-poetry/poetry/issues/4264). +# We are temporarily disabling this patch so installed poetry works again. +#Patch1: poetry-core-1.0.2-devendor.patch + +BuildArch: noarch +BuildRequires: python3-devel +BuildRequires: pyproject-rpm-macros + +# for tests (only specified via poetry poetry.dev-dependencies with pre-commit etc.) +BuildRequires: python3-pytest +BuildRequires: python3-pytest-mock +BuildRequires: python3-pep517 +BuildRequires: python3-virtualenv +BuildRequires: gcc +BuildRequires: git-core + + +%global _description %{expand: +A PEP 517 build backend implementation developed for Poetry. +This project is intended to be a light weight, fully compliant, self-contained +package allowing PEP 517 compatible build frontends to build Poetry managed +projects.} + +%description %_description + + +%package -n python3-poetry-core +Summary: %{summary} + +# Previous versions of poetry included poetry-core in it +Conflicts: python%{python3_version}dist(poetry) < 1.1 +# The bundled versions are taken from poetry/core/_vendor/vendor.txt +Provides: bundled(python3dist(attrs)) = 20.3 +Provides: bundled(python3dist(jsonschema)) = 3.2 +Provides: bundled(python3dist(lark-parser)) = 0.9 +Provides: bundled(python3dist(packaging)) = 20.9 +Provides: bundled(python3dist(pyparsing)) = 2.4.7 +Provides: bundled(python3dist(pyrsistent)) = 0.16.1 +Provides: bundled(python3dist(six)) = 1.15 +Provides: bundled(python3dist(tomlkit)) = 0.7 + +%description -n python3-poetry-core %_description + + +%prep +%autosetup -p1 -n poetry-core-%{version} + +# We sed out shebang from non-execeutable-script to fix rpmlint error. +# This can be removed once we again devendor python-poetry-core and +# the Patch1 is enabled again. +# Upstream PR: https://github.com/Julian/jsonschema/pull/833 +sed -i '1!b;/^#!/d' poetry/core/_vendor/jsonschema/benchmarks/issue232.py +sed -i '1!b;/^#!/d' poetry/core/_vendor/jsonschema/benchmarks/json_schema_test_suite.py + +%generate_buildrequires +%pyproject_buildrequires -r + + +%build +# we debundle the deps after we use the bundled deps in previous step to parse the deps 🤯 +#rm -r poetry/core/_vendor + +%pyproject_wheel + + +%install +%pyproject_install +%pyproject_save_files poetry + + +%check +# don't use %%tox here because tox.ini runs "poetry install" +# TODO investigate failures in test_default_with_excluded_data, test_default_src_with_excluded_data +%pytest -k "not with_excluded_data" + + +%files -n python3-poetry-core -f %{pyproject_files} +%doc README.md +%license LICENSE + + +%changelog +* Thu Feb 01 2024 MSVSphere Packaging Team - 1.0.7-2 +- Rebuilt for MSVSphere 9.3 + +* Fri Jan 21 2022 Fedora Release Engineering - 1.0.7-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Mon Nov 15 2021 Tomáš Hrnčiar - 1.0.7-1 +- Update to 1.0.7 + +* Fri Oct 01 2021 Tomáš Hrnčiar - 1.0.6-1 +- Update to 1.0.6 + +* Tue Sep 07 2021 Tomas Hrnciar - 1.0.4-1 +- Update to 1.0.4 + +* Thu Aug 19 2021 Tomas Hrnciar - 1.0.3-5 +- Bundle vendored libraries again, to fix poetry install + +* Fri Jul 23 2021 Fedora Release Engineering - 1.0.3-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Thu Jul 08 2021 Lumír Balhar - 1.0.3-3 +- Allow newer packaging version +- Allow newer pyrsistent version + +* Fri Jun 04 2021 Python Maint - 1.0.3-2 +- Rebuilt for Python 3.10 + +* Thu Apr 15 2021 Tomas Hrnciar - 1.0.3-1 +- Update to 1.0.3 + +* Thu Feb 25 2021 Tomas Hrnciar - 1.0.2-1 +- Update to 1.0.2 + +* Wed Jan 27 2021 Fedora Release Engineering - 1.0.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Mon Nov 02 2020 Miro Hrončok - 1.0.0-1 +- Initial package