Tutorial to setup latest Python in FatDog?

versatile 64-bit multi-user Linux distribution

Moderators: kirk, jamesbond, p310don, JakeSFR, step, Forum moderators

Post Reply
Neo_78
Posts: 407
Joined: Wed Dec 29, 2021 10:45 pm
Has thanked: 232 times
Been thanked: 11 times

Tutorial to setup latest Python in FatDog?

Post by Neo_78 »

I searched the FatDog forum, but could not find anything useful.

Do we have a guide how to install latest, stable Python in FatDog64?

This currently appears to be Python 3.11.2.

Also, is pip available for Python Package management?

If someone who is activley developing Python could also share a good IDE for Python that is working well in FatDog that would be much appreciated!

Appreciate your feedback! :thumbup:

step
Posts: 536
Joined: Thu Aug 13, 2020 9:55 am
Has thanked: 55 times
Been thanked: 195 times
Contact:

Re: Tutorial to setup latest Python in FatDog?

Post by step »

This answers none of your questions but it provides some related information: viewtopic.php?t=6232

jamesbond
Posts: 704
Joined: Tue Aug 11, 2020 3:02 pm
Location: The Pale Blue Dot
Has thanked: 121 times
Been thanked: 390 times

Re: Tutorial to setup latest Python in FatDog?

Post by jamesbond »

WARNING: Do this on a TEST system until you can be sure that it works, so you don't screw up your installation. You are going to uninstall Python3 that comes in devx, so one you do that, it's gone, to BEWARE.

0. Read http://distro.ibiblio.org/fatdog/web/fa ... ckage.html. The step that follows is from Method 5 in that document.
1. Load devx.
2. Uninstall existing Python3 removepkg python3
3. Create a new folder /usr/src/pkgbuild/pkg/python3
4. Detach the attached recipe file, rename it to drop the .txt extension, and copy that to the above folder (the filename has to be "recipe").
5. Open terminal.
6. In terminal type cd /usr/src/pkgbuild
7. Then type ./build-pkg.sh python3
8. Go for coffee
9. Come back and check /usr/src/pkgbuild/output
10. You should see python3-3.11.2-x86_64-1.txz there.
11. If it does, then from the same terminal, installpkg output/python3-3.11.2-x86_64-1.txz
12. And you have python 3.11.2 running in your system.
13. Bonus: you can move python3-3.11.2-x86_64-1.txz somewhere else so you don't have to rebuild it again next time. You can even copy it to USB flash drive and use it to install Python3 in another machine. If you do everything right the size of the tarball is about 34MB.

Good luck.

Attachments
recipe.txt
Rename "recipe.txt" to "recipe"
(1.13 KiB) Downloaded 34 times
Neo_78
Posts: 407
Joined: Wed Dec 29, 2021 10:45 pm
Has thanked: 232 times
Been thanked: 11 times

Re: Tutorial to setup latest Python in FatDog?

Post by Neo_78 »

Thanks for your guidance @jamesbond.

Do you know how long the compilation process roughly takes in this case?

Regarding the recipe:

"The system is "recipe" driven, you need to give the pkgbuild system a "recipe" - an set of instructions of how to build the package. A "recipe" is actually a shell script containing the commands that you usually use to build a package, e.g. the "configure" and "make" and "make install"; it also include commands where to download the source tarball."

Are there further explanations available in the documentation how to correctly write the recipe instructions?

Fatdog's default code editor Geany actually does not seem to be a bad tool for Python development:

https://tangenttechnologies.ca/blog/geany-python/

User avatar
Flash
Moderator
Posts: 954
Joined: Tue Dec 03, 2019 3:13 pm
Location: Arizona, U.S.
Has thanked: 50 times
Been thanked: 119 times

Re: Tutorial to setup latest Python in FatDog?

Post by Flash »

Chaos coordinator :?
jamesbond
Posts: 704
Joined: Tue Aug 11, 2020 3:02 pm
Location: The Pale Blue Dot
Has thanked: 121 times
Been thanked: 390 times

Re: Tutorial to setup latest Python in FatDog?

Post by jamesbond »

@Flash, as interesting as it is, unfortunately it's not the same thing. The article talks about a completely different compiler (called Codon) that can understand a subset of Python. But they are not the same thing. Python users don't benefit from the speed improvement that Codon does.

@Neo_78 - the compilation only take a few minutes on my machine. Yours may vary.

Yeah, the documentation for Fatdog's pkgbuild system leaves a lot to be desired. It is currently very sparse. But we generally don't spend effort for things that have no demand. As it is, Fatdog's pkgbuild was released 9 years ago, and you are the first person ever who asks about it. If more people have asked, we might be more motivated to document it better ...

In the meanwhile, there is an example recipe file on /usr/src/pkgbuild/pkg/shell/recipe. It generally explains the flow of the recipe, and options you can put in it. Fatdog pkgbuild system basically loads up the recipe, and calls up certain script functions you specify in the recipe, to build the package. For more examples, look up /usr/src/pkgbuild/source. This folder contains the recipes of all packages you have installed in your system.

Neo_78
Posts: 407
Joined: Wed Dec 29, 2021 10:45 pm
Has thanked: 232 times
Been thanked: 11 times

Re: Tutorial to setup latest Python in FatDog?

Post by Neo_78 »

Thanks for your detailed explanation @jamesbond. Much appreciated! :thumbup:

Is pip available to install pycodestyle, pyflakes and pylint for automated Python code analysis in Geany?

By the way, what is the current process to add a new package like latest, stable Python to FatDog's official package manager?

jamesbond
Posts: 704
Joined: Tue Aug 11, 2020 3:02 pm
Location: The Pale Blue Dot
Has thanked: 121 times
Been thanked: 390 times

Re: Tutorial to setup latest Python in FatDog?

Post by jamesbond »

Neo_78 wrote: Wed Apr 05, 2023 8:45 pm

Is pip available to install pycodestyle, pyflakes and pylint for automated Python code analysis in Geany?

I don't know how it works in geany, but this is how to install the modules:

Code: Select all

pip install --upgrade pip
pip install pycodestyle
pip install pyflakes
pip install pylink

Seems to work.

By the way, what is the current process to add a new package like latest, stable Python to FatDog's official package manager?

Create a repository yourself, and add that repository to /etc/slapt-get/slapt-getrc. There are a few examples there.

In order to create your own repository:
1. Create a folder.
2. Populate folder with packages
3. From terminal, in the directory containing the packages, run the following commands:

Code: Select all

pkg2repo MD5
pkg2repo new
pkg2repo PACKAGESTXT

4. Then lastly run a webserver that serves the content of this directory. Civetweb (included in Fatdog64) will do just fine.

Post Reply

Return to “FatDog64”