1 Cross platform compatibility {#cross_platform}
2 ============================
4 %IMP is designed to run on a wide variety of platforms. To detect problems on
5 other platforms we provide [nightly test runs](https:
6 on the supported platforms
for code that is part of the %IMP repository.
8 In order to make it more likely that your code works on all the supported platforms:
9 - avoid the use of `and` and `or` in C++ code; use `&&` and `||` instead.
10 - avoid `
friend` declarations involving templates; use the preprocessor,
11 conditionally on the symbols `SWIG` and `IMP_DOXYGEN` to hide code as
13 - don
't use Python modules or functions that aren't available in Python 3.6
14 (the oldest version of Python supported by %IMP).
15 -
if you must use an external C++ library, it needs to have a very permissive
16 open source license (such as BSD or LGPL - not GPL) and note that
this
17 will reduce the number of potential users of your code (since it
's another
19 - try to avoid Linux- or Mac-centric coding that won't work on Windows.
20 For example, use `pathlib.Path` or `os.path.join` to join paths in Python,
21 rather than adding the
'/' character. Write utility scripts in Python
22 (which is available on Windows, since the rest of %IMP requires it) not
23 as shell scripts, Perl scripts, etc.