Code Monkey home page Code Monkey logo

Comments (2)

jayaddison avatar jayaddison commented on June 27, 2024

Hi @samuelmurail - thanks for the report.

Is it expected to install numpy to build the documentation ?

Generally it is the case that when Sphinx builds Python-based documentation, it reads and evaluates the Python code files within the project.

So in general, it is necessary for your project's Python code to evaluate successfully, including resolution of module imports, etc. As you've found, there are some options to allow mocking-out individual imports in cases where it isn't desirable to have those installed at doc-build-time.

I'm not hugely familiar with cpython, but my guess is that the cimport statement is not mocked out by autodoc_mock_imports -- and that when it is evaluated, it attempts to load some numpy Python modules that you don't have available, causing the module's evaluation (and then your Sphinx project build) to fail.

from sphinx.

jayaddison avatar jayaddison commented on June 27, 2024

I'm not certain that this is a bug, so I'm going to remove the label and relocate this thread into the GitHub discussions area until we confirm either that this is in fact a bug, or perhaps figure out a feature request / enhancement proposal from it.

from sphinx.

Related Issues (20)

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.