Pbxproj | index /Users/featherless/workbench/ios/three20/src/scripts/Pbxproj.py

`Pbxproj.py
Working with the pbxproj file format is a pain in the ass.
This object provides a couple basic features for parsing pbxproj files:
* Getting a dependency list
* Adding one pbxproj to another pbxproj as a dependency
Version 1.0.
History:
1.0 - October 20, 2010: Initial hacked-together version finished. It is alive!
Created by Jeff Verkoeyen on 2010-10-18.
Copyright 2009-2010 Facebook
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.`

Modules
`` |  |
Paths hashlib | logging os | re sys |

Classes
`` |  | __builtin__.object Pbxproj
class Pbxproj(__builtin__.object)
`` |  | Methods defined here: __init__(self, name) `# Valid names # Three20 # Three20:Three20-Xcode3.2.5 # /path/to/project.xcodeproj/project.pbxproj` __str__(self) add_build_setting(self, configuration, setting_name, value) add_buildfile(self, name, file_ref_hash, default_guid) `# Add a line to the PBXBuildFile section. # # <default_guid> /* <name> in Frameworks */ = {isa = PBXBuildFile; fileRef = <file_ref_hash> /* <name> */; }; # # Returns: <default_guid> if a line was added. # Otherwise, the existing guid is returned.` add_dependency(self, dep) add_file_to_frameworks(self, name, guid) `# Add a file to the Frameworks PBXGroup. # # <guid> /* <name> */,` add_file_to_frameworks_phase(self, name, guid) add_filereference(self, name, file_type, default_guid, rel_path, source_tree) `# Add a line to the PBXFileReference section. # # <default_guid> /* <name> */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.<file_type>"; name = <name>; path = <rel_path>; sourceTree = <source_tree>; }; # # Returns: <default_guid> if a line was added. # Otherwise, the existing guid is returned.` add_framework(self, framework) add_header_search_path(self, configuration) dependencies(self) `# Get and cache the dependencies for this project.` get_hash_base(self, uniquename) get_project_data(self) `# Load the project data from disk.` guid(self) path(self) set_project_data(self, project_data) `# Write the project data to disk.` uniqueid(self) xcodeprojpath(self) `# A pbxproj file is contained within an xcodeproj file. # This method simply strips off the project.pbxproj part of the path.` Static methods defined here: get_pbxproj_by_name(name) Data descriptors defined here: __dict__ `dictionary for instance variables (if defined)` __weakref__ `list of weak references to the object (if defined)`

Functions
`` |  | commonpath(l1, l2, common=[]) pathsplit(p, rest=[]) `# The following relative path methods recyled from: # http://code.activestate.com/recipes/208993-compute-relative-path-from-one-directory-to-anothe/ # Author: Cimarron Taylor # Date: July 6, 2003` relpath(p1, p2)

Data
`` |  | pbxproj_cache = {}