Commit Graph
495 Commits
Author SHA1 Message Date
Eisuke Kawashima 67fe818429 Add .gitattributes and renormalize EOL 2022-06-10 17:24:09 +09:00
Geoff Hutchison 7485fcb6ae Merge pull request #2289 from cygwin-lem/pr_make_install_dirs_for_bindings_configurable
Make install-dir configurable for each binding
2022-06-09 18:44:57 -04:00
Geoff Hutchison 18665b94fe Merge pull request #2466 from e-kwsm/IOError
python: replace IOError with OSError
2022-06-09 18:35:15 -04:00
Geoff Hutchison 7ab11297bb Merge pull request #2468 from e-kwsm/unittest
test(python): modernize use of asserts
2022-06-09 18:31:34 -04:00
Eisuke Kawashima 0f4af753d4 test(python): improve usages of unitest.TestCase methods 2022-04-27 13:26:48 +09:00
Eisuke Kawashima 77530fb0aa python: replace IOError with OSError
https://peps.python.org/pep-3151/
2022-04-25 16:37:29 +09:00
dkoes 4ba2fec17b Resolve ImportError with make test
This change will build _openbabel.so in scripts/python/openbabel instead
of the default build/lib.  This is necessary because openbabel.py tries
to import _openbabel like this:

if __package__ or "." in __name__:
    from . import _openbabel
else:
    import _openbabel

This results in a circular import error when running make test (the
first branch of the if is triggered).  This code appears to be generated by
SWIG with no obvious way to change it to catch the ImportError and call
import _openbabel instead.  Note the PYTHONPATH is set to include
build/lib, but it doesn't matter because SWIG is forcing the import to
happen in scripts/python/openbabel.

I'm not sure why this hasn't been a problem in the past, perhaps there's
been a change in SWIG.  This is with SWIG 4.0.1 and cmake 3.18.6.

