Skip to content

swig not available #2094

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

Closed
andy-maier opened this issue Mar 27, 2016 · 5 comments
Closed

swig not available #2094

andy-maier opened this issue Mar 27, 2016 · 5 comments
Labels
Improvement Minor improvement to code Needed: patch A pull request is required

Comments

@andy-maier
Copy link

Details

I am trying to build a project (pywbem) that has a dependency on the python package "M2Crypto". I do have a requirements.txt file that specifies that dependency, and it being attempted to be installed.

However, M2Crypto needs the "swig" utility during its install, and swig does not seem to be available on readthedocs.org.

Because swig is a fairly standard tool that is needed by a number of Python packages, may I ask for it to be installed on RTD?

  • Project: pywbem
  • Build #: 3853463
@agjohnson
Copy link
Contributor

You can also mock out dependencies, see our FAQ on our docs for more information. swig can be added via it's APT package, feel free to open a PR against our docker build images here: https://github.com/rtfd/readthedocs-docker-images/blob/master/base/Dockerfile

@agjohnson agjohnson added Improvement Minor improvement to code Needed: patch A pull request is required labels Apr 8, 2016
@goodboy
Copy link

goodboy commented Aug 26, 2016

@agjohnson I'm assuming you're referring to the mocking docs here.
So now I'm quite confused.

The pip documentation clearly implies that you need to include deps you expect to be auto-analyzed in your install_requires in order for pip install mypackage (where mypackage has some direct dep that requires SWIG or other C exts) to work.

You've suggested mocking the dependency. Afaict your definition of mocking also implies that you do not include the dep in install_requires. This of course breaks install from pypi (since I don't believe there's any way to have pip install with a requirements.txt that was somehow packaged with the sdist).

So is it that pip install mypackage and readthedocs are not compatible when you have a C dep? The only other approach I can imagine is that RTD gives you the some kind of env variable or other to allow your setup.py to avoid inserting your dep at runtime.

Also your docker image link seems to be broken.

@goodboy
Copy link

goodboy commented Aug 29, 2016

For anyone else running into this it seems you can also hack around it using the 'READTHEDOCS' env var to conditionally modify install_requires in your setup.py.

@humitos
Copy link
Member

humitos commented Mar 16, 2017

@tgoodlet these are the docker files for

There is another person that did this: jhale/readthedocs-docker-images@36408c6 and I think it should be enough.

@humitos
Copy link
Member

humitos commented Jan 7, 2019

Closing in favor of readthedocs/readthedocs-docker-images#15

@humitos humitos closed this as completed Jan 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Improvement Minor improvement to code Needed: patch A pull request is required
Projects
None yet
Development

No branches or pull requests

4 participants