- Python2.7 is installed (Python2.7.6)
- pip is installed. (pip)
- libturpial and Turpial Git repositories are cloned and
development
branch is checked out.
- Install PyQt4 binary by installer (PyQt4-4.10.3-gpl-Py2.7-Qt4.8.5)
Install Babel and Jinja2 by pip:
> pip install babel > pip install jinja2
- Modify
libturpial/setup.py
to avoid error while install.
--- a/setup.py
+++ b/setup.py
@@ -18,7 +18,7 @@ protocol. This library is the backend used for Turpial.
"""
data_files=[
- ('./', ['ChangeLog', 'AUTHORS', 'COPYING']),
+ ('.', ['ChangeLog', 'AUTHORS', 'COPYING']),
]
setup(name="libturpial",
- Modify
Turpial/turpial/ui/qt/webview.py
to correct image paths for Windows (This is a hack!)
diff --git a/turpial/ui/qt/webview.py b/turpial/ui/qt/webview.py
index bb8c8d2..a1f2ca9 100644
--- a/turpial/ui/qt/webview.py
+++ b/turpial/ui/qt/webview.py
@@ -61,7 +61,7 @@ class StatusesWebView(QWebView):
return Template(content)
def __load_stylesheet(self):
- attrs = {
+ attrs = { k: '/' + v.replace('\\', '/') for k, v in {
'mark_protected': os.path.join(self.base.images_path, 'mark-protected.png'),
'mark_favorited': os.path.join(self.base.images_path, 'mark-favorited2.png'),
'mark_repeated': os.path.join(self.base.images_path, 'mark-repeated2.png'),
@@ -79,7 +79,7 @@ class StatusesWebView(QWebView):
'action_favorite_shadowed': os.path.join(self.base.images_path, 'action-favorite-shadowed.png'),
'action_delete': os.path.join(self.base.images_path, 'action-delete.png'),
'action_delete_shadowed': os.path.join(self.base.images_path, 'action-delete-shadowed.png'),
- }
+ }.items() }
stylesheet = self.__load_template('style.css')
return stylesheet.render(attrs)
Install libturpial:
> cd <somewhere>/libturipal > python setup.py install
This automatically installs
oauth
,simplejson
andrequests
.Install Turpial:
> cd <somewhere>/Turipal > python setup.py install
Could you explain why did you need to change the attrs dict? I mean, the os.path.join should consider different path separators according the OS. If this attr cause you an error could you post here the output so I can try to reproduce it (and identify it).
Thanks!