GithubHelp home page GithubHelp logo

conda-forge / xtensor-python-feedstock Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 12.0 166 KB

A conda-smithy repository for xtensor-python.

License: BSD 3-Clause "New" or "Revised" License

Shell 53.81% Batchfile 46.19%

xtensor-python-feedstock's People

Contributors

antoineprv avatar conda-forge-admin avatar conda-forge-curator[bot] avatar davidbrochart avatar h-vetinari avatar johanmabille avatar mariusvniekerk avatar regro-cf-autotick-bot avatar robertodr avatar stuarteberg avatar sylvaincorlay avatar wolfv avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

xtensor-python-feedstock's Issues

The path where headers are installed on Windows is not found (by default) by setuptools

Issue:
On Linux, the conda xtensor-python package installs the headers at $envprefix/include, which is searched by default when building extensions with setuptools. This is good!
On Windows, however, the headers are installed at $envprefix/Library/include, which is not searched by setuptools by default (one needs to fiddle with os.environ["CONDA_PREFIX"] in setup.py to add the path). Instead, they could be installed at $envprefix/include, and things would work fine.

One can repro e.g. by running python setup.py build with the following setup.py:

from setuptools import setup
from pybind11.setup_helpers import Pybind11Extension                                                                                                                                                                                            setup(
    name="testpkg",
    ext_modules=[Pybind11Extension("pkg", ["pkg.cpp"])],
)

and pkg.cpp, basically copied from xtensor-python's docs:

#include <numeric>                        // Standard library import for std::accumulate
#include "pybind11/pybind11.h"            // Pybind11 import to define Python bindings
#include "xtensor/xmath.hpp"              // xtensor import for the C++ universal functions
#define FORCE_IMPORT_ARRAY                // numpy C api loading
#include "xtensor-python/pyarray.hpp"     // Numpy bindings

double sum_of_sines(xt::pyarray<double>& m)
{
    auto sines = xt::sin(m);  // sines does not actually hold values.
    return std::accumulate(sines.cbegin(), sines.cend(), 0.0);
}

PYBIND11_MODULE(pkg, m)
{
    xt::import_numpy();
    m.doc() = "Test module for xtensor python bindings";

    m.def("sum_of_sines", sum_of_sines, "Sum the sines of the input values");
}

