How to develop and package with ActivePython? - packaging

I have been developing (a somewhat complicated) app on core python (2.6) and have also managed to use pyinstaller to create an executable for deployment in measurements, or distribution to my colleagues. I work on the Ubuntu OS.
What has troubled me is in upgrading the versions of numpy or scipy. Some features I need are in 0.9 and I'm still on 0.7. The process of upgrading them, or matplotlib, for that matter are not elegant. The way I've upgraded on my local machine was to delete the folders of these libraries, and then manually install the newer versions.
However, this does not work for machines where I do not have root access. While trying to find a workaround, I found ActivePython. I gave it a quick try and it seems to use PyPM to download the newest scipy and numpy to its custom install location. Excellent! I don't need root access and can use the latest version of the libraries.
QUESTION:
If there are libraries not available on the PyPM index with ActivePython, how can I directly use the source code of those libraries (example wxpython) to include into this installation?
How can I use pyinstaller to build an executable using only the libraries in the ActivePython installation?

Related

Best way to write setup script for multi-language project package that includes anaconda, atom, node.js etc.?

I am designing an environment for productive research, i.e. writing, data-analysis, publication, etc.
In order to share the final results with others, I need to find a way to package this and to set up the local installation.
The project depends on Anaconda, so conda as a package manager is available.
It also includes
Pandoc and some pandoc packages, some will have to be fetched from Github directly because some versions are not available via conda-forge (doable in conda)
Atom and Atom packages; they should be installed and configured by my script (this works on the CLI via the apm package manager)
Node.js and Mermaid and a few other JS packages, which require npm calls
Some file-system-level operations, like deleting parts from packages where I only need a portion from, creating symlinks and aliases etc.
Maybe some Python code for modifying yaml/json/ini files or reading therefrom.
The main project will reside in a Github repository. It will be fine for users to clone it from there and start a build script locally.
My idea is to write a Bash shell script that
creates a conda environment based on requirements.yaml for everything that can be done this way
installs other parts using CLI commands (wget/curl etc.)
does all necessary modifications using CLI commands, maybe using a few short Python scripts (e.g. for changing or reading JSON or yaml files).
My local usage will be on OSX Big Sur, Linux should be supported, Windows compatibility would be nice-to-have.
Before I start:
Is this approach viable? I think it will be pretty transparent, but of course also a bit proprietary.
Docker is likely overkill for my purpose, and I also read that the execution will be slow on OSX.
The same environment will likely be installed multiple times on the same users' machine, so it is important that I can control e.g. the usage of existing packages and files via aliases or symlinks. It is not important that the multiple installations are decoupled for the non-python/non-conda parts (e.g. atom, node.js, mermaid could be the same binaries for all installations; just the set of Python packages might vary by installation).
Thanks for your expertise!

Lua SDK for IntelliJ on a Linux system?

Trying to set up IntelliJ IDEA with the Lua plugin. This requires me to direct it to the location of a Lua SDK. All instructions I have been able to find for this are on a Windows system, pointing to a specific directory in Program Files. I am running a Linux system. I've built and installed Lua 5.3.4 (newest version at time of writing) from source, but as far as I can tell that doesn't include any equivalent to the SDK needed – it just drops a variety of necessary files in /usr/local/{bin,include,lib,man/man1} and creates two empty directories /usr/local/{lib,share}/lua/5.3.
Am I missing something conceptual? Do I need to get something else (the existence of which I have been unable to confirm)? Should I just give up on this and find another IDE? The plugin seems to come with two SDKs, Kahlua and LuaJ, but I don't know how well either of these match up to either standard Lua or LuaJit, which are what I would be using.
This is assuming you are using this Lua plugin for IntelliJ:
If you have installed Lua via DNF or yum simply guide IntelliJ to /urs/bin and it'll find it. (I assume this also works for other installers like apt or brew.)
It looks like the SDK is just looking for two files lua and luac which both live in /usr/bin.

How can I install MPFI library in Windows?

