# project/ - holds a checkout of this repository
# i.e. fabfile.py and siblings live in that dir.
-# deps/ - holds all dependendencies that I have had to fork to add fixes,
-# or that don't have proper packages. These are all mirrored on
-# github or bitbucket under the account 'spookylukey'. Currently
-# - diff_match_patch from google
# usermedia/ - corresponds to MEDIA_ROOT
# secure_downloads/ - corresponds to SECUREDOWNLOAD_SERVE_ROOT
# project/ # uploaded from local
# static/ # built once uploaded
# current/ # symlink to src-???
# The path (relative to parent_dir) to where the project source code is stored:
-# The relative path to where the dependencies source code is stored (for those
-# not installed using pip)
usermedia_local = os.path.join(parent_dir, 'usermedia')
usermedia_production = os.path.join(webapps_root, 'cciw_usermedia')
- return [f for f in os.listdir(dirname)
- if os.path.isdir(join(dirname, f))]
-deps = _get_subdirs(join(parent_dir, deps_dir))
Represents a place where the project is deployed to.
# src_dir - the root of all sources for this version
# venv_dir - note that _update_virtualenv assumes this relative layout
- # of the 'env' dir and the 'project'
and 'deps' dir s.
+ # of the 'env' dir and the 'project' dir
self.venv_dir = join(self.src_dir, 'env')
# project_dir - where the CCIW project srcs are stored.
self.project_dir = join(self.src_dir, project_dir)
- # deps_dir - where additional dependencies are stored
- self.deps_dir = join(self.src_dir, deps_dir)
# static_dir - this is defined with way in settings.py
self.static_dir = join(self.src_dir, 'static')
- self.additional_sys_paths =
[join(deps_dir, d) for d in deps] + [project_dir]
+ self.additional_sys_paths = [project_dir]
django_app = "cciw_staging",
run_venv("pip install -r requirements.txt")
- # Need to add project and deps to path.
- # Could do 'python setup.py develop' but not all projects support it
+ # Need to add project to path.
pth_file = '\n'.join("../../../../" + n for n in version.additional_sys_paths)
with open(pth_name, "w") as fd:
- rsync_dir(deps_dir, version.deps_dir)