#๐Ÿ”’ global command as pip package

38 messages ยท Page 1 of 1 (latest)

kindred yarrow
#

Hey while back i have created this package that me and my friends use to see how should clean what https://pypi.org/project/pratac/
but recently i wanted to make an update to 0.3 version and i uninstalled it. Now when I pip intall it it is not recognized as a global command and i do not know what really happened as it worked like a charm before a simple pip intall and you good to go. Any ideas why it is not recognized as a global command in terminal?

coarse hollyBOT
#

@kindred yarrow

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

wheat hawk
#

is there a working github link for this?

#

the one in the README doesn't work

#

the LICENSE link doesn't work either

fossil magnet
#

send a screenshot

wheat hawk
#

of what

fossil magnet
#

oh nvm

#

i thought he was having problems with pip

prime pulsar
#

but of course I can't know for sure since version 0.3 isn't posted

wheat hawk
#

why would having a pyproject.toml be a problem?

kindred yarrow
wheat hawk
#

oh, they're using different build back-ends

kindred yarrow
#

Yes this is the github link for this

prime pulsar
wheat hawk
#

you should update the working links to README

prime pulsar
kindred yarrow
wheat hawk
#

and you need to decide if you want to use poetry or setuptools as the build back-end

#

can't use both

#

personally I can't recommend poetry for projects like these

#

setuptools or hatchling are better fits IMHO

prime pulsar
#

personally I use poetry for everything, but it's not a big deal either way

kindred yarrow
#

okey so what would be easier because right now i was using poetry for the development and then when i wanted to release i used

python -m build
twine upload dist/*
prime pulsar
#

poetry can both build and publish, btw

#

but anyway, it seems to me that all you need is a poetry script entry in pyproject.toml, and then the setup.* can go

#

oh, and also fix the version to be 0.3

kindred yarrow
#

okey i will add

[tool.poetry.scripts]
pratac = "pratac.__main__:main"
#

okey i published it with version 0.3.1

#

thanks i didnt know that the poetry publishing was so ez not it works

#

also edited the link thank you guys โค๏ธ

wheat hawk
#

@kindred yarrow wouldn't you want GitHub CI to also do the publishing for you?

#

trusted publishing is the recommended method for this

#

all my repos are set to publish when a matching tag is pushed

kindred yarrow
#

what do you mean by matching tag? so when i commit something to main branch it automatically publishes?

coarse hollyBOT
#
Python help channel closed

This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.