there!
I'd like to execute example program, Surface_reconstruction_points_3.
I think the program needs additionally 3rd library, MPFI.
So I downloaded the library from http://mpfi.gforge.inria.fr/.
And I unzipped it at proper folder and linked it to the system path.
After configurating the example program using cmake-gui,
I found some error message, 'Could NOT find MPFI (missing: MPFI_LIBRARIES)'.
How can I install MPFI library in Window using visual studio 2008?
Since MPFI is a GNU library, it is completely supported on Windows.
CGAL provides this third-party libraries inside its installation, but Windows has its own replacement.
I installed this correctly with Visual Studio, but you need to uncheck those third-party libraries so CGAL won't mess with the own windows replacements.
Maybe doing this kind of installation isn't working well for all the sample codes inside the installation, but it works fine for development. I used CGAL without those third-libraries for Voronoi and 2D and 3D triangulation and it works fine.
For a clean installation, delete all you installed previously, make sure the new installation isn't messing with the bad previous installation.
EDIT:
About not using those optional libraries for Windows, I just received a similar mail through the CGAL mailing list and these could be the steps for newer versions of CGAL (>4.2):
You have to comment 3 lines in the CMake machinery:
In CGAL-4.1/CMakeList.txt you have to comment:
#list (INSERT CGAL_ESSENTIAL_3RD_PARTY_LIBRARIES 0 GMP MPFR)
#hide_variable(CGAL_ESSENTIAL_3RD_PARTY_LIBRARIES)
In CGAL-4.1/cmake/modules/UseCGAL.cmake you have to comment:
#use_essential_libs()
On the other hand, you can search on internet for precompiled versions of MPFI. For instance, you can find precompiled GMP, MPFR and MPFI for Windows on http://vegas.loria.fr/rs/ .

Using WebKitGTK+ on Centos 5.8?

I'm trying to build an embedded simple web browser for an embedded device and I've decided to use WebKit / WebKitGTK+. However, our device uses a Linux environment somewhat based on CentOS 5.8. I haven't been able to find any RPMS or mention of support for WebKit / WebKitGTK+ for CentOS 5.8 while doing several web searches.
Does anybody know if it's possible to build an older version of WebKitGTK+ such as 1.2.6-2.el6_0 which works well on CentOS 6.3? Are any RPMS available for CentOS 5.8?
The goal here is to be able to run a relatively current, at least 1.2.6 version of WebKitGTk on CentOS 5.8
Note: I was able to sort everything out. Just took a long time compiling all of the dependencies in the correct order with the correct options. I was able to get WebKitGTK 1.6.0 running on Centos 5.8.
You shouldn't have any problems building an old version of webkit if you can install the older versions of libraries that it requires.
If you have older or newer versions of GTK+ etc installed than the old version of webkit requires it may need quite a bit of porting to compile.
I'm not aware of any RPMs that meet your requirements
Depending on the compilation options you should be able to compile the dependencies in an isolated directory. With each library you typically use the --prefix option to specify the destination. Then when compiling something that depends on that library, you typically have an option to specify where to look for that library - something like --with-libraryname=/path/to/library. You want to check ./configure --help of each thing you're compiling to get the correct options.
It'll be quite a bit of work, but you should be able to compile everything you need into an isolated directory without replacing anything on the system. I would highly recommend you avoid doing this in root to ensure you have the right options.

wxWindows 2.9 binary for windows

After an upgrade to the new Haskell Platform, my existing wxHaskell programs are broken.
They all seem to now require wxWidgets 2.9, for which I can't find any binary versions.
wxPack has 2.8, and beyond that one has to get a compiler and build it locally from what I see.
There are tutorials on this from various sources, each a few pages long, with various advice on setup, changing configurations, etc. Install wxConfig, install minGW compilers, setup configurations, rebuild, etc.
Is there any source of a simple binary install? I'd hope for some simple apt-get or cabal like tool, Haskell library tools (on Windows?) seem less integrated than others that I'm familiar with.
(Update) I did install and compile wxWidgets locally, and still cannot get the wxHaskell components to install. I'm sure that all of this just requires some fairly simple details, but again after some time already, hope not to have to spend a lot more time on this, and wish it was more automated!
Configuring wxc-0.90.0.3...
Configuring wxc to build against wxWidgets 2.9
setup.exe: Missing dependencies on foreign libraries:
* Missing C libraries: wxmsw29ud_all, wxtiffd, wxjpegd, wxpngd, wxzlibd,
wxregexud, wxexpatd, wxregexud
This problem can usually be solved by installing the system packages that
provide these libraries (you may need the "-dev" versions). If the libraries
are already installed but in a non-standard location then you can use the
flags --extra-include-dirs= and --extra-lib-dirs= to specify where they are.
cabal: Error: some packages failed to install:
wx-0.90.0.1 depends on wxc-0.90.0.3 which failed to install.
wxc-0.90.0.3 failed during the configure step. The exception was: ExitFailure 1
wxcore-0.90.0.1 depends on wxc-0.90.0.3 which failed to install.
Yes, you can. CodeLite (C++ IDE I use) was recently upgraded to use wx29.
Since there are no binaries yet on repo, Dave set up some. Find all instruction in CodeLite's wiki below
wxWidgets 2.9 Packages and Repositories
If you are using windows Just go to download page for Codelite and download codelite with wxWidgets. Install it, copy the installed wxWidgets directory wherever it is needed!
Also it seems like there are official binaries. I have never tested download anything there so try yourself. The link is this one
Feel free to ask any question