commit:     363c9acaad279261010253c3fe3b58b871d95a96
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Wed Aug  4 19:17:44 2021 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Wed Aug  4 19:35:00 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=363c9aca

dev-python/tomli: Fix circular dep with pyproject2setuppy

Write a trivial setup.py to avoid the circular dependency between
dev-python/tomli and dev-python/pyproject2setuppy.

Closes: https://bugs.gentoo.org/806396
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-python/tomli/tomli-1.0.4.ebuild | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/dev-python/tomli/tomli-1.0.4.ebuild 
b/dev-python/tomli/tomli-1.0.4.ebuild
index b35f22cf0cf..7ad7d69a48f 100644
--- a/dev-python/tomli/tomli-1.0.4.ebuild
+++ b/dev-python/tomli/tomli-1.0.4.ebuild
@@ -3,7 +3,6 @@
 
 EAPI=8
 
-DISTUTILS_USE_SETUPTOOLS=pyproject.toml
 PYTHON_COMPAT=( python3_{8..10} pypy3 )
 inherit distutils-r1
 
@@ -23,3 +22,13 @@ BDEPEND="
        test? ( dev-python/python-dateutil[${PYTHON_USEDEP}] )"
 
 distutils_enable_tests pytest
+
+src_prepare() {
+       # we don't use pyproject.toml to avoid circular deps
+       cat > setup.py <<-EOF || die
+               from setuptools import setup
+               setup(name="tomli", version="${PV}", packages=["tomli"], 
package_data={"": ["*"]})
+       EOF
+
+       distutils-r1_src_prepare
+}

Reply via email to