clikit icon indicating copy to clipboard operation
clikit copied to clipboard

Remove `clikit` dependency on `poetry` or vice versa

Open gpiks opened this issue 4 years ago • 4 comments

Referencing an issue from poetry: https://github.com/python-poetry/poetry/issues/1975

As per PEP517 circular references should be avoided with build dependencies.

For context: I need to be able to build a wheel from source and the circular dependency is preventing me from doing that.

Do you have a suggestions for breaking the cycle here?

gpiks avatar Mar 05 '20 21:03 gpiks

I am trying to distribute a home brew cli tool and this is just driving me crazy. Clikit needs poetry to be built, and poetry depends on clikit.. A true dead lock here.. Do you have any suggestions ?

MeteHanC avatar Apr 30 '20 11:04 MeteHanC

I wonder if we can just use setuptools to build clikit.

gpiks avatar May 05 '20 21:05 gpiks

You can use @dephell to convert pyproject.toml to setup.py .

Note it doesnt work (easily) on poetry' pyproject.toml - You need to edit its pyproject.toml c.f. https://github.com/dephell/dephell/issues/330 .

jayvdb avatar May 07 '20 10:05 jayvdb

I am trying to distribute a home brew cli tool and this is just driving me crazy. Clikit needs poetry to be built, and poetry depends on clikit.. A true dead lock here.. Do you have any suggestions ?

@MeteHanC clikit does not need poetry to be built. It just needs poetry-core. You can use any PEP 517 front end. For example, you can use pypa/build.

python -m pip install build
python -m build ./clikit

Alternatively, you can use core itself. Probably should get core to add a __main__.py at some point.

python -m pip install poetry-core
cd clikit
python -c "from poetry.core.masonry.api import build_wheel as b; b('.')"

abn avatar Apr 26 '22 12:04 abn