Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 2 additions & 37 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -103,50 +103,15 @@ TPT=third_party.zip.d.tmp
third_party:
make -C third_party

third_party.zip.d: third_party third_party.paths
@echo "Generating a third_party.zip dependency file."
@echo "THIRD_PARTY_files=\\" > $(TPT).files
@echo 'third_party.zip: third_party.zip.d $$(THIRD_PARTY_here)' > $(TPT).target
@echo ' @echo Changed files: $$?' >> $(TPT).target
@cd third_party; \
cat ../third_party.paths | grep ^third_party.zip | sed -e's-third_party.zip/--' | (while read LINE; do \
PREFIX=$${LINE%% *}; \
for SUFFIX in $${LINE#* }; do \
find $$PREFIX/$$SUFFIX $(FINDARGS) >> ../$(TPT).files; \
echo " cd $(CURDIR)/third_party/$$PREFIX; zip -r $(CURDIR)/third_party.zip \\" >> ../$(TPT).target; \
(cd $$PREFIX; find $$SUFFIX $(FINDARGS)) >> ../$(TPT).target; \
echo " " >> ../$(TPT).target; \
done; \
done)
@echo '' >> $(TPT).files
@echo 'THIRD_PARTY_here=$$(addprefix third_party/,$$(THIRD_PARTY_files)) ' >> $(TPT).files
@echo '' >> $(TPT).files

@echo '' > $(TPT)
@cat $(TPT).files >> $(TPT)
@cat $(TPT).target >> $(TPT)

@if [ ! -e $@ ]; then touch $@; fi
@if [ `${MD5SUM} $@ | sed -e's/ .*//'` != `${MD5SUM} $(TPT) | sed -e's/ .*//'` ]; then \
echo "third_party.zip.d has changed!"; \
mv $(TPT) $@; \
else \
echo "third_party.zip.d has not changed!"; \
fi
@rm $(TPT)*


include third_party.zip.d

###############################################################################
###############################################################################

upload: update
deploy: update
update: third_party.zip
update:
${APPENGINE_SDK}/appcfg.py update .

serve: third_party.zip
serve:
${APPENGINE_SDK}/dev_appserver.py -a 0.0.0.0 -d --enable_sendmail .

clean:
Expand Down
3 changes: 1 addition & 2 deletions app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,9 @@ handlers:
script: handler.py

skip_files:
- third_party/((?!(aeoid|python-gae-pytz)).*)/
- third_party/python-gae-pytz/(?!pytz)
- third_party/aeoid/demo
- third_party/mkzip
- third_party/python-markdown/tests
- (.*/)*.git/
- .*/\..*
- .*/README
8 changes: 1 addition & 7 deletions config.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ def sys_path_insert(ipath):
if ipath not in sys.path:
sys.path.insert(0, ipath)


def setup_django():
"""Setup the django settings."""
os.environ['DJANGO_SETTINGS_MODULE'] = 'settings'
Expand All @@ -52,10 +51,8 @@ def setup(host=None):
HOST = host

# Add our extra modules to sys.path
sys_path_insert('third_party.zip')
sys_path_insert('third_party')
for ipath in getpaths():
if 'third_party.zip' in ipath:
continue
sys_path_insert(ipath)

setup_django()
Expand All @@ -70,9 +67,6 @@ def lint_setup():
print "APPENGINE_SDK at ", os.environ["APPENGINE_SDK"]
sys_path_insert(os.environ["APPENGINE_SDK"])

for ipath in getpaths():
sys_path_insert(ipath.replace('.zip', ''))

setup_django()

if __name__ == "__main__":
Expand Down
12 changes: 6 additions & 6 deletions third_party.paths
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
third_party/aeoid
third_party/python-gae-pytz
# Directory to add to sys.path, things to include in third_party.zip
third_party.zip/python-dateutil dateutil
third_party.zip/python-datetime-tz datetime_tz.py pytz_abbr.py
third_party.zip/python-markdown markdown
third_party.zip/python-markdown-extensions markdown
third_party.zip/python-pyrss2gen PyRSS2Gen.py
third_party.zip/python-vobject vobject
third_party/python-dateutil dateutil
third_party/python-datetime-tz datetime_tz.py pytz_abbr.py
third_party/python-markdown markdown
third_party/python-markdown-extensions markdown
third_party/python-pyrss2gen PyRSS2Gen.py
third_party/python-vobject vobject