lgtm, in the regard of FEM
FHS compliance long term project.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
Re: FHS compliance long term project.
Re: FHS compliance long term project.
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...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.
Re: FHS compliance long term project.
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:
Or should FreeCAD only be offered for the default Python version 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()
- hobbes1069
- Posts: 291
- Joined: Wed Nov 09, 2011 3:49 pm
- Location: Southaven, MS
Re: FHS compliance long term project.
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
/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
Re: FHS compliance long term project.
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.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.
- kkremitzki
- Veteran
- Posts: 2515
- Joined: Thu Mar 03, 2016 9:52 pm
- Location: Illinois
Re: FHS compliance long term project.
While not essential I think it would be a nice-to-have for future potentially difficult Python version transitions.
Re: FHS compliance long term project.
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.
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.
Re: FHS compliance long term project.
how is the situation with fedora/centos? Are different versions of python installable side by side?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.
- hobbes1069
- Posts: 291
- Joined: Wed Nov 09, 2011 3:49 pm
- Location: Southaven, MS
Re: FHS compliance long term project.
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.