-1
I'm creating an RPM to distribute a conda environment and I came up with this solution:
I was able to do it. Here's my .spec file from a Stackexchange answer.
Summarizing: I use the install phase to just unpack the dependencies and the installation script and in %post I run that script, which is creating files under /opt/miniconda. Due to this, I need to specify manually the steps to clean the environment when uninstalling and also check manually if everything is working correctly.
Is this a good practice? I'd like to be able to do everything in the install phase so the installation could be aborted if something goes bad but I wasn't able to achieve this.
The machine does not have access to network, so I cannot add Requires: python there. I need to extract and execute the script that is installing the dependencies correctly, is not a matter of just moving some files. Install.sh is the one that creates files under /opt/miniconda and later on I check that everything went fine with those if-else statements. – Raúl García – 2017-06-05T08:19:03.733
You can run the script which is installing the dependencies in %install section.. Then all the dependencies will be in RPM package. You really should start creating RPM package on some smaller and simplier package so you get familier with the concept. – msuchy – 2017-06-06T08:10:20.867