Vladimír Vondruš
b1d45fc85a
Updated copyright year.
6 years ago
Vladimír Vondruš
86bac39471
Adapt to Corrade changes.
6 years ago
Vladimír Vondruš
a6dd10ae69
python: we don't use pybind11 exceptions anymore, so this is not needed.
...
Also fixes cmpilation with pybind11 >= 2.4.0.
7 years ago
Vladimír Vondruš
f20c5beb76
python: move away from concrete pybind exceptions.
...
Use only py::error_already_set as that's the least heavy of them. Also
changed all occurences of "throw" to "raise" so next time I'm doing a
prune of all C++ exceptions for good, those are easy to find.
7 years ago
Vladimír Vondruš
7da09f9080
python: expose basic image import in trade.
...
Quite a huge commit because it all needs to be tested together.
7 years ago
Vladimír Vondruš
2eebb45557
python: don't keep a reference to owner for empty array views.
...
We don't need to reference anything from it anyway.
7 years ago
Vladimír Vondruš
e18fbdbb16
python: raise an exception on plugin load/unload failure.
...
Because that makes sense. Returning some None doesn't.
7 years ago
Vladimír Vondruš
6dd3e2fd6d
python: those pluginmanager APIs should have been properties.
...
Not functions.
7 years ago
Vladimír Vondruš
859309b07c
python: actually install the corrade.pluginmanager module.
...
Pusing this to master was a misteak. Yum.
7 years ago
Vladimír Vondruš
0c9cd88fd3
python: doc++
7 years ago
Vladimír Vondruš
9faed0651e
python: expose basics of plugin manager.
...
Just the minimum needed to get Trade::AbstractImporter running.
7 years ago
Vladimír Vondruš
c8e99ca086
python: expose corrade and magnum compilation defines.
7 years ago
Vladimír Vondruš
ff9003d10c
python: silence annoying GCC 4.8 warnings.
7 years ago
Vladimír Vondruš
fd85c2ff81
python/corrade: huh, this one was missing.
7 years ago
Vladimír Vondruš
e8198cb97e
python: fix PyInit_* declarations to work on Windows as well.
...
Co-authored-by: Cameron Egbert <cegbert@oculus.com>
7 years ago
Vladimír Vondruš
68e28685ff
python: fix Clang's -Wmissing-prototypes warnings.
...
This is a temporary change until a PR fixing this on pybind11 side is
merged (and a new version released).
7 years ago
Vladimír Vondruš
f3c0454c72
python: ensure memory owners are compared with `is`.
...
Otherwise it gives false positives (as was the case with one
comparison).
7 years ago
Vladimír Vondruš
c40627c96c
python: better name [Strided]ArrayView memory owner property.
...
Mirroring Python's obj is not good, as the name is absolutely not
describing what it is.
7 years ago
Vladimír Vondruš
76d7ee0dc7
python: store memory owner references in the holder type instead.
...
Compared to having to subclass every type that can reference external
data, this has several advantages for 3rd party binding code:
* it doesn't need to worry about the additional type when binding
function arguments (currently it had to provide lambdas that accept
the PyFoo subtype instead of just Foo)
* and it can now easily bind those types also for function
return values and properties -- the return type doesn't need to be
subclassed (which in case of move-only types is practically
impossible) but instead just wrapped in a holder along with the
memory owner object reference
The new holders also assert that memory owner is always specified unless
the data is empty.
7 years ago
Vladimír Vondruš
e28e58b5b8
python: hide cryptic shit in less cryptic wrappers.
...
UGH.
7 years ago
Vladimír Vondruš
4cbda8081b
corrade/containers: finally give up on testing ArrayView dimensions.
...
Numpy's array sometimes has 0 dimensions even though everything else is
okay.
7 years ago
Vladimír Vondruš
b3206b138f
python/corrade: implicit conversion of np.array to (Strided)ArrayView.
7 years ago
Vladimír Vondruš
a18c438352
python: so we need MutableStridedArrayView4D as well.
...
In order to access pixel data in 3D images, of course.
7 years ago
Vladimír Vondruš
f1aeb0fd0e
python: whoops, forgot to bind some MutableStridedArrayView3D functions.
7 years ago
Vladimír Vondruš
0170dea8f4
python: consolidate buffer-related headers.
7 years ago
Vladimír Vondruš
f9a2146142
python/corrade: remove TODOs that are impossible.
7 years ago
Vladimír Vondruš
ce3d2564fd
python/corrade: make our own buffer protocol for array views.
...
THe one from pybind11 is severely limited and allocation-happy. Lots of
tech debt and TODOs resolved now, yay.
7 years ago
Vladimír Vondruš
c261dd1e8c
python: this is about to get upstreamed.
7 years ago
Vladimír Vondruš
aae98e0f02
python: remove pybind11 2.2.4 workarounds.
7 years ago
Vladimír Vondruš
39f2699b90
python: more yelling at the buildsystem.
7 years ago
Vladimír Vondruš
d050145e51
python: put everything into a single module if magnum is built statically.
...
That makes it much easier to handle in that case (because that's the
whole point of static builds) and also nicely circumvents any issues
with duplicated global data when a static lib would be linked to
multiple dynamic libraries.
7 years ago
Vladimír Vondruš
21ee51fd96
python: do as little as possible in PYBIND11_MODULE.
7 years ago
Vladimír Vondruš
2ae83a0c26
python: make ArrayView properly convertible from Python array.
...
Also fix element sizes that aren't 1.
7 years ago
Vladimír Vondruš
86d64a6a5a
package/archlinux: coverage PKGBUILD.
...
Generating both C++ and Python coverage.
7 years ago
Vladimír Vondruš
03af644506
python: expose minimum of GL::DefaultFramebuffer.
...
Some non-trivial tricks had to be done in order to expose the
GL::defaultFramebuffer variable without causing leaks or double frees.
Also, the AbstractFramebuffer has a protected destructor so this needs
another special handling.
7 years ago
Vladimír Vondruš
d34366ac46
python: expose ArrayView and StridedArrayView.
...
Wow. This took a while and still is far from ideal.
7 years ago