This fixes the installation process so that installing nnef-tools will now also install numpy as it is a build and runtime dependency. This can now be installed in virtual environments without manually specifying the dependency on numpy as well as with other package managers e.g. poetry.
I locked the numpy version to be above 1.13 because that's when __NUMPY_SETUP__ became deprecated. If this was to support older versions of numpy, we'd have to add a try-except block to check for __NUMPY_SETUP__ in finalize_options. We can also lock the version higher.
setup_requires is required, without it the build doesn't work - I think with setup_required, numpy is installed before building nnef-tools. Without it it might be installed after.
@mt-krainski, so this is to replace #158 right? I like this solution, it looks cleaner to me. So if we merge this one, we can drop the other one, right?
Taking over https://github.com/KhronosGroup/NNEF-Tools/pull/158.
This fixes the installation process so that installing nnef-tools will now also install numpy as it is a build and runtime dependency. This can now be installed in virtual environments without manually specifying the dependency on numpy as well as with other package managers e.g. poetry.
I locked the numpy version to be above 1.13 because that's when
__NUMPY_SETUP__
became deprecated. If this was to support older versions of numpy, we'd have to add a try-except block to check for__NUMPY_SETUP__
infinalize_options
. We can also lock the version higher.setup_requires
is required, without it the build doesn't work - I think withsetup_required
,numpy
is installed before building nnef-tools. Without it it might be installed after.