Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
H
heroku-buildpack-python
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Python-Dev
heroku-buildpack-python
Commits
e7495df1
Commit
e7495df1
authored
Aug 27, 2011
by
Noah Zoschke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
install bin/manage.py wrapper script for django, remove console process type
parent
c2f4f929
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
4 deletions
+12
-4
compile
bin/compile
+11
-2
release
bin/release
+1
-2
No files found.
bin/compile
View file @
e7495df1
...
@@ -33,14 +33,15 @@ done
...
@@ -33,14 +33,15 @@ done
echo
"-----> Preparing virtualenv version
$(
virtualenv
--version
)
"
echo
"-----> Preparing virtualenv version
$(
virtualenv
--version
)
"
virtualenv
--no-site-packages
.
|
sed
-u
's/^/ /'
virtualenv
--no-site-packages
.
|
sed
-u
's/^/ /'
echo
"-----> Byte-compiling code"
#
echo "-----> Byte-compiling code"
find
.
-name
"*.py"
| xargs bin/python
-m
py_compile
find
.
-name
"*.py"
|
grep
-v
bin/manage.py |
xargs bin/python
-m
py_compile
# if Django, inject psycopg and append settings
# if Django, inject psycopg and append settings
if
[
"
$NAME
"
=
"Python/Django"
]
;
then
if
[
"
$NAME
"
=
"Python/Django"
]
;
then
echo
"-----> Django settings injection"
echo
"-----> Django settings injection"
SETTINGS_FILE
=
$(
ls
**
/settings.py |
head
-1
)
SETTINGS_FILE
=
$(
ls
**
/settings.py |
head
-1
)
PROJECT
=
$(
dirname
$SETTINGS_FILE
)
echo
" Injecting code into
$SETTINGS_FILE
to read from DATABASE_URL"
echo
" Injecting code into
$SETTINGS_FILE
to read from DATABASE_URL"
cat
>>
$SETTINGS_FILE
<<
EOF
cat
>>
$SETTINGS_FILE
<<
EOF
...
@@ -58,6 +59,14 @@ if os.environ.has_key('DATABASE_URL'):
...
@@ -58,6 +59,14 @@ if os.environ.has_key('DATABASE_URL'):
'PORT': url.port,
'PORT': url.port,
}
}
EOF
EOF
echo
"-----> Django script installation"
cat
>
bin/manage.py
<<
EOF
#!/bin/bash
BIN_DIR=\
$(
cd
\$
(
dirname
\$
0
)
; pwd)
python \
$BIN_DIR
/../
$PROJECT
/manage.py \
$*
EOF
chmod
+x bin/manage.py
fi
fi
echo
"-----> Installing dependencies using pip version
$(
bin/pip
--version
|
awk
'{print $2}'
)
"
echo
"-----> Installing dependencies using pip version
$(
bin/pip
--version
|
awk
'{print $2}'
)
"
...
...
bin/release
View file @
e7495df1
...
@@ -26,5 +26,4 @@ addons:
...
@@ -26,5 +26,4 @@ addons:
default_process_types:
default_process_types:
web: bin/python
$PROJECT
/manage.py runserver 0.0.0.0:\
$PORT
--noreload
web: bin/python
$PROJECT
/manage.py runserver 0.0.0.0:\
$PORT
--noreload
console: bin/python
$PROJECT
/manage.py shell
EOF
EOF
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment