Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
A few changes to fix reporlab dependency to be in the right way
- Loading branch information
|
@@ -43,10 +43,7 @@ |
|
|
- tests - a package with automated doc tests. |
|
|
""" |
|
|
|
|
|
VERSION = (0, 4, 15) |
|
|
|
|
|
def get_version(): |
|
|
return '%d.%d.%d'%VERSION |
|
|
from version import VERSION, get_version |
|
|
|
|
|
__author__ = 'Marinho Brandao' |
|
|
__license__ = 'GNU Lesser General Public License (LGPL)' |
|
|
|
@@ -5,13 +5,9 @@ |
|
|
except NameError: |
|
|
from sets import Set as set # Python 2.3 fallback |
|
|
|
|
|
from reportlab.lib.units import cm |
|
|
from reportlab.lib.pagesizes import A4 |
|
|
from reportlab.lib.colors import black |
|
|
from reportlab.lib.enums import TA_LEFT, TA_CENTER, TA_RIGHT |
|
|
|
|
|
from utils import calculate_size, get_attr_value, landscape, format_date, memoize,\ |
|
|
BAND_WIDTH, BAND_HEIGHT, CROSS_COLS, CROSS_ROWS |
|
|
BAND_WIDTH, BAND_HEIGHT, CROSS_COLS, CROSS_ROWS, cm, A4, black, TA_LEFT, TA_CENTER,\ |
|
|
TA_RIGHT |
|
|
from exceptions import EmptyQueryset, ObjectNotFound, ManyObjectsFound,\ |
|
|
AttributeNotFound, NotYetImplemented |
|
|
from cache import DEFAULT_CACHE_STATUS, CACHE_BACKEND, CACHE_FILE_ROOT |
|
|
|
|
@@ -1,7 +1,5 @@ |
|
|
from reportlab.lib.colors import black |
|
|
from reportlab.lib.units import cm |
|
|
|
|
|
from base import BAND_WIDTH, BAND_HEIGHT, Element |
|
|
from utils import cm, black |
|
|
|
|
|
class Graphic(Element): |
|
|
"""Base graphic class""" |
|
|
|
|
@@ -1,8 +1,18 @@ |
|
|
import sys |
|
|
|
|
|
from reportlab.lib.units import * # Check this - is the source of units |
|
|
from reportlab.lib.pagesizes import * # Check this - is the source of page sizes |
|
|
from reportlab.lib.enums import TA_LEFT, TA_CENTER, TA_RIGHT # Check this also |
|
|
try: |
|
|
import reportlab |
|
|
except ImportError: |
|
|
cm = 28.346456692913385 |
|
|
A4 = (595.275590551181, 841.8897637795275) |
|
|
black = None |
|
|
TA_LEFT, TA_CENTER, TA_RIGHT = 0, 1, 2 |
|
|
landscape = lambda t:(t[1],t[0]) |
|
|
else: |
|
|
from reportlab.lib.units import * # Check this - is the source of units |
|
|
from reportlab.lib.pagesizes import * # Check this - is the source of page sizes |
|
|
from reportlab.lib.enums import TA_LEFT, TA_CENTER, TA_RIGHT # Check this also |
|
|
from reportlab.lib.colors import black |
|
|
|
|
|
from exceptions import AttributeNotFound |
|
|
|
|
|
|
|
@@ -0,0 +1,5 @@ |
|
|
VERSION = (0, 4, 16) |
|
|
|
|
|
def get_version(): |
|
|
return '%d.%d.%d'%VERSION |
|
|
|
|
@@ -5,13 +5,10 @@ |
|
|
except NameError: |
|
|
from sets import Set as set # Python 2.3 fallback |
|
|
|
|
|
from reportlab.lib.units import cm |
|
|
from reportlab.lib.colors import black |
|
|
|
|
|
from base import BAND_WIDTH, BAND_HEIGHT, Element, SubReport |
|
|
from utils import get_attr_value, SYSTEM_FIELD_CHOICES, FIELD_ACTION_VALUE, FIELD_ACTION_COUNT,\ |
|
|
FIELD_ACTION_AVG, FIELD_ACTION_MIN, FIELD_ACTION_MAX, FIELD_ACTION_SUM,\ |
|
|
FIELD_ACTION_DISTINCT_COUNT |
|
|
FIELD_ACTION_DISTINCT_COUNT, cm, black |
|
|
from exceptions import AttributeNotFound |
|
|
|
|
|
class Widget(Element): |
|
|
|
@@ -9,7 +9,7 @@ |
|
|
from setuptools import setup, find_packages |
|
|
|
|
|
from setuptools import setup |
|
|
from geraldo import get_version |
|
|
from geraldo.version import get_version |
|
|
|
|
|
setup( |
|
|
name = 'Geraldo', |
|
|