Can I automatically put some plain text files in a directory via pip install besides the program to be installed? - setuptools

I have written a program consisting of a few .py-scripts, which I am able to successfully make into one package via wheel and bdist and upload it to pypi.org via twine, from where I can download and install it via "pip install".
I have 3 or 4 configuration-files, that are kept in .txt-format and my program optionally uses those configuration-files to configure itself when it starts.
Is there a way to somehow integrate those .txt-files into that package and upload it, so when someone does "pip install", he not only installs the programm, but automatically also gets those 3 .txt-files into a certain directory?

Related

Debian package: Is there an alternative to creating a symlink inside the user's home folder?

I'm developing a free guitar VST plugin that I want to distribute through a .deb package.
In the postinst script, I run the xdg-desktop-menu command to create the launcher for the standalone version (which works fine), but DAWs (like reaper and bitwig) will look for vst plugins inside $HOME/.vst and obviously won't find my plugin there.
At first I thought I needed to create a symlink inside $HOME/.vst but now I know debian packages aren't supposed do anything inside the user's folder. So what should I do instead?

Moodle plugin as exe file

I was trying to create windows .exe file to install moodle local plugin.
Is this doable installing plugin with .exe file?
Appreciate your suggestions. Reference to documentation access!
Are you trying to install Moodle? There are packages available for installing Moodle on a Windows machine:
https://docs.moodle.org/39/en/Complete_install_packages_for_Windows
Otherwise, using an exe to install a local plugin doesn't make any sense. You just need to copy the code to the local folder. Or unzip the code into a local folder.
Then either upgrade via your site yourmoodlesite/admin/ or use the command line:
php admin/cli/upgrade.php
See https://docs.moodle.org/39/en/Administration_via_command_line#Upgrading

How does ActiveState's PPM generate HTML and where does it store it?

I'm using ActiveState Perl 5.22.3 currently and have that installed system wide, while I want to install additional packages using PPM per user only. This works after setting PERL5LIB e.g. to the path C:/Users/[...]/AppData/Roaming/Perl/x64/Current/lib and selecting that directory in the GUI of PPM as the target for installations. What doesn't seem to work is generation of HTML documentation from the installed packages.
The system wide installation folder of Perl contains a html directory with lots of docs with what got installed by default and using Process Monitor I can see that PPM tries to delete the file perltoc.html from that folder. After giving my user permissions to change contents of that directory, that file is recreated, but it doesn't contain any hints to newly installed packages of PPM. Without changing permissions, PPM logs the following error:
2020-02-03T18:57:54 <4> [ppm.bat:26] Can't open 'C:\Program Files\Perl\Current\html/perltoc.html': Permission denied at C:/Program Files/Perl/Current/lib/ActivePerl/DocTools.pm line 36.
That's why I thought that PPM might simply stop too early and doesn't provide HTML successfully. But things doesn't seem to be so easy and there's another HTML-folder in my user profile containing directories for all installed packages already:
C:\Users\[...]\AppData\Roaming\Perl\x64\5.22.3\html\site\lib
The problem is that this thing doesn't contain any files. Looking at Process Monitor, I'm not even sure if PPM generates HTML files at all, even though my packages contain POD-files: PPM is working in temporary directories for each package to install and those contain html-folders and PPM iterates the contents of those, but they seem to be empty. Process Monitor doesn't log any found files and PPM doesn't attempt to copy any individual file at all, even though it logs a copy process:
[InstallArea.pm:362] Installing AAAAAAAAA with id 91
[InstallArea.pm:369] Copy C:\Users\[...]\AppData\Local\Temp\ppm-eYtrkD/AAAAAAAAA-1.01/blib/html --> C:/Users/[...]/AppData/Roaming/Perl/x64/Current/html
[InstallArea.pm:369] Copy C:\Users\[...]\AppData\Local\Temp\ppm-eYtrkD/AAAAAAAAA-1.01/blib/lib --> C:/Users/[...]/AppData/Roaming/Perl/x64/Current/lib
So, how should PPM work regarding HTML-docs at all? How does it decide when to generate that, where does it generate that and where does it put it? I couldn't find much docs about how things should work by default.
Thanks!

Install MongoDB on CentOs 7 without YUM. have rpm files but not tgz

I'm fairly new to Linux and am running CentOS 7. I can do the basics of navigating, creating dirctories, permissions, unzip applications and make SL to the apps but I have no idea what to do with an "rpm" file.
The system that I am trying to install MongoDB 4.2.x on does not have an outside connection. I have the individual rpm files for MongoDB but not the tgz which some article I read said I should use.
There is no way for me to get the tgz over to the machine unless I wait several days.
With only the .rpm files, how do I install MongoDB?
[https://docs.mongodb.com/manual/tutorial/install-mongodb-on-red-hat/][1]
The instructions in the above link say to create the .repo file but that makes a reference to the external URL which the system does not have access to.
[mongodb-org-4.2]
name=MongoDB Repository
baseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/4.2/x86_64/
*
Again, with only the .rpm files, how do I install MongoDB?
*
You do need some kind of access to the outside world; you need to get the rpm files on your machine...
you can just manually download the rpm files you need from https://repo.mongodb.org/yum/redhat/7/mongodb-org/4.2/x86_64/RPMS/, copy them to your machine, and then run
yum install /path/to/downloaded/mongodb*rpm

Getting Install path of a package just installed by chocolatey in powershell

After I install a package in powershell by using
"choco install $package" where package is taken from a config file and would look like "WinRar" so I would be doing choco install WinRar, how do i get the exact path this package was just installed to?
For example when I am installing PhantomJS using this, it gets installed to C:\ProgramData\chocolatey\lib\PhantomJS\tools\phantomjs-2.1.1-windows and I as the developer know that, but since I need to add this to the env path, depending on which version the install command installs, the path will be different. I need to get the exact path so i can set the environmental variable to right place.
PhantomJS is just one example, but a lot of packages get installed into directories where their version is apart of the path and getting the path from the powershell install scripts would really be helpful.
Is there anything like this available for the package manager? I assume figuring out where the package just got installed to should be possible because I see it displayed on my terminal window, just don't know how to access it in powershell.
Thanks.
Currently there is not a way, but there is a thought to maybe provide back a list of package results with that information (along with more). That is still in a feature request so look for it to be developed in the coming months.
You could parse the Chocolatey output to determine where Chocolatey saw things get installed and we are working to make that detection even better.