How to add another .i swig file to an Extension? - swig

I have created a Python interface to my library using SWIG. This Python interface uses numpy. All of this works correctly.
Now, I want to package this Python interface into a Python wheel. Packaging for Windows works correctly.
myext = Extension( "MyExt",
sources = ["MyExt.i"],
swig_opts=["-py3", "-I/usr/include", "-includeall"],
libraries=["mylib"],
)
On Windows, compilation occurs directly where all the sources and setup.py files are. This is not the case for Linux when building my bdist_deb (same for bdist_rpm), and here is my problem.
The file MyExt.i includes numpy.i. Therefore, I should add it as a source file of the extension. However if I do this, then setuptools also tries to run swig on numpy.i. This is not what I want. I haven't found any of the other parameters of Extension that would accept such a file.
Someone knows how to get out of this issue?

Related

How to add arduino libraries to espressif IDE?

We are working on a project which requires CAN communication in it. We have made some code in the Arduino IDE which we are trying to do in ESP IDE. However, there are some libraries which we are finding difficult to import into the esp IDE, example (Adafruit). Is there any way we can do it?
We cloned the Arduino as component library from the github and made the necessary changes into some basic codes such as wifi scan from arduino IDE which worked successfully in the espressif IDE , we tried the same method and cloned the Adafruit libraries for OLED and MLX sensor but each time we tried to build program, it highlighted the library includation line and said "no such file or directory exits", we expect for a method to resolve this issue.
You can install libraries from a local ZIP file or by using the built-in library manager.
Go to Sketch > Include Library > Manage Libraries. Type a name in and find the one that you want to install and click install.

Can not do "import chisel3._"

I want to use chisel3.2, and have installed "sbt" into Mac OS-X.
I wrote my project (Scala file), and downloaded template of project.
I did;
sbt
It did a lint of "scala" but did not import chisel3 object.
Indeed this is caused by PATH setting, but there is no information about it.
Does anyone suggest a solution?

failed to include tcl package during generating executable with tclkit

I am trying to generate a standalone executable from a single tcl file. I am using the method using tclkit.exe mentioned in http://wiki.tcl.tk/11861.
The problem is the tcl file uses 3 packages.
package require Tk
package require tcom
package require Img
I was not able to successfully add the packages in lib folder of the generated vfs folder. Whenever I click the exe it says, failed to load tcom.dll.
Btw, there are lot of different version of activestate tcl and tclkit.exe based on x86 and x64 system. I am doing the whole thing in a 64 bit win7 system. What am I doing wrong? please help.

FSharp.Data.dll not found

I am creating an example for our next F# meetup and have run into an issue.
I have downloaded the FSharp.Data v2.2.1 to try the JSON tutorials to parse (stock options) data downloaded from the web. I have been struggling with this issue for almost a week now. I have followed the suggestions seen in other posts including complete uninstall of packages suggestion. I ran into the same issue trying to use the CSV provider and decided to switch to JSON.
I have #load #"C:\ full path to dll ...\lib\net40\FSharp.Data.dll" For some reason I have to give the full path for the F# script file to recognize it.
The line open FSharp.Data has an error "The namespace 'Data' is not defined"
Nuget package manager shows that FSharp.Data version:2.2.1 is installed.
I have uninstalled and reinstalled all packages in the project several times but it does not change the error.
So I am stuck at that point. I could use some insights from anyone who has been down this path.
The following steps worked for me. I started from a new F# project and did everything in F# Interactive.
Right click references folder in the project manager.
Select manage nuget packages
Install FSharp.Data
Reference the library in F# Interactive:
\#r #"C:\Users\{Full project path}\packages\FSharp.Data.2.2.1\lib\net40\FSharp.Data.DesignTime.dll";;
I get the warning that the library is locked. But F# Interactive allows me to open it.
Open the library:
open FSharp.Data;;
Run JsonProvider on file with data:
type Stocks = JsonProvider<"C:\msft.txt">;;

tcl error "can't find package struct::tree "

I tried to use the tree package for TCL but I'm unable to find any documentation at all. When trying to run the examples from http://tcllib.sourceforge.net/doc/struct_tree.html, i get the error
can't find package struct::tree
Can anyone tell me how to include it in tcl 8.5?
The struct::tree package is part of Tcllib.
If you are using ActiveTcl, doing a teacup update (possibly with elevated permissions, depending on how you installed) will download a copy. I don't know whether all Linuxes have Tcllib done as an appropriate system package, but Debian does. Otherwise, there's a download link in on the main Tcllib page; Tcllib works just fine as a bunch of .tcl files that you include with your application code.