ephraim / lcurse

Python script to have a "curse" compatible client for linux
The Unlicense
51 stars 23 forks source link

Added setup.py #52

Closed cameronjphillips closed 7 years ago

cameronjphillips commented 7 years ago

Created a setup.py to allow installing.

ephraim commented 7 years ago

Sorry for the late response. What if I don't want to call setup.py prior execution? Would it still find the modules? What is the benefit of having a setup.py? Currently you clone and execute, but with setup.py you need to clone, install and execute. So one step more.

adbjesus commented 7 years ago

What is the benefit of having a setup.py?

At least from my point of view it facilitates packaging, I created a package on the arch user repository https://aur.archlinux.org/packages/lcurse-git/, and without setup.py it is significantly harder to do. I am currently using Darexon's fork on that package because of this. Furthermore, it would allow you to easily add the package to PyPI so that people can simply install it with pip without the need to clone the repo:

$ pip install lcurse

What if I don't want to call setup.py prior execution? Would it still find the modules?

@Darexon solution doesn't allow to simply clone and run the executable without installing but a simple solution could be to:

  1. Rename lcurse binary to lcurse.py
  2. Rename modules folder to lcurse

This way one could run the lcurse.py executable normally, and still allow setup.py installation if desired.

ephraim commented 7 years ago

Renaming lcurse to lcurse.py isn't needed to execute it. But the renaming of the modules folder.

So IMHO, when installing, the renaming should happen in setup.py not in the repo. Sorry but I will not pull this patch like this. Change the patch so that lcurse can still be executed from repo and setup.py does the installing stuff. Then I will accept it.

cameronjphillips commented 7 years ago

I have updated the pull request to call the package "modules" and that will allow both executing from the repo and installing.

ephraim commented 7 years ago

Thanks! :)