[or-cvs] r20918: {projects} Fixed install via setup.py (projects/gettor)
kaner at seul.org
kaner at seul.org
Sun Nov 8 00:27:21 UTC 2009
Author: kaner
Date: 2009-11-07 19:27:21 -0500 (Sat, 07 Nov 2009)
New Revision: 20918
Modified:
projects/gettor/MANIFEST.in
projects/gettor/setup.py
Log:
Fixed install via setup.py
Modified: projects/gettor/MANIFEST.in
===================================================================
--- projects/gettor/MANIFEST.in 2009-11-07 21:13:50 UTC (rev 20917)
+++ projects/gettor/MANIFEST.in 2009-11-08 00:27:21 UTC (rev 20918)
@@ -1 +1,2 @@
-include README TODO
+include README TODO README.USER-HOWTO README.locale-spec-draft
+recursive-include i18n *
Modified: projects/gettor/setup.py
===================================================================
--- projects/gettor/setup.py 2009-11-07 21:13:50 UTC (rev 20917)
+++ projects/gettor/setup.py 2009-11-08 00:27:21 UTC (rev 20918)
@@ -3,9 +3,24 @@
# GetTor installer & packer
import glob
+import os
+import sys
from distutils.core import setup
+TRANSLATION_DIR='i18n'
+data_files = dict()
+for filename in os.listdir(TRANSLATION_DIR):
+ if filename.endswith('.svn'):
+ continue
+ dir = os.path.join(TRANSLATION_DIR, filename)
+ if dir.endswith('templates'):
+ file = "gettor.pot"
+ else:
+ file = "gettor.po"
+ pofile = os.path.join(dir, file)
+ data_files[dir] = [pofile]
+
setup(name='GetTor',
version='0.1',
description='GetTor enables users to obtain Tor via email',
@@ -14,6 +29,7 @@
url='https://www.torproject.org/gettor/',
package_dir={'': 'lib'},
packages=['gettor'],
+ data_files = data_files.items(),
scripts = ["GetTor.py"],
py_modules=['GetTor'],
long_description = """Really long text here."""
More information about the tor-commits
mailing list