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

Please provide a way to not compile the documentation during the build process #1618

Closed
spyder-bot opened this issue Feb 17, 2015 · 13 comments
Closed

Comments

@spyder-bot
Copy link
Collaborator

From pi...@synchrotron-soleil.fr on 2013-10-24T04:02:16Z

Hello, I am preparing a package for the 2.3.0 beta version.

I am facing a problem during the build.
since on Debian I build the python 2.7 and the python 3.3 version, the documentation is built two times.
These build generates pickled environment which cause troubles since 2.7 pickeled objects are not compatible with 3.3 ones.

so during the install I got an error when the 3.3 version try to install the 2.7 last generated version.

Is is possible to not build the documentation by default.
python setup.py build_doc

should be explicitely called to generate the documentation. this way it should simplify the build process. shorter time (less sphix compilation and not error :)

thanks

Frédéric

Original issue: http://code.google.com/p/spyderlib/issues/detail?id=1618

@spyder-bot
Copy link
Collaborator Author

From ccordoba12 on 2013-10-27T10:06:42Z

We want our docs to be compiled when the user calls

python setup.py install

so that he/she can access them from the Help menu when running Spyder.

But I totally understand your use case, so I'll see how I can find a good compromise.

Summary: Please provide a way to not compile the documentation during the build process (was: please provide a way to not compile the documentation during the build process)
Status: Accepted
Labels: MS-v2.3 Component-Docs

@spyder-bot
Copy link
Collaborator Author

From ccordoba12 on 2013-11-03T05:43:10Z

Fred, if we move "build_doc" from "build" to "install" that would give the same problems, right?

@spyder-bot
Copy link
Collaborator Author

From pi...@synchrotron-soleil.fr on 2013-11-03T05:47:20Z

yes same problem...

@spyder-bot
Copy link
Collaborator Author

From ccordoba12 on 2013-11-03T06:11:00Z

Hmmm, what if we add a "deb_build" command (which will do the same as "build" with no "build_doc") just for you guys? Will that be ok?

@spyder-bot
Copy link
Collaborator Author

From pi...@synchrotron-soleil.fr on 2013-11-03T06:18:40Z

And what about a --no-doc options to the build and the install target.

then I should run build_doc only once for python2 and python3

@spyder-bot
Copy link
Collaborator Author

From ccordoba12 on 2013-11-03T07:01:31Z

Great suggestion! I'll implement it right away :)

@spyder-bot
Copy link
Collaborator Author

From ccordoba12 on 2013-11-03T08:10:35Z

Fred, I found how to do it but "--no-doc" will be undocumented, i.e. it won't show up in

python setup.py --help

Would be that ok?

@spyder-bot
Copy link
Collaborator Author

From pi...@synchrotron-soleil.fr on 2013-11-03T08:25:00Z

but maybe it will show up with

python setup.py build --help

or

python setup.py install --help

@spyder-bot
Copy link
Collaborator Author

From ccordoba12 on 2013-11-03T08:36:18Z

I can easily show it in

python setup.py build --help

because we are already subclassing "build".

However "--no-doc" will work with "install" too or with any other command (in case you need it). I'm just using the hack described here: http://stackoverflow.com/a/4792601/438386 to manipulate sys.argv, which I think it's the easier solution.

Or do you think it's worth to add it to "install --help" too?

@spyder-bot
Copy link
Collaborator Author

From pi...@synchrotron-soleil.fr on 2013-11-03T08:47:12Z

This --no-doc is specific for distribution,

  1. do it first with this hack, then let see how it works with the packaging.
  2. if we really need to add it to the target, or do some modification it will be possible later.

@spyder-bot
Copy link
Collaborator Author

From ccordoba12 on 2013-11-03T10:01:19Z

Ok, thanks for your help. I decided to do it the right way, hacks are hacks and can become a nightmare! :)

@spyder-bot
Copy link
Collaborator Author

From ccordoba12 on 2013-11-03T10:21:13Z

This issue was updated by revision 532fbcf67775 .

  • The new '--no-doc' flag will let users to not build our documentation if they
    find it necessary.
  • Useful for packagers when trying to build for Python 2 and 3 from the same
    directory.

Status: Fixed

@spyder-bot
Copy link
Collaborator Author

From techtonik@gmail.com on 2013-11-03T12:11:10Z

Cool. My patch for is now 1.2+ years old, and I've never pushed it. I guess time for rebase. =)

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

1 participant