Skip to content

Instantly share code, notes, and snippets.

View epu's full-sized avatar

Erik M. Purins epu

View GitHub Profile

Xcode loads xcspec files (ascii plists) that specify everything (tools, buildphases, compilers, rules, etc) based on a set of conditions.

To evaluate these conditions you have to load these files and simulate the build process and construct your own "environment"

The target's build settings will help to resolve most of the environment variables by taking the basics from the particular platform you are using for the target (resolved from the SDKROOT value xcrun --show-sdk-platform-path --sdk)

when you load the spec of the compiler there is a key on it called "Options" which is an array of dictionaries that have

@epu
epu / p4 help commandments output
Created January 23, 2014 18:08
p4 help commandments <3
Texorami:Application Support erik$ p4 help commandments
P4 Commandments -- Values we work by
* We have high standards.
* We are straightforward.
* We rise to responsibility.
* We like work we can be proud of.
* We like to hear what we've done.
* We value both people and job skills.
@epu
epu / gist:7559669
Last active December 28, 2015 20:48
facepalm. on osx cpython 2.7.6, cannot get a zipfile info entry's extended attr to save as 0120755 for a real file, reverts to 0100755.
#ZIPFILE_CREATE_SYSTEM_FLAG can be 3 (posix/unix) or 19 (modern pk zip archives)
import zipfile
import os
import stat
import time
""" The following was use ok to write symlink directory entries into a .zipfile just fine.
But things got challenging when retrieving symlinks to files.
When iterating over file entries: