Update create env for PyStemmer on PC.
--- a/virtualenv/res/lib/lib_create_env.py Mon Jun 06 11:54:28 2011 +0200
+++ b/virtualenv/res/lib/lib_create_env.py Mon Jun 06 18:31:47 2011 +0200
@@ -31,6 +31,7 @@
'PIL': {'setup': 'pil', 'url': 'http://effbot.org/media/downloads/PIL-1.1.7.win32-py2.6.exe', 'local':"PIL-1.1.7.win32-py2.6.exe"},
'LXML': {'setup': 'lxml', 'url': 'http://pypi.python.org/packages/2.6/l/lxml/lxml-2.2.2-py2.6-win32.egg', 'local':"lxml-2.2.2-py2.6-win32.egg"},
'PYYAML' : { 'setup': 'PyYAML', 'url': 'http://pyyaml.org/download/pyyaml/PyYAML-3.09.win32-py2.6.exe', 'local': 'PyYAML-3.09.win32-py2.6.exe'},
+ 'PYSTEMMER' : { 'setup': 'pystemmer', 'url': 'PyStemmer_compiled_for_pc.zip', 'local': 'PyStemmer_compiled_for_pc.zip'},
})
else:
URLS.update({
@@ -197,8 +198,22 @@
psycopg2_src_path = os.path.join(psycopg2_base_path, os.listdir(psycopg2_base_path)[0])
shutil.copytree(os.path.join(psycopg2_src_path, 'psycopg2'), os.path.abspath(os.path.join(home_dir, 'Lib/site-packages', 'psycopg2')))
- shutil.copy(os.path.join(psycopg2_src_path, 'psycopg2-2.0.14-py2.6.egg-info'), os.path.abspath(os.path.join(home_dir, 'Lib/site-packages', 'site-packages')))
+ shutil.copy(os.path.join(psycopg2_src_path, 'psycopg2-2.0.14-py2.6.egg-info'), os.path.abspath(os.path.join(home_dir, 'Lib/site-packages')))
+def install_pystemmer(option_str, extra_env, res_source_key, home_dir, lib_dir, tmp_dir, src_dir, res_env, logger, call_subprocess, filter_python_develop):
+ print "install PYSTEMMER from " + res_env.URLS['PYSTEMMER'][res_source_key]
+ pystemmer_src = os.path.join(src_dir,"pystemmer.zip")
+ shutil.copy(res_env.URLS['PYSTEMMER'][res_source_key], pystemmer_src)
+ #extract pystemmer
+ zf = zipfile.ZipFile(pystemmer_src)
+ pystemmer_base_path = os.path.join(src_dir,"pystemmer")
+ zf.extractall(pystemmer_base_path)
+ zf.close()
+
+ shutil.copy(os.path.join(pystemmer_base_path, 'Stemmer.pyd'), os.path.abspath(os.path.join(home_dir, 'Lib/site-packages')))
+ shutil.copy(os.path.join(pystemmer_base_path, 'PyStemmer-1.0.1-py2.6.egg-info'), os.path.abspath(os.path.join(home_dir, 'Lib/site-packages')))
+
+
#TO DO does not work in virtual env
def install_libyaml(option_str, extra_env, res_source_key, home_dir, lib_dir, tmp_dir, src_dir, res_env, logger, call_subprocess, filter_python_develop):
logger.notify("Get libyaml from %s " % res_env.URLS['LIBYAML'][res_source_key])
Binary file virtualenv/res/src/PyStemmer_compiled_for_pc.zip has changed
--- a/virtualenv/web/res/res_create_env.py Mon Jun 06 11:54:28 2011 +0200
+++ b/virtualenv/web/res/res_create_env.py Mon Jun 06 18:31:47 2011 +0200
@@ -1,5 +1,5 @@
from lib_create_env import (lib_generate_install_methods, install_pylucene,
- install_psycopg2, install_libyaml)
+ install_psycopg2, install_pystemmer, install_libyaml)
import platform
@@ -11,6 +11,7 @@
('PSYCOPG2',install_psycopg2,None,None),
('PYLUCENE','easy_install',None,None),
('PYYAML','easy_install',None,None),
+ ('PYSTEMMER',install_pystemmer,None,None),
]
else:
INSTALLS = [