task icon indicating copy to clipboard operation
task copied to clipboard

Publish `task` as a Python package

Open sisp opened this issue 3 years ago • 6 comments

I'd love to use task as the task runner in a Python project without requiring developers to install task manually. In my opinion, it is much better to use task over the plethora of language-specific task runners because it tends to be more feature-rich than many alternatives (as far as I can tell) and can be used for projects independent of their programming languages across all major operating systems without requiring a runtime (like the Python interpreter) thanks to the compiled Go binaries. I'd hope that task would gain further adoption with additional language-native packages and development efforts would focus on this project rather than being scattered across the language-specific alternatives.

I believe a Python package could be created quite easily with some inspiration from the following projects:

  • https://github.com/shellcheck-py/shellcheck-py
  • https://github.com/editorconfig-checker/editorconfig-checker.python

Would you be open to accepting a contribution that adds support for publishing a Python package?

Related to #870.

sisp avatar Nov 16 '22 12:11 sisp

Hi @sisp,

I have zero experience with the Python world, so to even consider doing this I need some guidance from the community.

npm was easy because I'm more familiar with the JS world and the process was relative straightforward.

For anyone that would use this, please add your 👍 so we know how many would really use this.

andreynering avatar Nov 16 '22 16:11 andreynering

hi @andreynering @sisp I could help with this if interested. Would likely utilize poetry as the mechanism for publishing the package.

retr0h avatar Dec 03 '22 05:12 retr0h

@retr0h I do like Poetry for Python projects, but I don't think it's useful or even beneficial in this case. The projects I referenced build packages that essentially download the binary for the respective platform during installation of the package. This can be done nicely in setup.py but I don't quite see how it would be done with Poetry, or how Poetry would be better than using setup.py and twine (the standard publishing utility for Python) for publishing the package.

sisp avatar Dec 03 '22 07:12 sisp

@sisp Mostly b/c setup.py has better alternatives now days. Poetry can handle publishing packages as well and uses the modern day pyproject.toml file to support such efforts.

retr0h avatar Dec 08 '22 01:12 retr0h

@retr0h Old tools but widely adopted. There's nothing wrong with that. Anyway, how would you implement the code that downloads the binaries for the given platform and architecture during package installation with Poetry?

sisp avatar Dec 08 '22 06:12 sisp

I see a implement https://pypi.org/project/go-task-bin/#description

Undertone0809 avatar Oct 11 '23 19:10 Undertone0809