Drop dependency on Python "future" package
It's not widely packaged in Linux distributions, and none of the VIPS Python code requires Python 3 semantics from any of the builtins future was replacing.
This commit is contained in:
parent
01b409bdba
commit
5ed7a24f0c
@ -33,10 +33,3 @@ or
|
|||||||
sudo cp Vips.py /usr/lib/python3/dist-packages/gi/overrides
|
sudo cp Vips.py /usr/lib/python3/dist-packages/gi/overrides
|
||||||
|
|
||||||
You can optionally pre-compile this file for a small speedup.
|
You can optionally pre-compile this file for a small speedup.
|
||||||
|
|
||||||
For python2.7, you need to install the "future" package. In Ubuntu, for
|
|
||||||
example, you can do something like:
|
|
||||||
|
|
||||||
sudo apt-get install python-pip
|
|
||||||
sudo pip install future
|
|
||||||
|
|
||||||
|
@ -3,21 +3,6 @@
|
|||||||
|
|
||||||
from __future__ import division
|
from __future__ import division
|
||||||
|
|
||||||
# if this is py2 and future is not found, it's the first import from builtins
|
|
||||||
# that fails silently, for some reason
|
|
||||||
|
|
||||||
# raise a RuntimeError, this is not caught by our importer
|
|
||||||
|
|
||||||
try:
|
|
||||||
from builtins import map
|
|
||||||
except Exception as e:
|
|
||||||
raise RuntimeError("Unable to import 'map' from 'builtins': " + str(e) +
|
|
||||||
" -- maybe try 'pip install future'")
|
|
||||||
|
|
||||||
from builtins import str
|
|
||||||
from builtins import range
|
|
||||||
from builtins import object
|
|
||||||
|
|
||||||
# overrides for pygobject gobject-introspection binding for libvips, tested
|
# overrides for pygobject gobject-introspection binding for libvips, tested
|
||||||
# with python2.7 and python3.4
|
# with python2.7 and python3.4
|
||||||
|
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
#!/usr/bin/python3
|
#!/usr/bin/python3
|
||||||
|
|
||||||
from __future__ import division
|
from __future__ import division
|
||||||
from builtins import zip
|
|
||||||
from builtins import range
|
|
||||||
import unittest
|
import unittest
|
||||||
import math
|
import math
|
||||||
|
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
#!/usr/bin/python
|
#!/usr/bin/python
|
||||||
|
|
||||||
from builtins import zip
|
|
||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
import math
|
import math
|
||||||
|
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
#!/usr/bin/python
|
#!/usr/bin/python
|
||||||
|
|
||||||
from __future__ import division
|
from __future__ import division
|
||||||
from builtins import zip
|
|
||||||
import unittest
|
import unittest
|
||||||
import math
|
import math
|
||||||
|
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
#!/usr/bin/python3
|
#!/usr/bin/python3
|
||||||
|
|
||||||
from __future__ import division
|
from __future__ import division
|
||||||
from builtins import zip
|
|
||||||
from builtins import range
|
|
||||||
from numbers import Number
|
from numbers import Number
|
||||||
from functools import reduce
|
from functools import reduce
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user