summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
Diffstat (limited to 'django')
-rw-r--r--django/build.sh1
-rw-r--r--django/libgdal.patch28
-rw-r--r--django/libgeos.patch77
-rw-r--r--django/meta.yaml211
4 files changed, 296 insertions, 21 deletions
diff --git a/django/build.sh b/django/build.sh
deleted file mode 100644
index 5a5aeeb..0000000
--- a/django/build.sh
+++ /dev/null
@@ -1 +0,0 @@
-$PYTHON setup.py install
diff --git a/django/libgdal.patch b/django/libgdal.patch
new file mode 100644
index 0000000..56b6906
--- /dev/null
+++ b/django/libgdal.patch
@@ -0,0 +1,28 @@
+--- Django-2.0.orig/django/contrib/gis/gdal/libgdal.py 2017-12-02 12:36:16.000000000 -0200
++++ Django-2.0/django/contrib/gis/gdal/libgdal.py 2017-12-06 08:14:42.730016198 -0200
+@@ -1,5 +1,6 @@
+ import logging
+ import os
++import sys
+ import re
+ from ctypes import CDLL, CFUNCTYPE, c_char_p, c_int
+ from ctypes.util import find_library
+@@ -10,12 +11,12 @@
+ logger = logging.getLogger('django.contrib.gis')
+
+ # Custom library path set?
+-try:
+- from django.conf import settings
+- lib_path = settings.GDAL_LIBRARY_PATH
+-except (AttributeError, EnvironmentError,
+- ImportError, ImproperlyConfigured):
+- lib_path = None
++if 'linux' in sys.platform:
++ lib_path = os.path.join(sys.prefix, 'lib', 'libgdal.so')
++elif 'darwin' in sys.platform:
++ lib_path = os.path.join(sys.prefix, 'lib', 'libgdal.dylib')
++elif os.name == 'nt':
++ lib_path = os.path.join(sys.prefix, 'Library', 'bin', 'gdal201.dll')
+
+ if lib_path:
+ lib_names = None
diff --git a/django/libgeos.patch b/django/libgeos.patch
new file mode 100644
index 0000000..6c8c8d6
--- /dev/null
+++ b/django/libgeos.patch
@@ -0,0 +1,77 @@
+--- Django-2.0.orig/django/contrib/gis/geos/libgeos.py 2017-12-02 12:36:16.000000000 -0200
++++ Django-2.0/django/contrib/gis/geos/libgeos.py 2017-12-06 08:12:35.806014360 -0200
+@@ -8,8 +8,8 @@
+ """
+ import logging
+ import os
++import sys
+ from ctypes import CDLL, CFUNCTYPE, POINTER, Structure, c_char_p
+-from ctypes.util import find_library
+
+ from django.core.exceptions import ImproperlyConfigured
+ from django.utils.functional import SimpleLazyObject, cached_property
+@@ -19,47 +19,27 @@
+
+
+ def load_geos():
+- # Custom library path set?
+- try:
+- from django.conf import settings
+- lib_path = settings.GEOS_LIBRARY_PATH
+- except (AttributeError, EnvironmentError,
+- ImportError, ImproperlyConfigured):
+- lib_path = None
+-
+- # Setting the appropriate names for the GEOS-C library.
+- if lib_path:
+- lib_names = None
+- elif os.name == 'nt':
+- # Windows NT libraries
+- lib_names = ['geos_c', 'libgeos_c-1']
+- elif os.name == 'posix':
+- # *NIX libraries
+- lib_names = ['geos_c', 'GEOS']
+- else:
+- raise ImportError('Unsupported OS "%s"' % os.name)
+-
+- # Using the ctypes `find_library` utility to find the path to the GEOS
+- # shared library. This is better than manually specifying each library name
+- # and extension (e.g., libgeos_c.[so|so.1|dylib].).
+- if lib_names:
+- for lib_name in lib_names:
+- lib_path = find_library(lib_name)
+- if lib_path is not None:
+- break
+-
+- # No GEOS library could be found.
+- if lib_path is None:
+- raise ImportError(
+- 'Could not find the GEOS library (tried "%s"). '
+- 'Try setting GEOS_LIBRARY_PATH in your settings.' %
+- '", "'.join(lib_names)
+- )
+ # Getting the GEOS C library. The C interface (CDLL) is used for
+ # both *NIX and Windows.
+ # See the GEOS C API source code for more details on the library function calls:
+ # http://geos.refractions.net/ro/doxygen_docs/html/geos__c_8h-source.html
+- _lgeos = CDLL(lib_path)
++ if os.name == 'posix':
++ platform = os.uname()[0]
++ if platform == 'Linux':
++ libname = 'libgeos_c.so'
++ elif platform == 'Darwin':
++ libname = 'libgeos_c.dylib'
++ _lgeos = CDLL(os.path.join(sys.prefix, 'lib', libname))
++ elif os.name == 'nt':
++ # On Windows, the GDAL binaries have some OSR routines exported with
++ # STDCALL, while others are not. Thus, the library will also need to
++ # be loaded up as WinDLL for said OSR functions that require the
++ # different calling convention.
++ libname = os.path.join(sys.prefix, 'Library', 'bin', 'geos_c.dll')
++ _lgeos = CDLL(libname)
++ else:
++ raise Exception('No valid platform name. Found {}'.format(os.name))
++
+ # Here we set up the prototypes for the initGEOS_r and finishGEOS_r
+ # routines. These functions aren't actually called until they are
+ # attached to a GEOS context handle -- this actually occurs in
diff --git a/django/meta.yaml b/django/meta.yaml
index 64baae1..9aa227a 100644
--- a/django/meta.yaml
+++ b/django/meta.yaml
@@ -1,43 +1,214 @@
-{% set name = 'django' %}
-{% set version = '1.8.14' %}
-{% set build = '0' %}
+{% set version = "2.2.9" %}
package:
- name: {{ name }}
+ name: django
version: {{ version }}
source:
- git_tag: {{ version }}
- git_url: https://github.com/{{ name }}/{{ name }}.git
+ url: https://pypi.io/packages/source/D/Django/Django-{{ version }}.tar.gz
+ sha256: 662a1ff78792e3fd77f16f71b1f31149489434de4b62a74895bd5d6534e635a5
+ patches:
+ # Hard-code gdal and geos' paths to the corresponding conda packages.
+ - libgdal.patch
+ - libgeos.patch
build:
+ number: 0
+ skip: True # [py2k]
+ script: "{{ PYTHON }} -m pip install . --no-deps -vv"
entry_points:
- django-admin = django.core.management:execute_from_command_line
- - django-admin.py = django.core.management:execute_from_command_line
requirements:
- build:
+ host:
- python
- - setuptools
+ - pip
run:
- python
+ - pytz
+ - sqlparse
test:
- commands:
- - django-admin --version
+ requires:
+ # Test optional dependency.
+ - psycopg2 # [not win]
imports:
- django
+ - django.apps
+ - django.conf
+ - django.conf.app_template.migrations # [not py27]
+ - django.conf.locale
+ - django.conf.locale.ar
+ - django.conf.locale.az
+ - django.conf.locale.bg
+ - django.conf.locale.bn
+ - django.conf.locale.bs
+ - django.conf.locale.ca
+ - django.conf.locale.cs
+ - django.conf.locale.cy
+ - django.conf.locale.da
+ - django.conf.locale.de
+ - django.conf.locale.de_CH
+ - django.conf.locale.el
+ - django.conf.locale.en
+ - django.conf.locale.en_AU
+ - django.conf.locale.en_GB
+ - django.conf.locale.eo
+ - django.conf.locale.es
+ - django.conf.locale.es_AR
+ - django.conf.locale.es_MX
+ - django.conf.locale.es_NI
+ - django.conf.locale.es_PR
+ - django.conf.locale.et
+ - django.conf.locale.eu
+ - django.conf.locale.fa
+ - django.conf.locale.fi
+ - django.conf.locale.fr
+ - django.conf.locale.fy
+ - django.conf.locale.ga
+ - django.conf.locale.gl
+ - django.conf.locale.he
+ - django.conf.locale.hi
+ - django.conf.locale.hr
+ - django.conf.locale.hu
+ - django.conf.locale.id
+ - django.conf.locale.it
+ - django.conf.locale.ja
+ - django.conf.locale.ka
+ - django.conf.locale.km
+ - django.conf.locale.kn
+ - django.conf.locale.ko
+ - django.conf.locale.lt
+ - django.conf.locale.lv
+ - django.conf.locale.mk
+ - django.conf.locale.ml
+ - django.conf.locale.mn
+ - django.conf.locale.nb
+ - django.conf.locale.nl
+ - django.conf.locale.nn
+ - django.conf.locale.pl
+ - django.conf.locale.pt
+ - django.conf.locale.pt_BR
+ - django.conf.locale.ro
+ - django.conf.locale.ru
+ - django.conf.locale.sk
+ - django.conf.locale.sl
+ - django.conf.locale.sq
+ - django.conf.locale.sr
+ - django.conf.locale.sr_Latn
+ - django.conf.locale.sv
+ - django.conf.locale.ta
+ - django.conf.locale.te
+ - django.conf.locale.th
+ - django.conf.locale.tr
+ - django.conf.locale.uk
+ - django.conf.locale.vi
+ - django.conf.locale.zh_Hans
+ - django.conf.locale.zh_Hant
+ - django.conf.urls
+ - django.contrib
+ - django.contrib.admin
+ - django.contrib.admin.migrations
+ - django.contrib.admin.templatetags
+ - django.contrib.admin.views
+ - django.contrib.admindocs
+ - django.contrib.auth
+ - django.contrib.auth.handlers
+ - django.contrib.auth.management
+ - django.contrib.auth.management.commands
+ - django.contrib.auth.migrations
+ - django.contrib.contenttypes
+ - django.contrib.contenttypes.migrations
+ - django.contrib.flatpages
+ - django.contrib.flatpages.migrations
+ - django.contrib.flatpages.templatetags
+ - django.contrib.gis
+ - django.contrib.gis.db
+ - django.contrib.gis.db.backends
+ - django.contrib.gis.db.backends.base
+ - django.contrib.gis.db.backends.mysql
+ - django.contrib.gis.db.backends.oracle
+ - django.contrib.gis.db.backends.postgis
+ - django.contrib.gis.db.backends.spatialite
+ - django.contrib.gis.geometry # [not win and not py2k]
+ - django.contrib.gis.management # [not win and not py2k]
+ - django.contrib.gis.management.commands # [not win and not py2k]
+ - django.contrib.gis.serializers # [not win and not py2k]
+ - django.contrib.humanize
+ - django.contrib.humanize.templatetags
+ - django.contrib.messages
+ - django.contrib.messages.storage
+ - django.contrib.postgres # [not win]
+ - django.contrib.postgres.forms # [not win]
+ - django.contrib.redirects
+ - django.contrib.redirects.migrations
+ - django.contrib.sessions
+ - django.contrib.sessions.backends
+ - django.contrib.sessions.management
+ - django.contrib.sessions.management.commands
+ - django.contrib.sessions.migrations
+ - django.contrib.sitemaps
+ - django.contrib.sitemaps.management
+ - django.contrib.sitemaps.management.commands
+ - django.contrib.sites
+ - django.contrib.sites.migrations
+ - django.contrib.staticfiles
+ - django.contrib.staticfiles.management
+ - django.contrib.staticfiles.management.commands
+ - django.contrib.staticfiles.templatetags
+ - django.contrib.syndication
+ - django.core
+ - django.core.checks
+ - django.core.checks.compatibility
+ - django.core.checks.security
+ - django.core.files
+ - django.core.handlers
+ - django.core.mail
+ - django.core.mail.backends
+ - django.core.management
+ - django.core.management.commands
+ - django.core.serializers
+ - django.core.servers
+ - django.db
+ - django.db.backends
+ - django.db.backends.base
+ - django.db.backends.dummy
+ - django.db.backends.mysql
+ - django.db.backends.oracle
+ - django.db.backends.postgresql_psycopg2 # [not win]
+ - django.db.backends.sqlite3
+ - django.db.migrations
+ - django.db.migrations.operations
+ - django.db.models
+ - django.db.models.fields
+ - django.db.models.sql
+ - django.dispatch
+ - django.forms
- django.http
+ - django.middleware
+ - django.template
+ - django.template.backends
+ - django.template.loaders
+ - django.templatetags
+ - django.test
+ - django.utils
+ - django.utils.translation
+ - django.views
+ - django.views.decorators
+ - django.views.generic
+ commands:
+ - django-admin --help
about:
home: http://www.djangoproject.com/
- license: BSD
+ license: BSD 3-Clause
license_file: LICENSE
- summary: Web framework that encourages rapid development
- description: |
- Django is a high-level Python Web framework that encourages rapid
- development and clean, pragmatic design. Built by experienced developers, it
- takes care of much of the hassle of Web development, so you can focus on
- writing your app without needing to reinvent the wheel.
- doc_url: https://docs.djangoproject.com/en/1.8/
- dev_url: https://github.com/{{ name }}
+ summary: 'A high-level Python Web framework that encourages rapid development and clean, pragmatic design.'
+ dev_url: https://github.com/django/django
+ doc_url: http://www.djangoproject.com/
+
+extra:
+ recipe-maintainers:
+ - kwilcox
+ - ocefpaf
+ - astamminger