Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
give qgis future (followup 15b3600)
  • Loading branch information
jef-n committed Mar 25, 2016
1 parent 0d21e64 commit 2b55d89
Show file tree
Hide file tree
Showing 255 changed files with 43,952 additions and 6 deletions.
7 changes: 7 additions & 0 deletions debian/rules
Expand Up @@ -97,6 +97,13 @@ else
CMAKE_OPTS += -DWITH_INTERNAL_NOSE2=FALSE -DWITH_INTERNAL_SIX=FALSE
endif

ifneq (,$(findstring $(DISTRIBUTION),"stretch unstable wily xenial"))
CMAKE_OPTS += -DWITH_INTERNAL_FUTURE=TRUE
else
CMAKE_OPTS += -DWITH_INTERNAL_FUTURE=FALSE
endif


ifneq (,$(findstring $(DISTRIBUTION),"wheezy precise"))
CMAKE_OPTS += -DWITH_PYSPATIALITE=TRUE
endif
Expand Down
1 change: 1 addition & 0 deletions ms-windows/osgeo4w/package-nightly.cmd
Expand Up @@ -193,6 +193,7 @@ cmake %CMAKE_OPT% ^
-D WITH_INTERNAL_NOSE2=FALSE ^
-D WITH_INTERNAL_MOCK=FALSE ^
-D WITH_INTERNAL_HTTPLIB2=FALSE ^
-D WITH_INTERNAL_FUTURE=FALSE ^
%SRCDIR%
if errorlevel 1 (echo cmake failed & goto error)

Expand Down
1 change: 1 addition & 0 deletions ms-windows/osgeo4w/package.cmd
Expand Up @@ -187,6 +187,7 @@ cmake %CMAKE_OPT% ^
-D WITH_INTERNAL_DATEUTIL=FALSE ^
-D WITH_INTERNAL_PYTZ=FALSE ^
-D WITH_INTERNAL_SIX=FALSE ^
-D WITH_INTERNAL_FUTURE=FALSE ^
%SRCDIR%
if errorlevel 1 (echo cmake failed & goto error)

Expand Down
14 changes: 8 additions & 6 deletions python/ext-libs/CMakeLists.txt
Expand Up @@ -8,35 +8,37 @@ IF (WITH_PYSPATIALITE)
ADD_SUBDIRECTORY(pyspatialite)
ENDIF (WITH_PYSPATIALITE)

MACRO(EXT_PYLIB lib)
MACRO(EXT_PYLIB lib dir)
STRING(TOUPPER ${lib} ulib)
SET (WITH_INTERNAL_${ulib} TRUE CACHE BOOL "Determines whether python ${lib} should be included")
IF(WITH_INTERNAL_${ulib})
INSTALL(DIRECTORY ${lib} DESTINATION "${QGIS_PYTHON_DIR}")
INSTALL(DIRECTORY ${lib} DESTINATION "${QGIS_PYTHON_DIR}/${dir}")

ADD_CUSTOM_TARGET(py${lib})

