I am using poetry to create .whl files. I have an FTP sever running on a remote host. I wrote a Python script (log_revision.py
) which save in a database the git commit, few more parameters and in the end sends the .whl (that poetry created) to the remote server (each .whl in a different path in the server, the path is saved in the DB).
At the moment I run the script manually after each time I run the poetry build
command. I know the pyproject.toml
has the [tool.poetry.scripts]
but I don't know how I can use it to run a Python script.
I tried:
[tool.poetry.scripts]
my-script = "my_package_name:log_revision.py
and then poetry run my-script
but I always get an error:
AttributeError: module 'my_package_namen' has no attribute 'log_revision'
How can I run this command? As a short term option (without git and params) I tried to use poetry publish -r http://192.168.1.xxx/home/whl -u hello -p world
but I get the following error:
[RuntimeError]
Repository http://192.168.1.xxx/home/whl is not defined
What am I doing wrong and how can I fix it?