small corrections on install
authorymh <ymh.work@gmail.com>
Fri, 28 Jan 2011 15:42:36 +0100
changeset 3 03918bc7b9f1
parent 2 93d48df946cb
child 4 5f0d8e528663
small corrections on install
.hgignore
src/ldt/setup.py
web/ldtplatform/config.py.tmpl
--- a/.hgignore	Fri Jan 28 14:15:00 2011 +0100
+++ b/.hgignore	Fri Jan 28 15:42:36 2011 +0100
@@ -11,9 +11,13 @@
 syntax: regexp
 ^virtualenv/web/project-boot\.py$
 syntax: regexp
-^web/platform/config\.py$
-^web/platform/\.htaccess$
+^web/ldtplatform/config\.py$
+^web/ldtplatform/\.htaccess$
 ^web/\.htaccess$
 
 syntax: regexp
-^virtualenv/web/distribute-0\.6\.14\.tar\.gz$
\ No newline at end of file
+^virtualenv/web/distribute-0\.6\.14\.tar\.gz$
+syntax: regexp
+^src/ldt/Ldt\.egg-info$
+syntax: regexp
+^src/ldt/dist$
--- a/src/ldt/setup.py	Fri Jan 28 14:15:00 2011 +0100
+++ b/src/ldt/setup.py	Fri Jan 28 15:42:36 2011 +0100
@@ -2,13 +2,27 @@
 from setuptools import setup, find_packages
 
 ROOT_DIR = os.path.dirname(__file__)
-SOURCE_DIR = os.path.join(ROOT_DIR)
+SOURCE_DIR = os.path.join(ROOT_DIR, 'ldt')
 
 version = __import__('ldt').__version__
 
+def fullsplit(path, result=None):
+    """
+    Split a pathname into components (the opposite of os.path.join) in a
+    platform-neutral way.
+    """
+    if result is None:
+       result = []
+    head, tail = os.path.split(path)
+    if head == '':
+        return [tail] + result
+    if head == path:
+        return result
+    return fullsplit(head, [tail] + result)
+
 packages, data_files = [], []
 
-for dirpath, dirnames, filenames in os.walk(django_dir):
+for dirpath, dirnames, filenames in os.walk(SOURCE_DIR):
     # Ignore dirnames that start with '.'
     for i, dirname in enumerate(dirnames):
         if dirname.startswith('.'): del dirnames[i]
--- a/web/ldtplatform/config.py.tmpl	Fri Jan 28 14:15:00 2011 +0100
+++ b/web/ldtplatform/config.py.tmpl	Fri Jan 28 15:42:36 2011 +0100
@@ -3,7 +3,7 @@
 SITE_ID = 1
 
 BASE_DIR = os.path.dirname(os.path.abspath(__file__)).rstrip("/")+"/"
-BASE_URL = '/~ymh/franceculture/'
+BASE_URL = '/~ymh/platform/'
 WEB_URL = 'http://localhost/'
 MEDIA_BASE_URL = BASE_URL + 'static/'
 STREAM_URL = MEDIA_BASE_URL + "/content/"
@@ -35,7 +35,7 @@
 DATABASES = {
     'default': {
         'ENGINE': 'django.db.backends.postgresql_psycopg2', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
-        'NAME': 'franceculture',                      # Or path to database file if using sqlite3.
+        'NAME': 'platform',                      # Or path to database file if using sqlite3.
         'USER': 'iri',                      # Not used with sqlite3.
         'PASSWORD': 'iri',                  # Not used with sqlite3.
         'HOST': 'localhost',                      # Set to empty string for localhost. Not used with sqlite3.