mirror of
https://github.com/facebook/proxygen.git
synced 2025-08-08 18:02:05 +03:00
getdeps: allow overriding project source, build, and install directories
Summary: Add arguments to getdeps.py to allow overriding the source, build, and install directories a per-project basis. The arguments take the form `[PROJECT:]PATH` If the `PROJECT` portion is omitted, it defaults to the current project being built. In particular this makes it possible to specify `--src-dir .` to tell getdeps.py to find the project sources from the current directory rather than downloading them. Reviewed By: wez Differential Revision: D16778011 fbshipit-source-id: f33b87213ace04abb66334f588babdf59df91964
This commit is contained in:
committed by
Facebook Github Bot
parent
fb5f217226
commit
a412d9a8a0
@@ -130,6 +130,26 @@ class Fetcher(object):
|
||||
pass
|
||||
|
||||
|
||||
class LocalDirFetcher(object):
|
||||
""" This class exists to override the normal fetching behavior, and
|
||||
use an explicit user-specified directory for the project sources.
|
||||
|
||||
This fetcher cannot update or track changes. It always reports that the
|
||||
project has changed, forcing it to always be built. """
|
||||
|
||||
def __init__(self, path):
|
||||
self.path = os.path.realpath(path)
|
||||
|
||||
def update(self):
|
||||
return ChangeStatus(all_changed=True)
|
||||
|
||||
def hash(self):
|
||||
return "0" * 40
|
||||
|
||||
def get_src_dir(self):
|
||||
return self.path
|
||||
|
||||
|
||||
class GitFetcher(Fetcher):
|
||||
DEFAULT_DEPTH = 100
|
||||
|
||||
|
Reference in New Issue
Block a user