-
Notifications
You must be signed in to change notification settings - Fork 137
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
master: Add linux support to setup.py #173
Conversation
Distutils/setup.py runs into potential problems when there is both a module mkchromecast and a script mkchromecast. Resolve issue by moving script to new location bin/. Drop the .py suffix since it is a script and make it 755. Add sys.path code to make it run both when installed and git-cloned. The shebang is problematic. /usr/bin/python is wrong on most platforms, since this is a python3 script. Updating to /usr/bin/python3 which should be fine in many but not all cases - the upstream python packages just installs /usr/bin/python3.6 etc., not python3. When the shebang fails, invocations like "python3.6 scripts/mkchromecast" will always work (and should be documented somewhere). Packaging toolchains typically patches the shebang as required, so this is less of a problem in downstream packaging.
Add code to use setup.py also on Linux platforms. This is basically to move installation code from the Debian packaging to the upstream package. It makes the package a standard python package with correct locations and will make maintenance as well as packaging on other distros simpler.
oops.. this will not work without moving mkchromecast.py to bin/mkchromecast. A patch of same commit as in #173 but rebased to devel is available at https://paste.fedoraproject.org/paste/Y3zjc79vuHoBpaUW3qhhlg (silly github does not support attached patches). |
I think it was moved:
|
I have to look at it in more details. |
Ouch... although I had a bad feeling not being able to test, this indeed lookks strange. Are you sure the previous commit (with the old setup.py) works, or is it an unrelated external change in the environment? |
yeap, it worked before. |
Wish I could help since it's my mess, but alas... Just an idea: tried packages: ['Mkchromecast'] instead of package: since it seemingly chokes on package:? |
BTW, but most likely unrelated: I forgot to nuke the bad shebang. |
Glad that you fixed it. Also glad it wasn't me;) I never touched the Makefile, and package: is just not supported by distutils these days: https://docs.python.org/3.6/distutils/apiref.html. I have seen some other changes like this breaking things lately. |
This PR is the underpinnings in master for #170 and #172. Basically, it makes mkchromecast to a complete pypi package on the Linux side, installable using pip3 and related tools. This simplifies things for both packagers and users on platforms without a native package.
If/when this PR is accepted, #170 and #172 need to be rebased to the new master before being merged, but that is a later issue. Basically, this PR is first part of #172.
The PR contains untested changes with respect to MacOS builds. So, please verify this before merging!