From e227e016f37ff9300baa89324fbc8f408f4c042f Mon Sep 17 00:00:00 2001 From: "Liguros - Gitlab CI/CD [develop]" Date: Fri, 27 Jan 2023 00:47:57 +0000 Subject: Adding metadata --- dev-python/sip/files/sip-6.7.5-tomli.patch | 93 ++++++++++++++++++++++++++++++ dev-python/sip/sip-6.7.5-r1.ebuild | 44 ++++++++++++++ dev-python/sip/sip-6.7.5.ebuild | 34 ----------- 3 files changed, 137 insertions(+), 34 deletions(-) create mode 100644 dev-python/sip/files/sip-6.7.5-tomli.patch create mode 100644 dev-python/sip/sip-6.7.5-r1.ebuild delete mode 100644 dev-python/sip/sip-6.7.5.ebuild (limited to 'dev-python/sip') diff --git a/dev-python/sip/files/sip-6.7.5-tomli.patch b/dev-python/sip/files/sip-6.7.5-tomli.patch new file mode 100644 index 000000000000..c785e41f265a --- /dev/null +++ b/dev-python/sip/files/sip-6.7.5-tomli.patch @@ -0,0 +1,93 @@ +diff --git a/setup.py b/setup.py +index 586606d..312a431 100644 +--- a/setup.py ++++ b/setup.py +@@ -51,7 +51,7 @@ setup( + version=version, + license='SIP', + python_requires='>=3.7', +- install_requires=['packaging', 'ply', 'setuptools', 'toml'], ++ install_requires=['packaging', 'ply', 'setuptools', 'tomli; python_version<"3.11"'], + packages=find_packages(), + package_data={ + 'sipbuild.module': ['source/*/*'], +diff --git a/sip.egg-info/requires.txt b/sip.egg-info/requires.txt +index b465c08..8547535 100644 +--- a/sip.egg-info/requires.txt ++++ b/sip.egg-info/requires.txt +@@ -1,4 +1,4 @@ + packaging + ply + setuptools +-toml ++tomli; python_version<"3.11" +diff --git a/sipbuild/bindings_configuration.py b/sipbuild/bindings_configuration.py +index 8197e27..a942f3f 100644 +--- a/sipbuild/bindings_configuration.py ++++ b/sipbuild/bindings_configuration.py +@@ -22,11 +22,16 @@ + + + import os +-import toml ++import sys + + from .exceptions import UserFileException, UserParseException + from .module import resolve_abi_version + ++if sys.version_info >= (3, 11): ++ import tomllib ++else: ++ import tomli as tomllib ++ + + def get_bindings_configuration(abi_major, sip_file, sip_include_dirs): + """ Get the configuration of a set of bindings. """ +@@ -47,7 +52,8 @@ def get_bindings_configuration(abi_major, sip_file, sip_include_dirs): + + # Read the configuration. + try: +- cfg = toml.load(toml_file) ++ with open(toml_file, "rb") as f: ++ cfg = tomllib.load(f) + except Exception as e: + raise UserParseException(toml_file, detail=str(e)) + +diff --git a/sipbuild/pyproject.py b/sipbuild/pyproject.py +index 1ba2223..6e4a7c6 100644 +--- a/sipbuild/pyproject.py ++++ b/sipbuild/pyproject.py +@@ -22,11 +22,16 @@ + + + from collections import OrderedDict +-import toml ++import sys + + from .exceptions import UserFileException + from .py_versions import OLDEST_SUPPORTED_MINOR + ++if sys.version_info >= (3, 11): ++ import tomllib ++else: ++ import tomli as tomllib ++ + + class PyProjectException(UserFileException): + """ An exception related to a pyproject.toml file. """ +@@ -69,7 +74,8 @@ class PyProject: + self.toml_error = None + + try: +- self._pyproject = toml.load('pyproject.toml', _dict=OrderedDict) ++ with open('pyproject.toml', 'rb') as f: ++ self._pyproject = tomllib.load(f) + except FileNotFoundError: + self.toml_error = "there is no such file in the current directory" + except Exception as e: +@@ -174,4 +180,4 @@ class PyProject: + def _is_section(value): + """ Returns True if a section value is itself a section. """ + +- return isinstance(value, (OrderedDict, list)) ++ return isinstance(value, (OrderedDict, dict, list)) diff --git a/dev-python/sip/sip-6.7.5-r1.ebuild b/dev-python/sip/sip-6.7.5-r1.ebuild new file mode 100644 index 000000000000..e1f22b4354ec --- /dev/null +++ b/dev-python/sip/sip-6.7.5-r1.ebuild @@ -0,0 +1,44 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{7,8,9,10,11} ) +DISTUTILS_USE_PEP517=setuptools + +inherit distutils-r1 + +DESCRIPTION="Python bindings generator for C/C++ libraries" +HOMEPAGE=" + https://www.riverbankcomputing.com/software/sip/ + https://pypi.org/project/sip/ +" + +MY_P=${PN}-${PV/_pre/.dev} +if [[ ${PV} == *_pre* ]]; then + SRC_URI="https://dev.gentoo.org/~pesa/distfiles/${MY_P}.tar.gz" +else + SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${MY_P}.tar.gz" +fi +S=${WORKDIR}/${MY_P} + +LICENSE="|| ( GPL-2 GPL-3 SIP )" +SLOT="5" +KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~loong ppc ppc64 ~riscv ~sparc x86" + +RDEPEND=" + !