Giter VIP home page Giter VIP logo

Comments (11)

dhellmann avatar dhellmann commented on July 20, 2024 1

I did a little bit once to update to 3.8 (see https://github.com/dhellmann/pymotw-3/tree/py38) but haven't looked at updating to anything newer.

What I usually do is remove the version numbers from the requirements list to install the latest versions, then use pip freeze to build the the list of the versions that I actually used so it's easier to reproduce the environment again.

from pymotw-3.

dhellmann avatar dhellmann commented on July 20, 2024 1

The build system uses Paver. The commands you can use are all defined in https://github.com/dhellmann/pymotw-3/blob/master/pavement.py. For example, https://github.com/dhellmann/pymotw-3/blob/master/pavement.py#L191 implements the paver html command.

from pymotw-3.

dhellmann avatar dhellmann commented on July 20, 2024 1

You could look at how paver is calling sphinx. I really don't remember all of the customizations that are in place there. Some of it had to do with integrating cog to generate the inline examples.

from pymotw-3.

nazarepiedady avatar nazarepiedady commented on July 20, 2024

@dhellmann Thanks, I want to serve the project on readthedocs.org, so what can I do to serve the project there readthedocs.org?

Until now all the builds I made failed, and Read The Docs use Python 3.7 to build the project. I received this error:

Could not import runpy module
Traceback (most recent call last):
  File "/home/docs/.pyenv/versions/3.7.9/lib/python3.7/runpy.py", line 17, in <module>
    from pkgutil import read_code, get_importer
ImportError: cannot import name 'read_code' from 'pkgutil' (/home/docs/checkouts/readthedocs.org/user_builds/pymotw-3-pt/checkouts/latest/source/pkgutil/__init__.py)

I keep the work here nazarepiedady/pymotw-3-pt, so could you say what I am not doing?

from pymotw-3.

dhellmann avatar dhellmann commented on July 20, 2024

It looks like the pkgutil directory in the PyMOTW source tree is confusing the Python interpreter, so it is importing the wrong thing.

Have you set up RTD so it is running Paver in the build? I've never tried to build the project in RTD. I build it locally and commit the files so they can be service via GitHub pages.

from pymotw-3.

nazarepiedady avatar nazarepiedady commented on July 20, 2024

@dhellmann I am not used to RTD, could you share with me the command or sequence of commands that you use to build locally? Then I will find a way to automatize it through the RTD.

from pymotw-3.

nazarepiedady avatar nazarepiedady commented on July 20, 2024

@dhellmann Good, I am almost there, it is running but it breaks at this point:

➜  paver html  
---> pavement.html
---> sphinxcontrib.paverutils.html
mkdir_p path('./build')
mkdir_p path('./build/html')
mkdir_p path('./build/doctrees')
sphinx-build -b html -d ./build/doctrees -c ./source -W ./source ./build/html
Running Sphinx v7.2.3
initializing tableref
initializing figureref
Initializing BitBucket plugin
defining table role
defining figure role
building [mo]: targets for 0 po files that are out of date
writing output... 
building [html]: targets for 184 source files that are out of date
updating environment: [new config] 184 added, 0 changed, 0 removed
reading sources... [ 58%] pdb/index
Exception occurred:
  File "/home/nazare/Public/github/pymotw-3-pt/venv/lib/python3.10/site-packages/sphinx/ext/extlinks.py", line 108, in role
    title = caption % part
TypeError: not all arguments converted during string formatting
The full traceback has been saved in /tmp/sphinx-err-8ehzspdb.log, if you want to report the issue to the developers.                                                     
Please also report this if it was a user error, so that a better error message can be provided next time.
A bug report can be filed in the tracker at <https://github.com/sphinx-doc/sphinx/issues>. Thanks!


Captured Task Output:
---------------------

---> pavement.html
---> sphinxcontrib.paverutils.html
mkdir_p path('./build')
mkdir_p path('./build/html')
mkdir_p path('./build/doctrees')
sphinx-build -b html -d ./build/doctrees -c ./source -W ./source ./build/html

Build failed running pavement.html: Subprocess return code: 2

from pymotw-3.

nazarepiedady avatar nazarepiedady commented on July 20, 2024

@dhellmann I formatted all .rst documents inside the project to break rows only in front of a paragraph, could be it the cause?

How can I set the tools to ignore the string formatting?

from pymotw-3.

dhellmann avatar dhellmann commented on July 20, 2024

That error looks like it's a change in how the extlinks extension to Sphinx works. It may have been triggered by using a newer version of Sphinx, I'm not sure. It does not seem likely that it is related to whitespace changes in the input files.

from pymotw-3.

nazarepiedady avatar nazarepiedady commented on July 20, 2024

@dhellmann, I would like to migrate from paver to just using sphnix, what are your recommendations?

from pymotw-3.

nazarepiedady avatar nazarepiedady commented on July 20, 2024

@dhellmann thanks for your time, I installed locally the python 3.7.1 version which you said on the site was the version used to build the site and test the code examples. I had some progress, the site is building locally but the algorithm that generates the stylesheets in the pavement.py is not compiling the .less code even considering that I have lessc installed globally.

If something goes out of the normal I will contact you, cheers.

from pymotw-3.

Related Issues (3)

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.