Giter Club home page Giter Club logo

Comments (5)

Oglopf avatar Oglopf commented on August 29, 2024

Moving further along and seeing more problems.

When issuing rake pipenv:build the following exception occurs:

Could not import extension sphinx.builders.latex (exception: cannot import name 'contextfunction' from 'jinja2' (/home/trav/dvlmnt/ood-documentation/.venv/lib/python3.10/site-packages/jinja2/__init__.py))

So now the question is whether I'm using the correct version of Sphinx and it's dependencies (Jinja2 is installed during the pip3 install Sphinx command below). But I can't find any requirements in the repo for this.

Also, to even get this far one would have to have ran pip3 install Sphinx as well, which we should also include as a step in the build.

Current setup:

ubuntu   22.04
python   3.10
pip3     22.0.2
pipenv   2022.11.30
Jinja2   3.1.2
Sphinx   5.3.0

I'm going to play with these dependencies since I can just pip3 uninstall/install <software>==<version> them to see what I can get to match up and give a working build (hopefully 🤞 ).

from ood-documentation.

Oglopf avatar Oglopf commented on August 29, 2024

In order for the docs to have the right versions, you need to activate the actual venv with the pipenv shell command, which should be added as a rake task as well if we provide one already for some of this. Something like:

rake pipenv:activate_env

With the easy addition of the following task in the Rakefile:

namespace :pipenv do
...
  desc "Start pipenv shell and correct python version to build docs"
  task :activate_env do
    exec 'WORKDIR=/doc PIPENV_VENV_IN_PROJECT=1 pipenv shell'
    exec 'pipenv install --python 2.7'
    exec 'pipenv --python 2.7'
  end
...
end

Once setting the shell up correctly I then had to still clear the error due to a change in jinja2 for a method name from contextfunction to context_pass in jinja2 versions >= 3.0.0.

So, building this with the Jinja2 version set to 2.10.1 still satisfies security requirement in the Pipfile it is under and moved things along again.

from ood-documentation.

Oglopf avatar Oglopf commented on August 29, 2024

I'm guessing overall the use of >= for depencies needs checked as the next error is similar:

ImportError: cannot import name 'soft_unicode' from 'markupsafe'

I'll have to see what is pulling this in as it is likely a problem with the various >= being set in the Pipfile for:

requests = ">=2.20.0"
urllib3 = ">=1.24.2"

from ood-documentation.

Oglopf avatar Oglopf commented on August 29, 2024

Looks like the version of markupsafe is what needs controlled here. Build moved forward with:

markupsafe==2.0.1

While previously it would not work with 2.1.1.

from ood-documentation.

Oglopf avatar Oglopf commented on August 29, 2024

Ultimately the pipenv setup was very broken and given we already have a simple container method to build the docs, we should remove these instructions.

It is also easier for us as we know have one way to build, using containers, which will be much easier for users and maintainers.

from ood-documentation.

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.