Skip to content

Commit

Permalink
Merge pull request #358 from Kegbot/mikey/django-update
Browse files Browse the repository at this point in the history
Update to Django 1.11
  • Loading branch information
mik3y authored Jun 25, 2017
2 parents 33258dd + cecea0a commit 794c5dc
Show file tree
Hide file tree
Showing 111 changed files with 2,029 additions and 2,636 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
*.egg
*.egg-info
.coverage
.noseids

### docs
docs/build
Expand Down
17 changes: 7 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
language: python
python:
- "2.7"
sudo: false

install:
- pip install -r requirements.txt
- pip install -r test_requirements.txt
- pip install coverage coveralls
cache: pip

services:
- redis-server
Expand All @@ -17,14 +15,13 @@ before_script:
- mkdir -p ~/kegbot-data/static
- mkdir -p ~/.kegbot/
- cp deploy/travis/local_settings.py ~/.kegbot/
- pip freeze
- flake8 --version

script:
- kegbot test --traverse-namespace --first-package-wins --with-coverage --cover-package=pykeg
install:
- pip install -r requirements.txt
- pip install .

after_success:
- coveralls
script:
- kegbot test --traverse-namespace --first-package-wins

deploy:
provider: pypi
Expand Down
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
include README.md
include LICENSE.txt
include pykeg/setup.cfg
recursive-include pykeg *.html *.css *.js *.png
recursive-include deploy *
45 changes: 23 additions & 22 deletions bin/kegbot
Original file line number Diff line number Diff line change
Expand Up @@ -29,29 +29,30 @@ from pykeg.core.util import get_version
from pykeg.util import bugreport

if sys.version_info < (2, 7):
sys.stderr.write('Error: Kegbot needs Python 2.7 or newer.\n\n'
'Current version: %s\n' % sys.version)
sys.exit(1)
sys.stderr.write('Error: Kegbot needs Python 2.7 or newer.\n\n'
'Current version: %s\n' % sys.version)
sys.exit(1)

if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "pykeg.settings")
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "pykeg.settings")

# Override some special commands.
if len(sys.argv) > 1:
cmd = sys.argv[1]
if cmd == 'version':
# Hack: Django's `version` command cannot be overridden the usual way.
print 'kegbot-server {}'.format(get_version())
sys.exit(0)
elif cmd == 'run_gunicorn':
# run_gunicorn was deprecated upstream.
cmd = 'gunicorn pykeg.web.wsgi:application {}'.format(' '.join(sys.argv[2:]))
sys.stderr.write('Warning: run_gunicorn is deprecated, call `{}` instead.\n'.format(cmd))
ret = subprocess.call(cmd, shell=True)
sys.exit(ret)
elif cmd == 'bugreport':
ret = bugreport.take_bugreport()
sys.exit(ret)
# Override some special commands.
if len(sys.argv) > 1:
cmd = sys.argv[1]
if cmd == 'version':
# Hack: Django's `version` command cannot be overridden the usual way.
print 'kegbot-server {}'.format(get_version())
sys.exit(0)
elif cmd == 'run_gunicorn':
# run_gunicorn was deprecated upstream.
cmd = 'gunicorn pykeg.web.wsgi:application {}'.format(' '.join(sys.argv[2:]))
sys.stderr.write(
'Warning: run_gunicorn is deprecated, call `{}` instead.\n'.format(cmd))
ret = subprocess.call(cmd, shell=True)
sys.exit(ret)
elif cmd == 'bugreport':
ret = bugreport.take_bugreport()
sys.exit(ret)

django.setup()
management.execute_from_command_line()
django.setup()
management.execute_from_command_line()
Loading

0 comments on commit 794c5dc

Please sign in to comment.