Skip to content

spin document build problems #24713

Description

@charris

Running python -m spin docs --build

  1. The html files are not zipped (see doc/Makefile). The zip files are needed for numpy.org.
  2. Couple of sphinx complaints
  reading sources... [100%] release/1.21.5-notes .. user/whatisnumpy                                                                     
  /home/charris/Workspace/numpy.git/doc/source/reference/random/examples/cython/setup.py.rst:4: WARNING: 
  Include file '/home/charris/Workspace/numpy.git/numpy/random/_examples/cython/setup.py' not found or reading it failed
  looking for now-outdated files... none found
  pickling environment... done
  checking consistency... done
  preparing documents... done
  /home/charris/Workspace/numpy.git/doc/source/user/building.rst:48: WARNING: undefined label: 'scipy:using-pkg-config-to-detect-libraries-in-a-nonstandard-location'
  /home/charris/Workspace/numpy.git/doc/source/user/building.rst:141: WARNING: unknown document: 'scipy:cross_compilation'

The whole random module was taken from main, so should probably have fixes for using meson.

On the plus side, the correct numpy version (1.26.0rc1) is built and used.

Activity

  1. charris commented on Sep 14, 2023

    @charris
    MemberAuthor

    The first sphinx complaint looks fixable by copying doc/source/reference/random/examples/cython from main.

  2. rgommers commented on Sep 15, 2023

    @rgommers
    Member

    That command is for regular building of the html docs. I believe the release command was always make dist. Either way, after spin docs --build I think you can run these commands locally to get a zip file right now:

    build/dist.tar.gz: real-dist
    
    real-dist: html-build
    	cp -r build/html build/dist
    	cd build/html && zip -9r ../dist/numpy-html.zip .
    	cd build/dist && tar czf ../dist.tar.gz *
    	chmod ug=rwX,o=rX -R build/dist
    	find build/dist -type d -print0 | xargs -0r chmod g+s

    I can have a look at integrating it into the spin docs CLI. How about spin docs --dist as the command?

    I'll have a look at fixing up the warnings as well.

  3. added a commit that references this issue on Sep 15, 2023
    4893b24
  4. added this to the 1.26.0 release milestone on Sep 15, 2023
  5. charris commented on Sep 15, 2023

    @charris
    MemberAuthor

    How about spin docs --dist

    Sounds good. The make merge-doc command is what I use to update numpy.org and it runs make build/dist.tar.gz. I'd like to get rid of the Makefile, so if there were a single command that replaced merge-doc I would be happy.

    EDIT: For now we could just fix the Makefile so that merge-doc runs $(PYTHON) -m spin docs -dist.

  6. rgommers commented on Sep 15, 2023

    @rgommers
    Member

    See my linked PR. For merge-doc, this should work already: spin docs merge-doc.

    I'd like to get rid of the Makefile

    Hmm, I wasn't planning on touching that. Translating the Makefile line by line into Python code in .spin/cmds.py will probably result in running the same commands through subprocess calls.

  7. charris commented on Sep 15, 2023

    @charris
    MemberAuthor

    The important documentation is RELEASE_WALKTHROUHGH.rst :)

  8. charris commented on Sep 15, 2023

    @charris
    MemberAuthor

    Translating the Makefile line by line into Python code

    Most of it is never used, all we need is the ability to make docs.

  9. rgommers commented on Sep 15, 2023

    @rgommers
    Member

    Most of it is never used, all we need is the ability to make docs.

    Maybe let's just delete the parts we don't need for now?

    The important documentation is RELEASE_WALKTHROUHGH.rst :)

    Ah, I forgot. Would be nice if we'd delete HOWTO_RELEASE.rst. I'm about to sign off, I hope the added docs are enough for you right now? Basically and make XXX you can replace by spin docs XXX.

  10. rgommers commented on Sep 16, 2023

    @rgommers
    Member

    Fixed by gh-24721 (main) and gh-24718 (1.26.x), closing.

  11. added a commit that references this issue on Nov 11, 2023
    f79308a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions