Readthedocs mock not working with Matplolitb - read-the-docs

Read the Docs will not build docs for my package because it includes matplotlib.
I used the code on their website to mock out matplotlib, but still the build fails because freetype and png are required to build matplotlib, and apparently this is not installed on their machine.
I tried with and without building in the virtualenv.
Here is my config.py.
Why is my mock not working?

If you have matplotlib in your requirements.txt, Read the Docs will still try to install it in the virtualenv. You have to take matplotlib (and anything else you want to mock) out of the requirements.
If you still want it in requirements.txt for setup but not for building the docs, I think you can specify a different requirements file (like docs/requirements.txt or something) in the ReadTheDocs Admin (under advanced settings).
I hope this solves your problem.

Related

Trying to use multi-rake with Google Cloud Functions

I am trying to use this library here: multi-rake
However, as stated in the docs, we have to run this before installing multi-rake:
CFLAGS="-Wno-narrowing" pip install cld2-cffi
So I cannot simply put cld2-cffi and multi-rake in requirements.txt because cld2-cffi needs to be installed like this beforehand. How could I overcome this problem?
According to the official documentation you have to package as local dependencies.
You can also package and deploy dependencies alongside your function.
This approach is useful if your dependency is not available via the
pip package manager or if your Cloud Functions environment's internet
access is restricted. For example, you might use a directory structure
such as the following:
You can then use code as usual from the included local dependency,
localpackage. You can use this approach to bundle any Python packages
with your deployment.
Note: You can still use a requirements.txt file to specify additional
dependencies you haven't packaged alongside your function.
Specifying dependencies in Python

configure cordova-plugin into capacitor environment

I have a react-app webapp wrapped by an ionic-capacitor framework.
I already used a lot of cordova-plugins inside my code, like the phonegap-plugin-barcodescanner or the cordova-plugin-inappbrowser.
I understood that i can use them if I make:
npm install --save cordova-plugin-pluginName #ionic-native/plugin-name
then i could import them into my React environment with:
import {PluginName} from #ionic-native/plugin-name
and it's works like a magic!
The problem is:
when i need to use a cordova-plugin which requires configuration, it used to be cordova add plugin plugin-name --variable var=""
but in the react-capacitor environment i can't install the plugin with it's configuration! i should add it later somehow, via the androidManifest.xml or via the cordova:config.xml.
can someone help me please?
thanks a lot...
Ionic provides a tool for changing the ios/android configs using a separate file. It's called Trapeze. It does require a bit of extra configuration and an aditional build step but it will allow for the adding of these variables to the ios/android config.

How to Set Maven Parameters in OpenShift

I'm completely new to OpenShift and so far ran in hundreds of bugs while trying to create my first application. Now I want to configure Maven to use my own goals. So far I tried:
adding a Jenkins and configuring the Maven Build - the Jenkins didn't take up the changes and finally stopped building altogether
adding a file .openshift/action_hook/pre_build with the content export MAVEN_ARGS="clean package -Popenshift" as explained here
adding a file .openshift/action_hook/build with the content mvn clean package -Popenshift as explained there
Evidently, the documentation is somewhat obsolete... so what is the correct way?
I finally managed to get the Jenkins to build with my goals. The misconception was that it would use the configured Maven goals INSTEAD of the default ones, when it would just use them additionally (he never had to, since the shell script failed). So deleting the script and adding a custom Maven build works.

Using org.eclipse.core.resources with RAP

I am currently trying to port an Eclipse RCP plugin to RAP (it is my first experience with RAP). I had a look at several sample applications and tutorials on how to port, but all information I have got says that the bundle org.eclipse.core.resources should be available (as long as I don't misinterpret them completely).
I have resolved all other Required-Bundle-errors, but 'Bundle 'org.eclipse.core.resources' cannot be resolved' resides. It seems that org.eclipse.core.resources is not included with the RAP target platform (I installed it via Eclipse and checked the settings).
Is org.eclipse.core.resources not included anymore and if yes, what can I use to replace it? Or how can I include it?
The bundle org.eclipse.core.resources is not part of the RAP target platform, and it never was. The original bundle the Eclipse platform is not suitable for RAP.
To use the resources bundle with RAP, a RAP version would have to be created, that provides per-session workspaces in ResourcePlugin#getWorkspace(). It's technically feasible but probably a fair amount of work.

How to build OpenSSL for WP8?

How to build OpenSSL for WP8?
AFAIK, we must replace winsock.h by winsock2.h because WP8 only supports winsock2.h. And maybe we must replaces code to target WinRT architecture on WP8 (ThreadPool, ...)
The caveat is that we must build OpenSSL as WP8 static library, so that the output lib can be wrapped by WP8 runtime component, right ?
You can use the Microsoft openssl fork on github with support for windows phone 8.1/8.0 and Windows Store 8.1, that address the entropy on each platform using windows random generators, instructions are located at INSTALL.WINAPP, there is a script located at
ms\do_vsprojects.bat
you should be able to just execute that script withing the root location and open vsout\openssl.sln to build the openssl libraries for different windows platforms.
The fork is located at
https://github.com/microsoft/openssl
At this momment these changes are being in process to be integrated with the main OpenSSL source code base.
here is what you have to do, go to this link and download the VSbuild, now put that into the source files downloaded from the OpenSSL website, the folder structure should look like this:
apps
bugs
certs
.....
vsbuild
once that is done, open the solution, it should upgrade it to VS12, change the settings to a Windows Phone RT build, to generate DLL's there is no need to build *_lib*, so change the other projects, most changes you need to do are to libeay32, do not compile openssl project, just ignore that, start by building libeay32, and start making changes to the code, as there are some functions we don't have in WinRT, you can either #ifdef them out, or create your own functions,
NOTE for rand_win.c change the functions to use rand_s and #ifdef most of the code there is, this might muck up the security, you will have to test it out yourself
Good Luck !
This is so that if anyone wants to build the new version of OpenSSL "1.0.1g" that fixes the Heartbleed problem you can follow the previous steps whit the following changes:
I renamed the folder include to --include and create a new folder named include, the VS project will take care of copying the information, --include if you like you can remove this, when i build the project without this change there where compilation issues.
Note: the include folder that i changed is the one found in the root not the one found under VSbuild
Enjoy
Here is a download of pre-compiled OpenSSL libraries for Windows Phone 8.1 among other platforms:
https://www.teskalabs.com/blog/openssl-binary-distribution-for-developers-static-library
Disclaimer: I run that site.