I think the best solution is to move all the files that are being built
in /scripts to the build directory rather than polluting the src tree
with them, but this would require changing all the bindings and I'm not
up for building and testing every binding.
2021-06-07 11:04:25 -04:00
Geoff Hutchison c3143e6235 Merge pull request #2243 from baoilleach/javadoc
Support Javadoc from doxygen for SWIG 4.0 Java bindings
2021-04-12 20:17:14 -04:00
Geoff Hutchison af94e4f2ed Merge pull request #2242 from baoilleach/enable_pydoc
Support Doxygen comments in SWIG Python bindings
2021-04-12 20:16:58 -04:00
Geoff Hutchison 8598a8115d Merge pull request #2283 from dkoes/issue1999
Resolve Issue #1999
2021-02-23 19:18:09 -05:00
dkoes f68dbd4a7f Fix missing atom pybel properties.
Some properties (e.g. implicitvalence) are no longer available.
Also added index as a property and a test.
2020-10-26 21:43:32 -04:00
Lemures Lemniscati 234e6f769b Make PHP_INSTDIR configurable 2020-10-20 21:21:27 +09:00
Lemures Lemniscati 5a8423e5d7 Make CSHARP_INSTDIR configurable 2020-10-20 21:21:26 +09:00
Lemures Lemniscati ea693e7475 Make RUBY_INSTDIR configurable 2020-10-20 21:21:25 +09:00
Lemures Lemniscati 8d4ce03a2c Make PERL_INSTDIR configurable 2020-10-20 21:21:24 +09:00
Lemures Lemniscati 0d554f91e4 Make R_INSTDIR configurable 2020-10-20 21:21:23 +09:00
Lemures Lemniscati 78599c5602 Make JAVA_INSTDIR configurable 2020-10-20 21:21:22 +09:00
Lemures Lemniscati f7910915c9 Make PYTHON_INSTDIR configurable 2020-10-20 21:21:21 +09:00
dkoes bb7b0fc71e Resolve Issue #1999
Include kekulize.h in bindings so you can run OBKekulize.
2020-09-26 20:37:14 -04:00
Noel O'Boyle d4eae670e9 Enable Javadoc for SWIG 4.0 2020-05-25 09:39:00 +01:00
Noel O'Boyle ae7c86c243 Ensure that the code works with both SWIG 3 and SWIG 4. Also avoid non-ascii symbols in Doxygen as it can break some Python processing downstream. 2020-05-25 07:44:26 +01:00
Noel O'Boyle ecd2a49d98 For SWIG 4.0, enable doxygen comments in Python bindings 2020-05-24 11:16:09 +01:00
Noel O'Boyle d927b6e21a Revert the slash n change 2020-05-23 10:25:01 +01:00
Noel O'Boyle 732444b176 Support Python 2.7. Also Python 3.8. 2020-05-23 10:03:38 +01:00
Geoff Hutchison 1e593abc1e Bump version number for 3.1 release (#2190)
* Bump version number for 3.1 release
2020-05-05 16:43:41 -04:00
David KoesandDavid Koes 4b5d4c426f IsElement implemention, make OBElements::Element enum (#1754)
* IsElement implemention, make OBElements::Element enum

* Fix php include.  Consistent renaming.

Resname all the single character residue constants.  Do this instead of
defining natively in python since the actual constants are arbitrary and
so could change (unlike elements)

Co-authored-by: David Koes <dkoes@beefy.dcb.private.net>
2020-05-03 15:25:03 -04:00
Noel O'Boyle 15552f7f62 Merge pull request #2186 from baoilleach/workaroundswigjava
Workaround for SWIG 4.0.1 Java source code problem
2020-05-02 13:50:59 +01:00
Noel O'Boyle 839415aa61 Workaround a problem in SWIG 4.0.1 (at least) where the generated Java source relies on reserve being present 2020-05-02 12:41:42 +01:00
Maksim Rakitin fe72644433 Do not use six 2020-04-06 21:53:11 -04:00
Maksim Rakitin 08b7fc9b59 Fix the import of Tkinter in Python 3+ 2020-04-03 14:03:31 -04:00
kevin aac13e34cf R script updates (#2145)
* changes for building ChemmineOB
* removed some local changes
2020-04-03 11:35:26 -04:00
Noel O'Boyle 686ee22f21 Merge pull request #2124 from baoilleach/CastStereoBase
Enable casting to StereoBase in the Python bindings
2020-02-20 21:34:45 +00:00
Noel O'Boyle efaa11d91c Add cast to StereoBase 2020-02-03 21:08:06 +00:00
Noel O'Boyle cd07cc0680 Correct the path to the openbabel-python.cpp so that the Python bindings can be built directly from the source release (i.e. without SWIG). 2020-01-20 20:46:21 +00:00
Eisuke Kawashima 7bf2ec203f Update scripts/python/setup.py 2019-10-11 16:43:46 +09:00
Eisuke Kawashima 8a8ede202b Update INSTALL and READMEs under scripts/ [ci skip]
- perl
    - assume perl-binding version is different from Open Babel's
- python
    - assume tarball from github release page
    - note: `python scripts/python/setup.py install` does not work since `__init__.py` is missing
2019-10-11 16:06:16 +09:00
Eisuke Kawashima b657ca216c Fix import of openbabel 2019-10-10 16:54:59 +09:00
Geoff Hutchison 72e74f8324 Fix CMake error with R and C# bindings 2019-10-03 16:25:39 -04:00
David Koes 9dc3400028 Merge remote-tracking branch 'openbabel/master' into some_tests 2019-09-19 13:45:41 -04:00
Noel O'Boyle c9daca8f2a Update the CSharp bindings 2019-09-12 15:43:41 +01:00
David Koes 2694e44605 Merge remote-tracking branch 'upstream/master' into some_tests 2019-09-03 22:46:08 +01:00
David Koes 20a47d77c1 Merge branch 'master' into some_tests 2019-07-28 22:36:18 -04:00
Yi-Shu Tu 2a333f90ab typo fix 2019-07-10 11:06:57 +08:00
Yi-Shu Tu 4d312ea42b update the docstring, remove old properties
old properties will raise the error
2019-07-10 10:59:21 +08:00
Yi-Shu Tu a3700549ad Make pybel compatible with #1975 2019-07-08 15:32:13 +08:00
David Koes 30fcd3163e Address Ubuntu bug in defining python install dir
See https://bugs.launchpad.net/ubuntu/+source/python3-defaults/+bug/1814653
Fix might be slightly fragile - not sure if it would be better to check
for Ubuntu 18.04 directly
2019-06-04 15:02:35 -04:00
dkoes f69ef54441 Merge remote-tracking branch 'openbabel/master' 2019-05-03 19:10:03 -04:00
David Koes 59a8d6c4de Merge branch 'obrms_enhancement' 2019-05-03 17:17:03 -04:00
Noel O'Boyle 532ca37c32 Merge pull request #1970 from e-kwsm/improve-python
Improve python script
2019-04-18 08:26:25 +01:00
Noel O'Boyle d28440de93 Merge pull request #1971 from yishutu/pybel_with
Make `pybel.Outputfile` compatible with `with` statment
2019-04-18 08:24:04 +01:00