pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: graphite deps problem?



On Thu, Mar 23, 2017 at 6:01 PM, George Georgalis <george%galis.org@localhost> wrote:
> On Thu, Mar 23, 2017 at 5:39 PM, Greg Troxel <gdt%lexort.com@localhost> wrote:
>>
>> George Georgalis <george%galis.org@localhost> writes:
>>
>>> Maybe this is the problem:
>>>
>>> https://github.com/sii/siptrackweb/issues/13
>>>
>>> stemid commented on Oct 26, 2016
>>>
>>> @sii this is most likely solved now considering you've upgraded
>>> urls.py to be more modern using list(urlpatterns) instead of patterns.
>>>
>>> Is there a test already that I can use for debugging my setup?
>>>
>>>   File "/usr/pkg/lib/python2.7/site-packages/graphite/urls.py", line
>>> 29, in <module>
>>>     urlpatterns = patterns('',
>>> NameError: name 'patterns' is not defined
>>
>> You can also read the upstream README about requirements and verify that
>> these are expressed in the Makefile.  I realize that sounds hard, but
>> the issue is likely that some python dependency that's supposed to be
>> there or is supposeed to be newer isn't.  Now we see the violence
>> inherent in the system (of run-time binding and latent typing).
>>
>
> Thanks, I'm going to try HEAD pkgsrc and see how that goes...

/usr/pkg/lib/python2.7/site-packages/graphite/urls.py:
...
urlpatterns = [
  url(r'^admin/', include(admin.site.urls)),
  url(r'^render/?', include('graphite.render.urls')),
  url(r'^cli/?', include('graphite.cli.urls')),
  url(r'^composer/?', include('graphite.composer.urls')),
  url(r'^metrics/?', include('graphite.metrics.urls')),
  url(r'^browser/?', include('graphite.browser.urls')),
  url(r'^account/?', include('graphite.account.urls')),
  url(r'^dashboard/?', include('graphite.dashboard.urls')),
  url(r'^whitelist/?', include('graphite.whitelist.urls')),
  url(r'^content/(?P<path>.*)$', 'django.views.static.serve',
{'document_root' : settings.CONTENT_DIR}),
  url(r'^version/', include('graphite.version.urls')),
  url(r'^events/', include('graphite.events.urls')),
  url(r'^s/(?P<path>.*)', 'graphite.url_shortener.views.shorten'),
  url(r'^S/(?P<link_id>[a-zA-Z0-9]+)/?$',
'graphite.url_shortener.views.follow'),
  url(r'', 'graphite.browser.views.browser'),
]


/usr/pkg/lib/python2.7/site-packages/graphite/render/urls.py:
...
urlpatterns = [
  url(r'local/?$','renderLocalView'),
  url(r'~(?P<username>[^/]+)/(?P<graphName>[^/]+)/?','renderMyGraphView'),
  url(r'', 'renderView'),
]


That silenced the errors, but django now seems to require a patch on:
/usr/pkg/lib/python2.7/site-packages/django/conf/urls/__init__.py

When I initialize the db:
PYTHONPATH=$GRAPHITE_ROOT/webapp /usr/pkg/bin/django-admin2.7.py
migrate --settings=graphite.settings --run-syncdb

seem to get wrong management of patterns/urlpatterns...
Not sure how to fix, here is the error

...
  File "/usr/pkg/lib/python2.7/site-packages/graphite/render/urls.py",
line 22, in <module>
    url(r'local/?$','renderLocalView'),
  File "/usr/pkg/lib/python2.7/site-packages/django/conf/urls/__init__.py",
line 85, in url
    raise TypeError('view must be a callable or a list/tuple in the
case of include().')
TypeError: view must be a callable or a list/tuple in the case of include().


Home | Main Index | Thread Index | Old Index