pkgsrc-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
problems with wip/py-pyside-setup
MLH wrote:
>
> I think what is happening is that py-pyside-setup is not correctly
> setting up the numpy includes as it should with lib/_utils_impl.py :
>
> @set_module('numpy')
> def get_include():
> """
> Return the directory that contains the NumPy \\*.h header files.
>
> Extension modules that need to compile against NumPy may need to use this
> function to locate the appropriate include directory.
>
> Notes
> -----
> When using ``setuptools``, for example in ``setup.py``::
>
> import numpy as np
> ...
> Extension('extension_name', ...
> include_dirs=[np.get_include()])
> ...
>
> Note that a CLI tool ``numpy-config`` was introduced in NumPy 2.0, using
> that is likely preferred for build systems other than ``setuptools``::
>
> $ numpy-config --cflags
> -I/path/to/site-packages/numpy/_core/include
>
> # Or rely on pkg-config:
> $ export PKG_CONFIG_PATH=$(numpy-config --pkgconfigdir)
> $ pkg-config --cflags
> -I/path/to/site-packages/numpy/_core/include
>
> Examples
> --------
> >>> np.get_include()
> '.../site-packages/numpy/core/include' # may vary
>
> """
> import numpy
> if numpy.show_config is None:
> # running from numpy source directory
> d = os.path.join(os.path.dirname(numpy.__file__), '_core', 'include')
> else:
> # using installed numpy core headers
> import numpy._core as _core
> d = os.path.join(os.path.dirname(_core.__file__), 'include')
> return d
$ python3.11 /usr/pkgnew/bin/numpy-config-3.11 --cflags
-I/usr/pkgnew/lib/python3.11/site-packages/numpy/_core/include
So the directory is apparently available but how to add using:
python3.11 /usr/pkgnew/bin/numpy-config-3.11 --cflags
??
Home |
Main Index |
Thread Index |
Old Index