FILE(GLOB_RECURSE files RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${lib}/*)
ADD_CUSTOM_COMMAND(TARGET py${lib}
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_directory ${lib} "${PYTHON_OUTPUT_DIRECTORY}/${lib}"
COMMAND ${CMAKE_COMMAND} -E copy_directory ${lib} "${PYTHON_OUTPUT_DIRECTORY}/${lib}/${dir}"
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
DEPENDS ${files}
)
PY_COMPILE(py${lib} "${PYTHON_OUTPUT_DIRECTORY}/${lib}")
PY_COMPILE(py${lib} "${PYTHON_OUTPUT_DIRECTORY}/${lib}/${dir}")

ADD_DEPENDENCIES(staged-plugins py${lib})
ADD_CUSTOM_COMMAND(TARGET clean-staged-plugins
COMMAND ${CMAKE_COMMAND} -E remove_directory "${PYTHON_OUTPUT_DIRECTORY}/${lib}"
COMMAND ${CMAKE_COMMAND} -E remove_directory "${PYTHON_OUTPUT_DIRECTORY}/${lib}/${dir}"
)

ENDIF(WITH_INTERNAL_${ulib})
ENDMACRO(EXT_PYLIB lib)

FOREACH(pkg httplib2 jinja2 markupsafe owslib pygments dateutil pytz yaml nose2)
EXT_PYLIB(${pkg})
EXT_PYLIB(${pkg} .)
ENDFOREACH(pkg)

EXT_PYLIB(future ..)

SET (WITH_INTERNAL_SIX TRUE CACHE BOOL "Determines whether python six should be included")
IF(WITH_INTERNAL_SIX)
INSTALL(FILES six.py DESTINATION "${QGIS_PYTHON_DIR}")
Expand Down
10 changes: 10 additions & 0 deletions python/ext-libs/future/_dummy_thread/__init__.py
@@ -0,0 +1,10 @@
from __future__ import absolute_import
import sys
__future_module__ = True

if sys.version_info[0] < 3:
from dummy_thread import *
else:
raise ImportError('This package should not be accessible on Python 3. '
'Either you are trying to run from the python-future src folder '
'or your installation of python-future is corrupted.')
10 changes: 10 additions & 0 deletions python/ext-libs/future/_markupbase/__init__.py
@@ -0,0 +1,10 @@
from __future__ import absolute_import
import sys
__future_module__ = True

if sys.version_info[0] < 3:
from markupbase import *
else:
raise ImportError('This package should not be accessible on Python 3. '
'Either you are trying to run from the python-future src folder '
'or your installation of python-future is corrupted.')
10 changes: 10 additions & 0 deletions python/ext-libs/future/_thread/__init__.py
@@ -0,0 +1,10 @@
from __future__ import absolute_import
import sys
__future_module__ = True

if sys.version_info[0] < 3:
from thread import *
else:
raise ImportError('This package should not be accessible on Python 3. '
'Either you are trying to run from the python-future src folder '
'or your installation of python-future is corrupted.')
12 changes: 12 additions & 0 deletions python/ext-libs/future/builtins/__init__.py
@@ -0,0 +1,12 @@
from __future__ import absolute_import
import sys
__future_module__ = True

if sys.version_info[0] < 3:
from __builtin__ import *
# Overwrite any old definitions with the equivalent future.builtins ones:
from future.builtins import *
else:
raise ImportError('This package should not be accessible on Python 3. '
'Either you are trying to run from the python-future src folder '
'or your installation of python-future is corrupted.')
13 changes: 13 additions & 0 deletions python/ext-libs/future/configparser/__init__.py
@@ -0,0 +1,13 @@
from __future__ import absolute_import
import sys

if sys.version_info[0] < 3:
from ConfigParser import *
try:
from ConfigParser import (_Chainmap, Error, InterpolationMissingOptionError)
except ImportError:
pass
else:
raise ImportError('This package should not be accessible on Python 3. '
'Either you are trying to run from the python-future src folder '
'or your installation of python-future is corrupted.')
9 changes: 9 additions & 0 deletions python/ext-libs/future/copyreg/__init__.py
@@ -0,0 +1,9 @@
from __future__ import absolute_import
import sys

if sys.version_info[0] < 3:
from copy_reg import *
else:
raise ImportError('This package should not be accessible on Python 3. '
'Either you are trying to run from the python-future src folder '
'or your installation of python-future is corrupted.')
83 changes: 83 additions & 0 deletions python/ext-libs/future/future-0.15.2.dist-info/DESCRIPTION.rst
@@ -0,0 +1,83 @@
future: Easy, safe support for Python 2/3 compatibility
=======================================================

``future`` is the missing compatibility layer between Python 2 and Python
3. It allows you to use a single, clean Python 3.x-compatible codebase to
support both Python 2 and Python 3 with minimal overhead.

It is designed to be used as follows::

from __future__ import (absolute_import, division,
print_function, unicode_literals)
from builtins import (
bytes, dict, int, list, object, range, str,
ascii, chr, hex, input, next, oct, open,
pow, round, super,
filter, map, zip)

followed by predominantly standard, idiomatic Python 3 code that then runs
similarly on Python 2.6/2.7 and Python 3.3+.

The imports have no effect on Python 3. On Python 2, they shadow the
corresponding builtins, which normally have different semantics on Python 3
versus 2, to provide their Python 3 semantics.


Standard library reorganization
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

``future`` supports the standard library reorganization (PEP 3108) through the
following Py3 interfaces:

>>> # Top-level packages with Py3 names provided on Py2:
>>> import configparser
>>> import html.parser
>>> import queue
>>> import tkinter.dialog
>>> import xmlrpc.client
>>> # etc.

>>> # Aliases provided for extensions to existing Py2 module names:
>>> from future.standard_library import install_aliases
>>> install_aliases()

>>> from collections import Counter, OrderedDict # backported to Py2.6
>>> from collections import UserDict, UserList, UserString
>>> import urllib.request
>>> from itertools import filterfalse, zip_longest
>>> from subprocess import getoutput, getstatusoutput


Automatic conversion
--------------------

An included script called `futurize
<http://python-future.org/automatic_conversion.html>`_ aids in converting
code (from either Python 2 or Python 3) to code compatible with both
platforms. It is similar to ``python-modernize`` but goes further in
providing Python 3 compatibility through the use of the backported types
and builtin functions in ``future``.


Documentation
-------------

See: http://python-future.org


Credits
-------

:Author: Ed Schofield
:Sponsor: Python Charmers Pty Ltd, Australia, and Python Charmers Pte
Ltd, Singapore. http://pythoncharmers.com
:Others: See docs/credits.rst or http://python-future.org/credits.html


Licensing
---------
Copyright 2013-2015 Python Charmers Pty Ltd, Australia.
The software is distributed under an MIT licence. See LICENSE.txt.



1 change: 1 addition & 0 deletions python/ext-libs/future/future-0.15.2.dist-info/INSTALLER
@@ -0,0 +1 @@
pip
104 changes: 104 additions & 0 deletions python/ext-libs/future/future-0.15.2.dist-info/METADATA
@@ -0,0 +1,104 @@
Metadata-Version: 2.0
Name: future
Version: 0.15.2
Summary: Clean single-source support for Python 3 and 2
Home-page: https://python-future.org
Author: Ed Schofield
Author-email: ed@pythoncharmers.com
License: MIT
Keywords: future past python3 migration futurize backport six 2to3 modernize pasteurize 3to2
Platform: UNKNOWN
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2.6
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: 3.4
Classifier: License :: OSI Approved
Classifier: License :: OSI Approved :: MIT License
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers

future: Easy, safe support for Python 2/3 compatibility
=======================================================

``future`` is the missing compatibility layer between Python 2 and Python
3. It allows you to use a single, clean Python 3.x-compatible codebase to
support both Python 2 and Python 3 with minimal overhead.

It is designed to be used as follows::

from __future__ import (absolute_import, division,
print_function, unicode_literals)
from builtins import (
bytes, dict, int, list, object, range, str,
ascii, chr, hex, input, next, oct, open,
pow, round, super,
filter, map, zip)

followed by predominantly standard, idiomatic Python 3 code that then runs
similarly on Python 2.6/2.7 and Python 3.3+.

The imports have no effect on Python 3. On Python 2, they shadow the
corresponding builtins, which normally have different semantics on Python 3
versus 2, to provide their Python 3 semantics.


Standard library reorganization
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

``future`` supports the standard library reorganization (PEP 3108) through the
following Py3 interfaces:

>>> # Top-level packages with Py3 names provided on Py2:
>>> import configparser
>>> import html.parser
>>> import queue
>>> import tkinter.dialog
>>> import xmlrpc.client
>>> # etc.

>>> # Aliases provided for extensions to existing Py2 module names:
>>> from future.standard_library import install_aliases
>>> install_aliases()

>>> from collections import Counter, OrderedDict # backported to Py2.6
>>> from collections import UserDict, UserList, UserString
>>> import urllib.request
>>> from itertools import filterfalse, zip_longest
>>> from subprocess import getoutput, getstatusoutput


Automatic conversion
--------------------

An included script called `futurize
<http://python-future.org/automatic_conversion.html>`_ aids in converting
code (from either Python 2 or Python 3) to code compatible with both
platforms. It is similar to ``python-modernize`` but goes further in
providing Python 3 compatibility through the use of the backported types
and builtin functions in ``future``.


Documentation
-------------

See: http://python-future.org


Credits
-------

:Author: Ed Schofield
:Sponsor: Python Charmers Pty Ltd, Australia, and Python Charmers Pte
Ltd, Singapore. http://pythoncharmers.com
:Others: See docs/credits.rst or http://python-future.org/credits.html


Licensing
---------
Copyright 2013-2015 Python Charmers Pty Ltd, Australia.
The software is distributed under an MIT licence. See LICENSE.txt.



0 comments on commit 2b55d89

Please sign in to comment.