Skip to content

Commit

Permalink
removed thirdparty modules pytz and pyparsing
Browse files Browse the repository at this point in the history
Closes: lp#1077338

Removing included third party modules make it better to include Graphite into Debian.
  • Loading branch information
hggh committed Nov 16, 2012
1 parent 5e8f1d2 commit 47361a2
Show file tree
Hide file tree
Showing 18 changed files with 20 additions and 6,048 deletions.
1 change: 0 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ include check-dependencies.py
include examples/*
include conf/*.example
include webapp/graphite/local_settings.py.example
include webapp/graphite/thirdparty/pytz/pytz-LICENSE.txt
recursive-include distro/ *
recursive-include webapp/graphite/ *.html
recursive-include webapp/content/ *
Expand Down
13 changes: 13 additions & 0 deletions check-dependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,19 @@
django = None
fatal += 1

# Test for pytz
try:
import pytz
except:
print "[FATAL] Unable to import the 'pytz' module, do you have pytz module installed for python %s?\n" % py_version
fatal += 1

# Test for pyparsing
try:
import pyparsing
except:
print "[FATAL] Unable to import the 'pyparsing' module, do you have pyparsing module installed for python %s?\n" % py_version
fatal += 1

# Test for django-tagging
try:
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,6 @@ simplejson==2.1.6
django-tagging==0.3.1
gunicorn
pytz
pyparsing
http://cairographics.org/releases/py2cairo-1.8.10.tar.gz
git+git://github.com/graphite-project/whisper.git#egg=whisper
2 changes: 2 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ requires = Django => 1.1.4
python-simplejson
python-sqlite2
python-hashlib
pytz
pyparsing

post-install = distro/redhat/misc/postinstall

Expand Down
2 changes: 0 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,6 @@
'graphite.graphlot',
'graphite.events',
'graphite.version',
'graphite.thirdparty',
'graphite.thirdparty.pytz',
],
package_data={'graphite' :
['templates/*', 'local_settings.py.example']},
Expand Down
2 changes: 1 addition & 1 deletion webapp/graphite/cli/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
See the License for the specific language governing permissions and
limitations under the License."""

from graphite.thirdparty.pyparsing import *
from pyparsing import *

grammar = Forward()

Expand Down
6 changes: 1 addition & 5 deletions webapp/graphite/render/attime.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,7 @@
from time import daylight
from django.conf import settings

try: # See if there is a system installation of pytz first
import pytz
except ImportError: # Otherwise we fall back to Graphite's bundled version
from graphite.thirdparty import pytz

import pytz

months = ['jan','feb','mar','apr','may','jun','jul','aug','sep','oct','nov','dec']
weekdays = ['sun','mon','tue','wed','thu','fri','sat']
Expand Down
5 changes: 1 addition & 4 deletions webapp/graphite/render/glyph.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,7 @@
from graphite.util import json


try: # See if there is a system installation of pytz first
import pytz
except ImportError: # Otherwise we fall back to Graphite's bundled version
from graphite.thirdparty import pytz
import pytz

INFINITY = float('inf')

Expand Down
2 changes: 1 addition & 1 deletion webapp/graphite/render/grammar.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from graphite.thirdparty.pyparsing import *
from pyparsing import *

ParserElement.enablePackrat()
grammar = Forward()
Expand Down
3 changes: 0 additions & 3 deletions webapp/graphite/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
WEB_DIR = dirname( abspath(__file__) )
WEBAPP_DIR = dirname(WEB_DIR)
GRAPHITE_ROOT = dirname(WEBAPP_DIR)
THIRDPARTY_DIR = join(WEB_DIR,'thirdparty')
# Initialize additional path variables
# Defaults for these are set after local_settings is imported
CONTENT_DIR = ''
Expand All @@ -47,8 +46,6 @@
CLUSTER_SERVERS = []

sys.path.insert(0, WEBAPP_DIR)
# Allow local versions of the libs shipped in thirdparty to take precedence
sys.path.append(THIRDPARTY_DIR)

# Cluster settings
CLUSTER_SERVERS = []
Expand Down
Empty file.
Loading

0 comments on commit 47361a2

Please sign in to comment.