rockymeza/wifi

Install libraries only

Opened this issue · 7 comments

Thanks for the work. Is it possible to change the setup.py so that there is an option to only install the libraries?

Hi,

I'm a little confused, what do you not wish to install? I can think of three things, the libraries, the wifi command, and the bash completion. Why do you not want to install them?

I was hoping just to get the libraries without the wifi command or the bash completion.

The reason is because i think it's a useful library. I put together an arch AUR package for it, but discovered there is a conflict with the tlp package (which also provides a /usr/bin/wifi command). Since i figured someone wanting the library would be happy without the command, it would be cool to just be able to get the library.

When I first wrote this package with @gavinwahl, we only ever cared about the wifi command, we didn't really imagine anybody wanting the library. I suppose the could be used separately, but I'm not sure how to do that in the setup.py. Have you done this before? I would definitely be open to doing this. I would also be open to separating the command and the library completely, if you think that that would be better overall.

P.S. thank you for making the AUR package.

I'm afraid i don't really know python's setup.py at all. I was hoping it would be a quick fix for you guys :)

It's something i can look into though.

I suppose I could do this through an environment variable, something like:

$ WIFI_COMMAND=0 python setup.py install

I think that wouldn't clash with anything else. BUT, I would prefer that the wifi package in AUR actually did install everything that wifi includes. I would love in Arch users could install the wifi command using pacman too. That would be really cool. I was trying to think of different command names, so that they wouldn't clash with the ones from tlp, what do you think of wifi.py?

I don't think you can install Arch AUR packages via pacman, though you can
via alternatives such a yaourt. (The AUR is the user repo where anyone can
add anything, unregulated. You have to be promoted to a main repo to be
recognised by pacman.)

I think from a packaging point of view, it makes sense to have a separate
library and command package. In Arch, Python libraries are usually called
python-blah. It would be weird if this also put something in /usr/bin. Then
the wifi command could have a separate package and pull in the library as a
dependency.

However, if this was done by creating separate repositories, it means anyone
who wants to use the wifi command without a package manager has to clone two
repositories, which is a bit of a faff. Hence why i thought some kind of
command line option to setup.py would be a neat solution.

As for the command name, why not wifi.py :)

On Tue, Dec 23, 2014 at 04:18:25am -0800, Rocky Meza wrote:

I suppose I could do this through an environment variable, something like:

$ WIFI_COMMAND=0 python setup.py install

I think that wouldn't clash with anything else. BUT, I would prefer that
the wifi package in AUR actually did install everything that wifi
includes. I would love in Arch users could install the wifi command using
pacman too. That would be really cool. I was trying to think of different
command names, so that they wouldn't clash with the ones from tlp, what do
you think of wifi.py?

Reply to this email directly or view it on GitHub.

Link: #55 (comment)

Hi,

I know it's been a very long time, but I finally have a response to this: 8bda9d7

It allows you to override the name of the script during install using the WIFI_CLI_NAME environment argument.

I really wanted to use the name wifi.py, but I came against an import problem that makes it impossible to use.

I don't really want to change the default command name from wifi to something else, because it would affect the people who are already using it, but now, finally you can change the name.

I don't know if you are still interested anymore, but the code is in master if you want to play with it.