Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sphinx and python version collision #35

Open
ghost opened this issue Feb 16, 2013 · 6 comments
Open

sphinx and python version collision #35

ghost opened this issue Feb 16, 2013 · 6 comments

Comments

@ghost
Copy link

ghost commented Feb 16, 2013

Some distributions (at least Arch Linux) have Python3 as default Python version, while Python2 scripts have suffix '2' in scripts' names. The plugin assumes Python2 to be the default Python resulting in error on documents generation.

Source: https://groups.google.com/forum/#!folder/last/akka-user/gBRZKTTZl9A

@jsuereth
Copy link
Member

jsuereth commented May 9, 2013

Sorry, I still haven't found a good solution for this IMHO. Do you have a suggestion for a sane way to handle the problem? It's been 3 months and I haven't had any sudden inspiration. I'd like to resovle this soon, since as folks upgrade linux, more and more will use python3 by default....

@gaydenko
Copy link

gaydenko commented May 9, 2013

As far as it's a matter of concrete distributions, I'm not sure there is smart way to resolve the issue. Why don't start with the simples way? I mean just to

  • form a list of probable script's names starting with List("sphinx-build2", "sphinx-build"),
  • probe script existence in the list order at runtime and
  • will add other names in the middle of the list would other affected users supply other names.

Of course, pythoners probably have to suggest something smarter :)

P.S. I'm the reporter. Sorry, I accidentally was signed in with another login at that reporting moment.

@dscleaver
Copy link
Member

That was going to be my suggestion as well. The other simple option is to make the command a setting, but that would require different users on a project to potentially have to change it before generating the site.

@jsuereth
Copy link
Member

jsuereth commented May 9, 2013

Yeah, I think the best experience is to auto-detect it if we can, and "do
the right thing". People don't really wnat to customize this for their
computer.

@nightkr
Copy link
Contributor

nightkr commented Jan 22, 2014

Most linux distributions, even those that still default /usr/bin/python to Python 2.x have a /usr/bin/python2 binary as well to explicitly request 2.x (and the opposite applies for 3.x as well). In my opinion, start off trying python2, and if that doesn't work, fall back to python with a warning. Windows is a special case, but there you could change the warning to happen if it isn't in a directory which's name starts with Python2.

@2m
Copy link
Member

2m commented Oct 23, 2014

I think this was not sbt-site problem, but a problem in Akka python build code which uses custom directive when building docs.

I fixed the same error as reported by the OP in akka/akka#16135. Now it runs fine under ArchLinux with Python3 and under Ubuntu with Python 2.

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

No branches or pull requests

5 participants