git.net

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[poetry] Entry points not converted to scripts


"Loris Bennett" <loris.bennett at fu-berlin.de> writes:

> Hi,
>
> I'm using poetry and in my pyproject.toml I have
>
>   [tool.poetry.scripts]
>   batchmon = "batch_monitor.main:main"
>
> I build the package with
>
>   poetry build
>
> and then install with
>
>   pip3 install --target=/home/loris/test/lib/python-3.6/site-packages
>   --install-option="--install-scripts=/home/loris/test/bin"
>   /home/loris/gitlab/batch_monitor/dist/batch_monitor-0.2.0-py3-none-any.whl
>   --upgrade
>
> The package is installed OK in the target directory, but the 'bin'
> directory remains empty.
>
> Am I wrong in assuming that some sort of command-line script should be
> automatically created in 'bin' or am I just doing something wrong?
>
> Either way, how should I proceed?

I have worked out that

  poetry install

will create the script in 

  ~/.cache/pypoetry/virtualenvs/batch-monitor-JsZvz0Fs-py3.6/bin/batchmon

and that 

  export PYTHONUSERBASE=/home/loris/test
  pip3 install --user /home/loris/gitlab/batch_monitor/dist/batch_monitor-0.2.0-py3-none-any.whl --upgrade

installs things as expected.  I then just need

 export PYTHONPATH=/home/loris/test/lib/python3.6/site-packages

to get the scripts to run.

Cheers,

Loris

-- 
This signature is currently under construction.