mirror of
https://github.com/openbabel/openbabel.git
synced 2026-08-10 04:58:04 -05:00
Necessary fixes for pybel tests to pass on Windows. The original problem was that FP3 was unable to find patterns.txt, which means that the installer needs to install the data files somewhere, and BABEL_DATADIR needs to be set appropriately. The following changes were made:
* windows-vc2005/OBPython/setup.py: Install data files (e.g. patterns.txt needed for FP3) into site-packages/openbabel_data * scripts/openbabel-python.i: For Windows installs, set BABEL_DATADIR to the location into which the binary installer installs the data files * src/fingerprints/finger3.cpp: Replace instances of "/" by FILE_SEP_CHAR
This commit is contained in:
@@ -1,3 +1,14 @@
|
||||
2006-12-20 Noel O'Boyle <baoilleach@gmail.com>
|
||||
|
||||
* windows-vc2005/OBPython/setup.py: Install data files (e.g.
|
||||
patterns.txt needed for FP3) into site-packages/openbabel_data
|
||||
|
||||
* scripts/openbabel-python.i: For Windows installs, set BABEL_DATADIR
|
||||
to the location into which the binary installer installs the data files
|
||||
|
||||
* src/fingerprints/finger3.cpp: Replace instances of "/" by
|
||||
FILE_SEP_CHAR
|
||||
|
||||
2006-12-18 Geoffrey Hutchison <babel@geoffhutchison.net>
|
||||
|
||||
* scripts/python/setup.py, scripts/perl/Makefile.PL: Updates from
|
||||
|
||||
@@ -1,5 +1,17 @@
|
||||
%module openbabel
|
||||
|
||||
// For Windows, if not already set, set BABEL_DATADIR to
|
||||
// $PYTHONDIR/Lib/site-packages/openbabel_data
|
||||
// (This is necessary for using FP3, for example)
|
||||
%pythoncode %{
|
||||
import os, sys
|
||||
if sys.platform=="win32":
|
||||
if not os.environ.has_key('BABEL_DATADIR'):
|
||||
os.environ['BABEL_DATADIR'] = os.path.join(sys.prefix, "Lib",
|
||||
"site-packages",
|
||||
"openbabel_data")
|
||||
%}
|
||||
|
||||
%{
|
||||
// used to set import/export for Cygwin DLLs
|
||||
#ifdef WIN32
|
||||
|
||||
@@ -95,7 +95,7 @@ public:
|
||||
if(datadir)
|
||||
{
|
||||
file = datadir;
|
||||
file += "/";
|
||||
file += FILE_SEP_CHAR;
|
||||
file += filename;
|
||||
}
|
||||
|
||||
@@ -104,9 +104,9 @@ public:
|
||||
if(!(*ifsP))
|
||||
{
|
||||
file = datadir;
|
||||
file += "/";
|
||||
file += FILE_SEP_CHAR;
|
||||
file += BABEL_VERSION;
|
||||
file += "/" + filename;
|
||||
file += FILE_SEP_CHAR + filename;
|
||||
ifs2.open(file.c_str());
|
||||
ifsP = &ifs2;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env python
|
||||
from distutils.core import *
|
||||
import os, shutil
|
||||
import os, shutil, glob
|
||||
|
||||
about = """The Open Babel package provides a Python wrapper
|
||||
to the Open Babel C++ chemistry library. Open Babel is a project
|
||||
@@ -17,7 +17,7 @@ development.
|
||||
shutil.copy("../../scripts/python/pybel.py", ".")
|
||||
|
||||
setup(name='openbabel-python',
|
||||
version='1.0',
|
||||
version='1.0b1',
|
||||
author='The Open Babel development team',
|
||||
author_email='openbabel-scripting@lists.sourceforge.net',
|
||||
url='http://openbabel.sourceforge.net/wiki/Python',
|
||||
@@ -26,7 +26,10 @@ setup(name='openbabel-python',
|
||||
# package_dir = {'': '../../scripts/python'},
|
||||
data_files=[('Lib/site-packages',
|
||||
['_openbabel.pyd', '../libinchi.dll',
|
||||
'../libxml2.dll', 'OpenBabelDLL.dll'])],
|
||||
'../libxml2.dll', 'OpenBabelDLL.dll']),
|
||||
('Lib/site-packages/openbabel_data',
|
||||
glob.glob("../../data/*.txt"))
|
||||
],
|
||||
description = 'openbabel: Python interface to the Open Babel chemistry library',
|
||||
classifiers=[
|
||||
'Development Status :: 5 - Production/Stable',
|
||||
|
||||
Reference in New Issue
Block a user