-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ENH: Add quack compilation to setup.py #1
Conversation
If a C compiler and Make are available, quack will be compiled and installed when running setup.py, otherwise the mac-update.sh script will fall-back to using osascript.
BTW, I'm all for making any changes to main.m, your C-fu is much more powerful than mine. |
Wow this is great, thanks @ElDeveloper ! I'm wondering if instead of keeping the automator script we could:
What do you think? |
Hmmm, what about 1) tries to compile, 2) tries to download binary and 3) On (Apr-03-15| 9:37), Santiago Torres wrote:
|
^ This would make sense 👍 Hosting the binary somewhere doesn't seem that much of a challenge. I'm thinking of a git hook on the server side and finding a way to compile OSX binaries. In the meantime we can get 1 and 3 to integrate this into the codebase ASAP and move 2) to a ticket. |
Ok, I've opened #2 |
tell application "Finder" | ||
set desktop picture to POSIX file "$1" | ||
end tell | ||
if quack -h &>/dev/null; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm wondering if test ([) is a better command for this.
if [ -e quack ]
then
....
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't think so:
yoshikivazquezbaeza:~$ ls quack
ls: quack: No such file or directory
yoshikivazquezbaeza:~$ which quack
/Library/Frameworks/Python.framework/Versions/2.7/bin/quack
yoshikivazquezbaeza:~$ if [ -e quack ]; then echo "plel"; else echo "lolercoaster"; fi
lolercoaster
In general it looks in good shape. My last comment is that mac-update.sh could be "deprecated" in the long run. We could instead change to quack as the definitive manager for the image and update it at configuration time by setting the update hook to be "quack -i {target}. |
Ready for another round. |
You have to trick it into thinking you are using a different background image.
FN=${1}-temp.jpg | ||
cp $1 $FN | ||
|
||
if quack -h &>/dev/null; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm still not completely convinced about this, it is not self-explanatory:
- Why quack -h?
- Are we testing that quack exists or that it runs successfully?
I'd rather go with an alternative that is self descriptive here:
if [-e $(which quack)]
...
or
if which quack
For that matter.
@ElDeveloper Guess that's all 💯 |
ENH: Add quack compilation to setup.py
Thanks! On (Apr-05-15|20:17), Santiago Torres wrote:
|
If a C compiler and Make are available, quack will be compiled and
installed when running setup.py, otherwise the mac-update.sh script will
fall-back to using osascript.