Skip to content

sphinx-build hard codes the python interpreter #92

Open

Description

@nega0

I don't think this is something that needs to be fixed, but documenting here.

$ ssh cobalt 'command cat /cvmfs/icecube.opensciencegrid.org/py3-v4.4.1/RHEL_7_x86_64_v2/bin/sphinx-build'
#!/cvmfs/icecube.opensciencegrid.org/py3-v4.4.1/RHEL_7_x86_64_v2/bin/python
# -*- coding: utf-8 -*-
import re
import sys
from sphinx.cmd.build import main
if __name__ == '__main__':
    sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
    sys.exit(main())

This seems to be a Sphinx thing vs a packaging thing, it's the same with DEB or RPM packages. In general this isn't a big deal, but confusion arises when you're using the "system" (ie. CVMFS) sphinx-build with an extension installed in your Python virtual env. Because it's calling the "system" Python, the user's virtual env isn't part of PYTHONPATH, so it never sees those extensions.

The easy fix is to just add Sphinx to your virtual env with pip3 install --upgrade sphinx.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions