The State of Python Packaging in 2021 – Bastian Venthur's Blog
venthur.de
venthur.de
As soon as your python code needs to be used by others (library or application) things start to get messy and arcane. I will say that if all you do is deploy some python code to a server then a lot of the friction is usually avoided.
The author repeats this experience so I wonder why pipenv is out in the spotlight here?
[1] http://packaging.python.org/tutorials/packaging-projects.htm...
Poetry comes close but it is quirky at times, and it isn't the official standard.
I understand that everything I mentioned would also be possible with the standard tools, but I don't get why the things nearly every python dev has to deal with were designed to be so convoluted, so developer-unfriendly, so unpythonic. Good tooling like this is not only about comfort and ease of entry, it is also a way to encourage best practise.
The issue is finding the money, first to pay for a little dev time, second to pay for the much more expensive infrastructure costs of running this kind of continuous build/test infrastructure.
In Python, when you want to import a module from a path, you have to:
def module_from_path( name, path ):
import importlib
import importlib.util
spec = importlib.util.spec_from_file_location( name, path )
module = importlib.util.module_from_spec( spec )
sys.modules[ spec.name ] = module
spec.loader.exec_module( module )
return importlib.import_module( name )
wat?In my 8 years of working Python, I’ve never once needed to import a module from an absolute path.
Just because doing this one task is complicated doesn’t mean that the system is bad.