sdispater / clikit

CliKit is a group of utilities to build beautiful and testable command line interfaces.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

gpiks opened this issue · comments

Referencing an issue from poetry:
python-poetry/poetry#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?

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 ?

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

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. dephell/dephell#330 .

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('.')"