FHS compliance long term project.

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: FHS compliance long term project.

Post by bernd »

PrzemoF wrote: Tue Jun 02, 2020 12:19 pm 2. https://github.com/FreeCAD/FreeCAD/pull/3525
lgtm, in the regard of FEM
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: FHS compliance long term project.

Post by bernd »

vocx wrote: Tue Jun 02, 2020 4:35 pm It's good, and I'm glad somebody is taking the initiative.
+1
User avatar
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

Re: FHS compliance long term project.

Post by looo »

kkremitzki wrote: Thu Jul 02, 2020 4:53 am And the directory can be versioned too so the path could end with freecad-0.19 for example.
Restructuring doesn't make much sense if we still keep the multi-version policy. In my eyes this is not only from a python perspective but in general. If we want to gain consistency we should avoid multiple versions of freecad in the same system. The solution for multiple version is provided by snaps, flatpaks appimages, virtual environments...
wmayer
Founder
Posts: 20302
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: FHS compliance long term project.

Post by wmayer »

Another point to consider if FreeCAD should be offered for all supported Python3 versions of a system.

When looking at the official repository of Ubuntu Bionic without any external PPA I can install several Python versions in parallel. These are version 2.7, 3.6, 3.7 and 3.8.

In order to make this working correctly and avoid that with Py3.6 it loads an extension module of Py3.7 these .so files have a suffix in their file names.
For example for Py3.6 the extension module _ctypes is not simply called _ctypes.so but _ctypes.cpython-36m-x86_64-linux-gnu.so.

You get the list of allowed suffixes with:

Code: Select all

import _imp
_imp.extension_suffixes()
Or should FreeCAD only be offered for the default Python version of a system?
User avatar
hobbes1069
Posts: 291
Joined: Wed Nov 09, 2011 3:49 pm
Location: Southaven, MS

Re: FHS compliance long term project.

Post by hobbes1069 »

If one were to drop python libraries directly into /usr/lib{,64} then I think having the python suffix would be a very good idea, but most packages (at least on Fedora) put libraries in a versioned subdirectory, i.e.:

/usr/lib{,64}/pythonX.Y/...

In which case I don't think it matters, but looking in my python3.8 directory, 60-70% of the libraries there do have the python suffix.

Thanks,
Richard
User avatar
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

Re: FHS compliance long term project.

Post by looo »

wmayer wrote: Thu Jul 02, 2020 12:36 pm When looking at the official repository of Ubuntu Bionic without any external PPA I can install several Python versions in parallel. These are version 2.7, 3.6, 3.7 and 3.8.

In order to make this working correctly and avoid that with Py3.6 it loads an extension module of Py3.7 these .so files have a suffix in their file names.
For example for Py3.6 the extension module _ctypes is not simply called _ctypes.so but _ctypes.cpython-36m-x86_64-linux-gnu.so.
Do we really have to support multiple python versions in one system? In my eyes that's the same wrong design as having multiple freecad-versions in one system. For sure distros simplify packaging by allowing to use different python versions, but if we talk about consistency (which this topic is about) this is not the way to proceed.
User avatar
kkremitzki
Veteran
Posts: 2515
Joined: Thu Mar 03, 2016 9:52 pm
Location: Illinois

Re: FHS compliance long term project.

Post by kkremitzki »

While not essential I think it would be a nice-to-have for future potentially difficult Python version transitions.
Like my FreeCAD work? I'd appreciate any level of support via Patreon, Liberapay, or PayPal! Read more about what I do at my blog.
User avatar
PrzemoF
Veteran
Posts: 3520
Joined: Fri Jul 25, 2014 4:52 pm
Contact:

Re: FHS compliance long term project.

Post by PrzemoF »

If FreeCAD can be run from the directory where is was compiled I don't need the ability to install multiple versions, but I'm aware that it might be nice to have for some people. Bug hunting is one obvious example.

I'd stick to the default version of python unless there are some benefits that are not obvious to me. Probably 95% of normal users don't care as long as FreeCAD works. I hope that the recent problems with python (2->3, 3.x compatibility problems, pyside2, shiboken2 etc) were something that we won't see any time soon.
User avatar
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

Re: FHS compliance long term project.

Post by looo »

PrzemoF wrote: Fri Jul 03, 2020 10:04 am If FreeCAD can be run from the directory where is was compiled I don't need the ability to install multiple versions, but I'm aware that it might be nice to have for some people. Bug hunting is one obvious example.

I'd stick to the default version of python unless there are some benefits that are not obvious to me. Probably 95% of normal users don't care as long as FreeCAD works. I hope that the recent problems with python (2->3, 3.x compatibility problems, pyside2, shiboken2 etc) were something that we won't see any time soon.
how is the situation with fedora/centos? Are different versions of python installable side by side?
User avatar
hobbes1069
Posts: 291
Joined: Wed Nov 09, 2011 3:49 pm
Location: Southaven, MS

Re: FHS compliance long term project.

Post by hobbes1069 »

Only with major versions, you have one python2 and one python3. Although since python2 is EOL most of it has been removed. You can still get a python2.7 if you really need it, but no guarantee on any modules/libraries being avilable.
Post Reply