(Note that the same problem actually applies for xtensor itself, but I'm only opening it here.)


Environment (conda list):

Clean environment created with conda create -n tmpenv -c conda-forge python=3.9 xtensor-python.

$ conda list
# packages in environment at C:\Users\Antony\miniconda3\envs\tmpenv:
#
# Name                    Version                   Build  Channel
ca-certificates           2021.5.30            h5b45459_0    conda-forge
certifi                   2021.5.30        py39hcbf5309_0    conda-forge
intel-openmp              2021.2.0           h57928b3_616    conda-forge
libblas                   3.9.0                     9_mkl    conda-forge
libcblas                  3.9.0                     9_mkl    conda-forge
liblapack                 3.9.0                     9_mkl    conda-forge
mkl                       2021.2.0           hb70f87d_389    conda-forge
numpy                     1.20.3           py39h6635163_1    conda-forge
openssl                   1.1.1k               h8ffe710_0    conda-forge
pip                       21.1.2             pyhd8ed1ab_0    conda-forge
pybind11                  2.6.2            py39h2e07f2f_0    conda-forge
pybind11-global           2.6.2            py39h2e07f2f_0    conda-forge
python                    3.9.4           h7840368_0_cpython    conda-forge
python_abi                3.9                      1_cp39    conda-forge
setuptools                49.6.0           py39hcbf5309_3    conda-forge
sqlite                    3.35.5               h8ffe710_0    conda-forge
tbb                       2021.2.0             h2d74725_0    conda-forge
tzdata                    2021a                he74cb21_0    conda-forge
vc                        14.2                 hb210afc_4    conda-forge
vs2015_runtime            14.28.29325          h5e1d092_4    conda-forge
wheel                     0.36.2             pyhd3deb0d_0    conda-forge
wincertstore              0.2             py39hcbf5309_1006    conda-forge
xtensor                   0.23.10              h5362a0b_0    conda-forge
xtensor-python            0.25.2           py39h66837cb_0    conda-forge
xtl                       0.7.2                h5362a0b_1    conda-forge

Details about conda and system ( conda info ):
$ conda info
     active environment : tmpenv
    active env location : C:\Users\Antony\miniconda3\envs\tmpenv
            shell level : 3
       user config file : C:\Users\Antony\.condarc
 populated config files :
          conda version : 4.9.2
    conda-build version : 3.20.5
         python version : 3.8.3.final.0
       virtual packages : __win=0=0
                          __archspec=1=x86_64
       base environment : C:\Users\Antony\miniconda3  (writable)
           channel URLs : https://repo.anaconda.com/pkgs/main/win-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/r/win-64
                          https://repo.anaconda.com/pkgs/r/noarch
                          https://repo.anaconda.com/pkgs/msys2/win-64
                          https://repo.anaconda.com/pkgs/msys2/noarch
          package cache : C:\Users\Antony\miniconda3\pkgs
                          C:\Users\Antony\.conda\pkgs
                          C:\Users\Antony\AppData\Local\conda\conda\pkgs
       envs directories : C:\Users\Antony\miniconda3\envs
                          C:\Users\Antony\.conda\envs
                          C:\Users\Antony\AppData\Local\conda\conda\envs
               platform : win-64
             user-agent : conda/4.9.2 requests/2.23.0 CPython/3.8.3 Windows/10 Windows/10.0.19041
          administrator : False
             netrc file : None
           offline mode : False

Allow use of more recent pybind11

Issue:
The version of pybind11 is pinned as >=2.1.0,<2.3 but I think any version >=2.1.0 works with xtensor-python. Is it possible to loosen the upperbound?


Environment (conda list):
$ conda list


Details about conda and system ( conda info ):
$ conda info

Support Pypy as interpreter

Solution to issue cannot be found in the documentation.

  • I checked the documentation.

Issue

I've installed Pypy as my python interpreter, and all the dependencies for xtensor-python (that are listed when I go to install it) have been installed okay when using pypy3 as the chosen interpreter in the environment.

I don't see any hard dependencies in the repo, but when I go to install xtensor-python, mamba is trying to uninstall my Pypy and replace it with CPython.

Is/should Pypy be supported as the interpreter here? Is there perhaps something wrong with my setup, or is this as expected?

Thanks

Installed packages

(XTensorPythonTests-Pypy) 
List of packages in environment: "/MicromambaRoot/envs/XTensorPythonTests-Pypy"

  Name              Version    Build                Channel    
─────────────────────────────────────────────────────────────────
  _libgcc_mutex     0.1        conda_forge          conda-forge
  _openmp_mutex     4.5        2_gnu                conda-forge
  bzip2             1.0.8      h7f98852_4           conda-forge
  ca-certificates   2022.12.7  ha878542_0           conda-forge
  expat             2.5.0      h27087fc_0           conda-forge
  gdbm              1.18       h0a1914f_2           conda-forge
  ld_impl_linux-64  2.39       hcc3a1bd_1           conda-forge
  libblas           3.9.0      16_linux64_openblas  conda-forge
  libcblas          3.9.0      16_linux64_openblas  conda-forge
  libffi            3.4.2      h7f98852_5           conda-forge
  libgcc-ng         12.2.0     h65d4601_19          conda-forge
  libgfortran-ng    12.2.0     h69a702a_19          conda-forge
  libgfortran5      12.2.0     h337968e_19          conda-forge
  libgomp           12.2.0     h65d4601_19          conda-forge
  liblapack         3.9.0      16_linux64_openblas  conda-forge
  libnsl            2.0.0      h7f98852_0           conda-forge
  libopenblas       0.3.21     pthreads_h78a6416_3  conda-forge
  libsqlite         3.40.0     h753d276_0           conda-forge
  libstdcxx-ng      12.2.0     h46fd767_19          conda-forge
  libuuid           2.32.1     h7f98852_1000        conda-forge
  libzlib           1.2.13     h166bdaf_4           conda-forge
  ncurses           6.3        h27087fc_1           conda-forge
  numpy             1.24.1     py39hb10b683_0       conda-forge
  openssl           3.0.7      h0b41bf4_1           conda-forge
  pip               22.3.1     pyhd8ed1ab_0         conda-forge
  pybind11          2.10.3     py39haa83c70_0       conda-forge
  pybind11-global   2.10.3     py39haa83c70_0       conda-forge
  pypy              7.3.9      0_pypy39             conda-forge
  pypy3.9           7.3.9      hd671c94_7           conda-forge
  python            3.9.12     0_73_pypy            conda-forge
  python_abi        3.9        3_pypy39_pp73        conda-forge
  readline          8.1.2      h0f457ee_0           conda-forge
  setuptools        66.1.1     pyhd8ed1ab_0         conda-forge
  sqlite            3.40.0     h4ff8645_0           conda-forge
  tk                8.6.12     h27826a3_0           conda-forge
  tzdata            2022g      h191b570_0           conda-forge
  wheel             0.38.4     pyhd8ed1ab_0         conda-forge
  xtensor           0.24.3     h924138e_1           conda-forge
  xtl               0.7.5      hf52228f_0           conda-forge
  xz                5.2.6      h166bdaf_0           conda-forge
  zlib              1.2.13     h166bdaf_4           conda-forge

Environment info

environment : XTensorPythonTests-Pypy (active)
           env location : //MicromambaRoot/envs/XTensorPythonTests-Pypy
      user config files : /home/user/.mambarc
 populated config files : /home/user/.condarc
       libmamba version : 1.1.0
     micromamba version : 1.1.0
           curl version : libcurl/7.87.0 OpenSSL/1.1.1s zlib/1.2.13 libssh2/1.10.0 nghttp2/1.47.0
     libarchive version : libarchive 3.6.2 zlib/1.2.13 bz2lib/1.0.8 libzstd/1.5.2
       virtual packages : __unix=0=0
                          __linux=5.15.0=0
                          __glibc=2.31=0
                          __archspec=1=x86_64
                          __cuda=11.6=0
               channels : 
       base environment : /MicromambaRoot
               platform : linux-64

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.