From 57d460cb5ff37380e5393e28166993fbc22f55c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Mon, 16 Nov 2020 22:09:12 +0100 Subject: [PATCH] Initial package (#1893732) --- .gitignore | 4 ++ poetry-core-1.0.0-devendor.patch | 30 +++++++++++++ python-poetry-core.spec | 77 ++++++++++++++++++++++++++++++++ sources | 1 + 4 files changed, 112 insertions(+) create mode 100644 .gitignore create mode 100644 poetry-core-1.0.0-devendor.patch create mode 100644 python-poetry-core.spec create mode 100644 sources diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..6715cb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +/poetry-core-*.tar.gz +/poetry-core-*/ +/results_*/ +*.rpm diff --git a/poetry-core-1.0.0-devendor.patch b/poetry-core-1.0.0-devendor.patch new file mode 100644 index 0000000..e2100f6 --- /dev/null +++ b/poetry-core-1.0.0-devendor.patch @@ -0,0 +1,30 @@ +diff --git a/pyproject.toml b/pyproject.toml +index 628cf48..83e2d14 100644 +--- a/pyproject.toml ++++ b/pyproject.toml +@@ -43,6 +43,12 @@ 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 = "^20.1" ++tomlkit = ">=0.7.0,<1.0.0" ++ + [tool.poetry.dev-dependencies] + pre-commit = "^1.10" + pytest = "^4.6" +diff --git a/vendors/pyproject.toml b/vendors/pyproject.toml +index 69ccbd0..fb0b28e 100644 +--- a/vendors/pyproject.toml ++++ b/vendors/pyproject.toml +@@ -20,8 +20,3 @@ classifiers = [ + + [tool.poetry.dependencies] + python = "^3.6" +- +-jsonschema = "^3.2.0" +-lark-parser = "^0.9.0" +-packaging = "^20.1" +-tomlkit = ">=0.7.0,<1.0.0" diff --git a/python-poetry-core.spec b/python-poetry-core.spec new file mode 100644 index 0000000..bd85845 --- /dev/null +++ b/python-poetry-core.spec @@ -0,0 +1,77 @@ +Name: python-poetry-core +Version: 1.0.0 +Release: 1%{?dist} +Summary: Poetry PEP 517 Build Backend +License: MIT +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 +Patch1: poetry-core-1.0.0-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 + + +%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 + +%description -n python3-poetry-core %_description + + +%prep +%autosetup -p1 -n poetry-core-%{version} + + +%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 +* Mon Nov 02 2020 Miro Hrončok - 1.0.0-1 +- Initial package diff --git a/sources b/sources new file mode 100644 index 0000000..7285c3b --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (poetry-core-1.0.0.tar.gz) = 56ed12e739fe761d59f539ecc6c05d8ad8bf2d8dbb3395910035230ac603d96981349cff6df783d9c761e716a3ac322a37d98ef47cbe82cc21174bf083cdf887