From eaaba665bcc1f9cae908b7c7d901504d79d3f698 Mon Sep 17 00:00:00 2001 From: cclauss Date: Sun, 11 May 2014 22:23:24 +0200 Subject: [PATCH 01/19] Added django 1.6 skeleton for testing --- test/django-1.6-skeleton/manage.py | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 test/django-1.6-skeleton/manage.py diff --git a/test/django-1.6-skeleton/manage.py b/test/django-1.6-skeleton/manage.py new file mode 100644 index 0000000..cf7427b --- /dev/null +++ b/test/django-1.6-skeleton/manage.py @@ -0,0 +1,10 @@ +#!/usr/bin/env python +import os +import sys + +if __name__ == "__main__": + os.environ.setdefault("DJANGO_SETTINGS_MODULE", "haystack.settings") + + from django.core.management import execute_from_command_line + + execute_from_command_line(sys.argv) From bf084cc2acd111a4e4cd7a29aeac239f59cb86fc Mon Sep 17 00:00:00 2001 From: cclauss Date: Sun, 11 May 2014 22:24:44 +0200 Subject: [PATCH 02/19] Added django 1.6 skeleton for testing --- test/django-1.6-skeleton/requirements.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 test/django-1.6-skeleton/requirements.txt diff --git a/test/django-1.6-skeleton/requirements.txt b/test/django-1.6-skeleton/requirements.txt new file mode 100644 index 0000000..e093146 --- /dev/null +++ b/test/django-1.6-skeleton/requirements.txt @@ -0,0 +1 @@ +django==1.6 From 42a7e7935995c06ab60b7ab125d8998b6c350c1b Mon Sep 17 00:00:00 2001 From: cclauss Date: Sun, 11 May 2014 22:26:20 +0200 Subject: [PATCH 03/19] Added django 1.6 skeleton for testing --- test/django-1.6-skeleton/haystack/__init__.py | 1 + 1 file changed, 1 insertion(+) create mode 100644 test/django-1.6-skeleton/haystack/__init__.py diff --git a/test/django-1.6-skeleton/haystack/__init__.py b/test/django-1.6-skeleton/haystack/__init__.py new file mode 100644 index 0000000..3824d6c --- /dev/null +++ b/test/django-1.6-skeleton/haystack/__init__.py @@ -0,0 +1 @@ +https://github.com/cclauss/heroku-buildpack-python-1/new/master/test/django-1.6-skeleton/haystack From 656f390de86616524f2f557cf28021e1b677ef62 Mon Sep 17 00:00:00 2001 From: cclauss Date: Sun, 11 May 2014 22:27:15 +0200 Subject: [PATCH 04/19] Added django 1.6 skeleton for testing --- test/django-1.6-skeleton/haystack/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/django-1.6-skeleton/haystack/__init__.py b/test/django-1.6-skeleton/haystack/__init__.py index 3824d6c..8d1c8b6 100644 --- a/test/django-1.6-skeleton/haystack/__init__.py +++ b/test/django-1.6-skeleton/haystack/__init__.py @@ -1 +1 @@ -https://github.com/cclauss/heroku-buildpack-python-1/new/master/test/django-1.6-skeleton/haystack + From 99f7f5b9f1a41eb56025eca4a576af5c0c8fd9a1 Mon Sep 17 00:00:00 2001 From: cclauss Date: Sun, 11 May 2014 22:27:31 +0200 Subject: [PATCH 05/19] Update __init__.py From ff1e8da0cb36dd169e192c861c2dfe207dc6e889 Mon Sep 17 00:00:00 2001 From: cclauss Date: Sun, 11 May 2014 22:28:41 +0200 Subject: [PATCH 06/19] Added django 1.6 skeleton for testing --- test/django-1.6-skeleton/haystack/settings.py | 156 ++++++++++++++++++ 1 file changed, 156 insertions(+) create mode 100644 test/django-1.6-skeleton/haystack/settings.py diff --git a/test/django-1.6-skeleton/haystack/settings.py b/test/django-1.6-skeleton/haystack/settings.py new file mode 100644 index 0000000..957e66b --- /dev/null +++ b/test/django-1.6-skeleton/haystack/settings.py @@ -0,0 +1,156 @@ +# Django settings for haystack project. + +DEBUG = True +TEMPLATE_DEBUG = DEBUG + +ADMINS = ( + # ('Your Name', 'your_email@example.com'), +) + +MANAGERS = ADMINS + +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'. + 'NAME': '', # Or path to database file if using sqlite3. + # The following settings are not used with sqlite3: + 'USER': '', + 'PASSWORD': '', + 'HOST': '', # Empty for localhost through domain sockets or '127.0.0.1' for localhost through TCP. + 'PORT': '', # Set to empty string for default. + } +} + +# Hosts/domain names that are valid for this site; required if DEBUG is False +# See https://docs.djangoproject.com/en/1.5/ref/settings/#allowed-hosts +ALLOWED_HOSTS = [] + +# Local time zone for this installation. Choices can be found here: +# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name +# although not all choices may be available on all operating systems. +# In a Windows environment this must be set to your system time zone. +TIME_ZONE = 'America/Chicago' + +# Language code for this installation. All choices can be found here: +# http://www.i18nguy.com/unicode/language-identifiers.html +LANGUAGE_CODE = 'en-us' + +SITE_ID = 1 + +# If you set this to False, Django will make some optimizations so as not +# to load the internationalization machinery. +USE_I18N = True + +# If you set this to False, Django will not format dates, numbers and +# calendars according to the current locale. +USE_L10N = True + +# If you set this to False, Django will not use timezone-aware datetimes. +USE_TZ = True + +# Absolute filesystem path to the directory that will hold user-uploaded files. +# Example: "/var/www/example.com/media/" +MEDIA_ROOT = '' + +# URL that handles the media served from MEDIA_ROOT. Make sure to use a +# trailing slash. +# Examples: "http://example.com/media/", "http://media.example.com/" +MEDIA_URL = '' + +# Absolute path to the directory static files should be collected to. +# Don't put anything in this directory yourself; store your static files +# in apps' "static/" subdirectories and in STATICFILES_DIRS. +# Example: "/var/www/example.com/static/" +STATIC_ROOT = '' + +# URL prefix for static files. +# Example: "http://example.com/static/", "http://static.example.com/" +STATIC_URL = '/static/' + +# Additional locations of static files +STATICFILES_DIRS = ( + # Put strings here, like "/home/html/static" or "C:/www/django/static". + # Always use forward slashes, even on Windows. + # Don't forget to use absolute paths, not relative paths. +) + +# List of finder classes that know how to find static files in +# various locations. +STATICFILES_FINDERS = ( + 'django.contrib.staticfiles.finders.FileSystemFinder', + 'django.contrib.staticfiles.finders.AppDirectoriesFinder', +# 'django.contrib.staticfiles.finders.DefaultStorageFinder', +) + +# Make this unique, and don't share it with anybody. +SECRET_KEY = '@w-1$9#jh05!qvbh#1k)c4=w9llcq116f$5(4&s_c)n4@%n=pc' + +# List of callables that know how to import templates from various sources. +TEMPLATE_LOADERS = ( + 'django.template.loaders.filesystem.Loader', + 'django.template.loaders.app_directories.Loader', +# 'django.template.loaders.eggs.Loader', +) + +MIDDLEWARE_CLASSES = ( + 'django.middleware.common.CommonMiddleware', + 'django.contrib.sessions.middleware.SessionMiddleware', + 'django.middleware.csrf.CsrfViewMiddleware', + 'django.contrib.auth.middleware.AuthenticationMiddleware', + 'django.contrib.messages.middleware.MessageMiddleware', + # Uncomment the next line for simple clickjacking protection: + # 'django.middleware.clickjacking.XFrameOptionsMiddleware', +) + +ROOT_URLCONF = 'haystack.urls' + +# Python dotted path to the WSGI application used by Django's runserver. +WSGI_APPLICATION = 'haystack.wsgi.application' + +TEMPLATE_DIRS = ( + # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates". + # Always use forward slashes, even on Windows. + # Don't forget to use absolute paths, not relative paths. +) + +INSTALLED_APPS = ( + 'django.contrib.auth', + 'django.contrib.contenttypes', + 'django.contrib.sessions', + 'django.contrib.sites', + 'django.contrib.messages', + 'django.contrib.staticfiles', + # Uncomment the next line to enable the admin: + # 'django.contrib.admin', + # Uncomment the next line to enable admin documentation: + # 'django.contrib.admindocs', +) + +# A sample logging configuration. The only tangible logging +# performed by this configuration is to send an email to +# the site admins on every HTTP 500 error when DEBUG=False. +# See http://docs.djangoproject.com/en/dev/topics/logging for +# more details on how to customize your logging configuration. +LOGGING = { + 'version': 1, + 'disable_existing_loggers': False, + 'filters': { + 'require_debug_false': { + '()': 'django.utils.log.RequireDebugFalse' + } + }, + 'handlers': { + 'mail_admins': { + 'level': 'ERROR', + 'filters': ['require_debug_false'], + 'class': 'django.utils.log.AdminEmailHandler' + } + }, + 'loggers': { + 'django.request': { + 'handlers': ['mail_admins'], + 'level': 'ERROR', + 'propagate': True, + }, + } +} From 15373996f435cced91def22057217c3ec8a0ef00 Mon Sep 17 00:00:00 2001 From: cclauss Date: Sun, 11 May 2014 22:29:42 +0200 Subject: [PATCH 07/19] Added django 1.6 skeleton for testing --- test/django-1.6-skeleton/haystack/urls.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 test/django-1.6-skeleton/haystack/urls.py diff --git a/test/django-1.6-skeleton/haystack/urls.py b/test/django-1.6-skeleton/haystack/urls.py new file mode 100644 index 0000000..5703432 --- /dev/null +++ b/test/django-1.6-skeleton/haystack/urls.py @@ -0,0 +1,17 @@ +from django.conf.urls import patterns, include, url + +# Uncomment the next two lines to enable the admin: +# from django.contrib import admin +# admin.autodiscover() + +urlpatterns = patterns('', + # Examples: + # url(r'^$', 'haystack.views.home', name='home'), + # url(r'^haystack/', include('haystack.foo.urls')), + + # Uncomment the admin/doc line below to enable admin documentation: + # url(r'^admin/doc/', include('django.contrib.admindocs.urls')), + + # Uncomment the next line to enable the admin: + # url(r'^admin/', include(admin.site.urls)), +) From e0c852f4b9dce2ffa2d3e1093635e9395f0edba9 Mon Sep 17 00:00:00 2001 From: cclauss Date: Sun, 11 May 2014 22:30:27 +0200 Subject: [PATCH 08/19] Added django 1.6 skeleton for testing --- test/django-1.6-skeleton/haystack/wsgi.py | 32 +++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 test/django-1.6-skeleton/haystack/wsgi.py diff --git a/test/django-1.6-skeleton/haystack/wsgi.py b/test/django-1.6-skeleton/haystack/wsgi.py new file mode 100644 index 0000000..1508ff6 --- /dev/null +++ b/test/django-1.6-skeleton/haystack/wsgi.py @@ -0,0 +1,32 @@ +""" +WSGI config for haystack project. + +This module contains the WSGI application used by Django's development server +and any production WSGI deployments. It should expose a module-level variable +named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover +this application via the ``WSGI_APPLICATION`` setting. + +Usually you will have the standard Django WSGI application here, but it also +might make sense to replace the whole Django WSGI application with a custom one +that later delegates to the Django one. For example, you could introduce WSGI +middleware here, or combine a Django application with an application of another +framework. + +""" +import os + +# We defer to a DJANGO_SETTINGS_MODULE already in the environment. This breaks +# if running multiple sites in the same mod_wsgi process. To fix this, use +# mod_wsgi daemon mode with each site in its own daemon process, or use +# os.environ["DJANGO_SETTINGS_MODULE"] = "haystack.settings" +os.environ.setdefault("DJANGO_SETTINGS_MODULE", "haystack.settings") + +# This application object is used by any WSGI server configured to use this +# file. This includes Django's development server, if the WSGI_APPLICATION +# setting points here. +from django.core.wsgi import get_wsgi_application +application = get_wsgi_application() + +# Apply WSGI middleware here. +# from helloworld.wsgi import HelloWorldApplication +# application = HelloWorldApplication(application) From f08f93f347297aa8eac14a67a777ddfcb7a11c7d Mon Sep 17 00:00:00 2001 From: cclauss Date: Sun, 11 May 2014 22:32:20 +0200 Subject: [PATCH 09/19] Updated Python to 3.4.0 --- test/simple-runtime/runtime.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/simple-runtime/runtime.txt b/test/simple-runtime/runtime.txt index 9037c46..fe5dcf7 100644 --- a/test/simple-runtime/runtime.txt +++ b/test/simple-runtime/runtime.txt @@ -1 +1 @@ -python-3.3.2 \ No newline at end of file +python-3.4.0 From 43dbb49103c707ab0ed10314a15aca941794ba5f Mon Sep 17 00:00:00 2001 From: cclauss Date: Sun, 11 May 2014 22:33:33 +0200 Subject: [PATCH 10/19] Updated Requests to 2.2.1 --- test/simple-runtime/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/simple-runtime/requirements.txt b/test/simple-runtime/requirements.txt index f635a1e..8f2f47b 100644 --- a/test/simple-runtime/requirements.txt +++ b/test/simple-runtime/requirements.txt @@ -1 +1 @@ -requests==1.0.3 \ No newline at end of file +requests==2.2.1 From 3f6b453c0ae6b54301a3fe1afef942d6c6082840 Mon Sep 17 00:00:00 2001 From: cclauss Date: Sun, 11 May 2014 22:37:03 +0200 Subject: [PATCH 11/19] Added simple runtime test for Python 2 --- test/simple-runtime-python2/runtime.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 test/simple-runtime-python2/runtime.txt diff --git a/test/simple-runtime-python2/runtime.txt b/test/simple-runtime-python2/runtime.txt new file mode 100644 index 0000000..f920413 --- /dev/null +++ b/test/simple-runtime-python2/runtime.txt @@ -0,0 +1 @@ +python-2.7.6 From 76309c35ecf6a34d9a92719bd8fe8b86f2809685 Mon Sep 17 00:00:00 2001 From: cclauss Date: Sun, 11 May 2014 22:38:35 +0200 Subject: [PATCH 12/19] Added simple runtime test for Python 2 --- test/simple-runtime-python2/requirements.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 test/simple-runtime-python2/requirements.txt diff --git a/test/simple-runtime-python2/requirements.txt b/test/simple-runtime-python2/requirements.txt new file mode 100644 index 0000000..8f2f47b --- /dev/null +++ b/test/simple-runtime-python2/requirements.txt @@ -0,0 +1 @@ +requests==2.2.1 From 84f0e2feba3170ef1f5bd4586d9a51ea85fa1edf Mon Sep 17 00:00:00 2001 From: cclauss Date: Sun, 11 May 2014 22:42:49 +0200 Subject: [PATCH 13/19] Added simple runtime test for Pypy 2 --- test/simple-runtime-pypy2/requirements.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 test/simple-runtime-pypy2/requirements.txt diff --git a/test/simple-runtime-pypy2/requirements.txt b/test/simple-runtime-pypy2/requirements.txt new file mode 100644 index 0000000..493a930 --- /dev/null +++ b/test/simple-runtime-pypy2/requirements.txt @@ -0,0 +1 @@ +pypy-2.3 From 7b0d891f4d6cbc7a779478607af48c6001e85ff2 Mon Sep 17 00:00:00 2001 From: cclauss Date: Sun, 11 May 2014 22:43:45 +0200 Subject: [PATCH 14/19] Added simple runtime test for Pypy 2 --- test/simple-runtime-pypy2/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/simple-runtime-pypy2/requirements.txt b/test/simple-runtime-pypy2/requirements.txt index 493a930..8f2f47b 100644 --- a/test/simple-runtime-pypy2/requirements.txt +++ b/test/simple-runtime-pypy2/requirements.txt @@ -1 +1 @@ -pypy-2.3 +requests==2.2.1 From 85bddf8f00da131e1f804f85622caf8d4129072d Mon Sep 17 00:00:00 2001 From: cclauss Date: Sun, 11 May 2014 22:44:39 +0200 Subject: [PATCH 15/19] Added simple runtime test for Pypy 2 --- test/simple-runtime-pypy2/runtime.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 test/simple-runtime-pypy2/runtime.txt diff --git a/test/simple-runtime-pypy2/runtime.txt b/test/simple-runtime-pypy2/runtime.txt new file mode 100644 index 0000000..493a930 --- /dev/null +++ b/test/simple-runtime-pypy2/runtime.txt @@ -0,0 +1 @@ +pypy-2.3 From 330524adbac79614423ca7c24616e6e4e44bb6b4 Mon Sep 17 00:00:00 2001 From: cclauss Date: Sun, 11 May 2014 22:47:30 +0200 Subject: [PATCH 16/19] Changed if len(history): to if history: --- test/distutils/envoy.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/distutils/envoy.py b/test/distutils/envoy.py index 5602487..3a65415 100644 --- a/test/distutils/envoy.py +++ b/test/distutils/envoy.py @@ -168,7 +168,7 @@ def run(command, data=None, timeout=None, env=None): history = [] for c in command: - if len(history): + if history: # due to broken pipe problems pass only first 10MB data = history[-1].std_out[0:10*1024] From 44bfda132098b0fbef3495fa65ddcc25decdf195 Mon Sep 17 00:00:00 2001 From: cclauss Date: Sun, 11 May 2014 23:00:05 +0200 Subject: [PATCH 17/19] Added django 1.6, simple-runtime-P2, P3, and Pypy2 --- bin/test | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/bin/test b/bin/test index 7eca838..93289c7 100755 --- a/bin/test +++ b/bin/test @@ -20,6 +20,12 @@ testDetectWithEmptyReqs() { assertCapturedSuccess } +testDetectDjango16() { + detect "django-1.6-skeleton" + assertCapturedEquals "Python" + assertCapturedSuccess +} + testDetectDjango15() { detect "django-1.5-skeleton" assertCapturedEquals "Python" @@ -62,6 +68,23 @@ testDetectNotPython() { assertEquals "1" "${RETURN}" } +testDetectSimpleRuntimePypy2() { + detect "simple-runtime-pypy2" + assertCapturedEquals "Python" + assertCapturedSuccess +} + +testDetectSimpleRuntimePython2() { + detect "simple-runtime-python2" + assertCapturedEquals "Python" + assertCapturedSuccess +} + +testDetectSimpleRuntimePython3() { + detect "simple-runtime" # should probably be renamed simple-runtime-python3 + assertCapturedEquals "Python" + assertCapturedSuccess +} ## utils ######################################## From 84f610347ca331e2ba731e41b3be905d0aadac94 Mon Sep 17 00:00:00 2001 From: cclauss Date: Sun, 11 May 2014 23:04:33 +0200 Subject: [PATCH 18/19] Updated pip to 1.5.5 and setuptools to 3.6 --- bin/compile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/compile b/bin/compile index 96eefa0..ab320a7 100755 --- a/bin/compile +++ b/bin/compile @@ -27,8 +27,8 @@ PROFILE_PATH="$BUILD_DIR/.profile.d/python.sh" DEFAULT_PYTHON_VERSION="python-2.7.6" PYTHON_EXE="/app/.heroku/python/bin/python" -PIP_VERSION="1.5.4" -SETUPTOOLS_VERSION="2.1" +PIP_VERSION="1.5.5" +SETUPTOOLS_VERSION="3.6" # Setup bpwatch export PATH=$PATH:$ROOT_DIR/vendor/bpwatch From 4d35f5129a83cc615661736b042cbad507f74b4c Mon Sep 17 00:00:00 2001 From: cclauss Date: Sun, 11 May 2014 23:29:01 +0200 Subject: [PATCH 19/19] Updated latest supported Python3 to 3.4.0 --- Readme.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Readme.md b/Readme.md index 8ef092d..02a8cb6 100644 --- a/Readme.md +++ b/Readme.md @@ -44,12 +44,12 @@ Specify a Runtime You can also provide arbitrary releases Python with a `runtime.txt` file. $ cat runtime.txt - python-3.3.3 + python-3.4.0 Runtime options include: - python-2.7.6 -- python-3.3.3 +- python-3.4.0 - pypy-1.9 (experimental) Other [unsupported runtimes](https://github.com/kennethreitz/python-versions/tree/master/formula) are available as well.