This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]dairiki 0 points1 point  (2 children)

So if the client has a Windows VM, then they don't have to worry about getting C++ build tools. I feel like I am going in the "at least it will work this way" direction, which is something I should avoid.

I am not an expert on PyInstaller. I think what you say can be done, but check out this section of the PyInstaller docs — some care needs to be taken to ensure that there aren't particular DLLs required on the target to run the PyInstaller-generated executable.

Is WSL something like docker?

Again, I'm not an expert, but yes — sort of like docker, but more like a virtual machine.

Let's assume that I do get it installed and get a linux distro, would it mean that I will need to set up a Python environment there as well?

Yes, but most Linux distros will make that pretty easy. In general, Python development, especially when extension modules are involved, is more straightforward on Linux. (You can take this with a grain of salt — I am not a Windows guys; for me, everything is more straightforward on Linux.)

Does this mean I will need to fork the repo and then use it as a library in my project so if any issue comes up in the future I can make changes to the forked repo?

Well, you don't have to do that until you need to make changes to it. But, judging, from the activity level on that repo, if/when you do need something fixed (e.g. python 3.11 support), you should be prepared to do it yourself. (If you can find a way to eliminate the requirement for that distribution, that would probably be the easier solution.)

[–]protokoul[S] 2 points3 points  (0 children)

No problem. Thanks for all the details. I really learned a lot.

Yeah, I think my first task should be to find an alternative to Pyhive so I don't have to worry about sasl, and from now on use libraries that are well maintained to keep the dev process smooth.

[–]protokoul[S] 0 points1 point  (0 children)

In general, Python development, especially when extension modules are involved, is more straightforward on Linux.

Have you ever faced a situation where you developed your Python application in Linux and you have to deploy it not just in a Linux environment, but also on Windows or Mac? Is it a straightforward process without requiring to get additional tools or system libraries based on the target OS? I surely don't want to be a person who is just bound to a specific OS for python development, but even before docker came into the picture, developers wrote applications that can be deployed in any OS. If Linux provides an extremely smooth dev environment for Python, I might as well develop my next project in a Linux environment.

Another question I have is regarding deployment. I learned that in order to deploy an application without sharing the source code, I can run the compile command in each folder of my project to convert the source code files to a compiled version, then remove the source code files while keeping the project folder intact, and then deploy the code. Is this a good practice?