diff --git a/Readme.md b/Readme.md index 8ef092d1629c99be8938711441720107f08b0d4d..02a8cb6f7cc8824aaa7fcbf309098b470ce38a07 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. diff --git a/bin/compile b/bin/compile index 96eefa0dba5935b3bed33189087abf5419dc0298..ab320a7c7ac7489af034a94508f7e0fafd901aac 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 diff --git a/bin/test b/bin/test index 7eca8385bb810dd70df098ac160e1006bfe4cd9e..93289c7c3c5739953d8c5a92833cb22451dda040 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 ######################################## diff --git a/test/distutils/envoy.py b/test/distutils/envoy.py index 56024873db21b4362456a7dfde7dfa3c3a1fd91b..3a6541566878a24ba65bae1fe56f6c6b932d78f0 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] 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 0000000000000000000000000000000000000000..8d1c8b69c3fce7bea45c73efd06983e3c419a92f --- /dev/null +++ b/test/django-1.6-skeleton/haystack/__init__.py @@ -0,0 +1 @@ + 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 0000000000000000000000000000000000000000..957e66ba1a9d914409f4de1018a231e60b738560 --- /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, + }, + } +} 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 0000000000000000000000000000000000000000..570343210d044f3d76bc1235537396cc2c6e9e3c --- /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)), +) 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 0000000000000000000000000000000000000000..1508ff6a05836bd1556d99e24da9fd8de4a766c0 --- /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) diff --git a/test/django-1.6-skeleton/manage.py b/test/django-1.6-skeleton/manage.py new file mode 100644 index 0000000000000000000000000000000000000000..cf7427b1ba6a9a9aad442ab4d9954ac6c506694d --- /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) diff --git a/test/django-1.6-skeleton/requirements.txt b/test/django-1.6-skeleton/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..e093146a6b13ee20f3bcb207a6e46d212385cc2a --- /dev/null +++ b/test/django-1.6-skeleton/requirements.txt @@ -0,0 +1 @@ +django==1.6 diff --git a/test/simple-runtime-pypy2/requirements.txt b/test/simple-runtime-pypy2/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8f2f47b5daab7203cca0b4a4a06bf33db2ff1291 --- /dev/null +++ b/test/simple-runtime-pypy2/requirements.txt @@ -0,0 +1 @@ +requests==2.2.1 diff --git a/test/simple-runtime-pypy2/runtime.txt b/test/simple-runtime-pypy2/runtime.txt new file mode 100644 index 0000000000000000000000000000000000000000..493a930ef7d6e5de288d1dce01de4ada8da9c74e --- /dev/null +++ b/test/simple-runtime-pypy2/runtime.txt @@ -0,0 +1 @@ +pypy-2.3 diff --git a/test/simple-runtime-python2/requirements.txt b/test/simple-runtime-python2/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8f2f47b5daab7203cca0b4a4a06bf33db2ff1291 --- /dev/null +++ b/test/simple-runtime-python2/requirements.txt @@ -0,0 +1 @@ +requests==2.2.1 diff --git a/test/simple-runtime-python2/runtime.txt b/test/simple-runtime-python2/runtime.txt new file mode 100644 index 0000000000000000000000000000000000000000..f9204139f012b1a798bfe24fa96cf93d6aa15f35 --- /dev/null +++ b/test/simple-runtime-python2/runtime.txt @@ -0,0 +1 @@ +python-2.7.6 diff --git a/test/simple-runtime/requirements.txt b/test/simple-runtime/requirements.txt index f635a1e1567523878c3972839d08341a4723c35a..8f2f47b5daab7203cca0b4a4a06bf33db2ff1291 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 diff --git a/test/simple-runtime/runtime.txt b/test/simple-runtime/runtime.txt index 9037c46c3ae2593fa0fe97dd2400c9509126ff96..fe5dcf7a3aeb68d0bb349ddd6f7d61ba731a1057 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