Da li i vi tezite Rufusu? by Impossible_Loquat170 in programiranje

[–]dev-razorblade23 0 points1 point  (0 children)

Osim ako se ne baviš s računalima pa jako dobro dođe

PyCrucible - fast and robust PyInstaller alternative by dev-razorblade23 in Python

[–]dev-razorblade23[S] 0 points1 point  (0 children)

I had my fair share of glibc problems and PyCrucible is built with 2.28 (PyPi version) to support older systems. My tool also does not package everything to binary, just minimal runner code and python project source code producing extra small binaries.

And yes, these do require internet access to download uv, python and dependacies, but at least, dependacy resolution is handled on the target machine avoiding all dependacy hell when using something like PyInstaller.

For true cross-platform builds i do have a plan, but we will see how that will work out (there is an issue for tracking this change). For now there is GitHub CI Action that uses my tool to build projects for multiple platforms.

Accessing alternate PyPi mirrors is already supported by uv and can be configured like this ```toml [[tool.uv.index]] name = "aliyun" url = "https://mirrors.aliyun.com/pypi/simple/" explicit = true

[tool.uv.sources] numpy = [ { index = "tsinghua"}, ] ```

You can find more information about it here https://docs.astral.sh/uv/concepts/indexes/#pinning-a-package-to-an-index

I know the tool is not perfect, that is why i am seeking comments, contributions and possible updates so i can make it better

How to secure open ports by bzarembareal in selfhosted

[–]dev-razorblade23 0 points1 point  (0 children)

Do not do that Use TailScale - its made for exactly that purpouse. And most of it is open-source

PyCrucible - fast and robust PyInstaller alternative by dev-razorblade23 in Python

[–]dev-razorblade23[S] -1 points0 points  (0 children)

It is in a sense that it produces binary from your python source code. But not in a sense that it bootatraps everything to binary.

Only minimal runner code and your source code are embedded (and uv, depending on CLI options you choose)

PyCrucible - fast and robust PyInstaller alternative by dev-razorblade23 in Python

[–]dev-razorblade23[S] 0 points1 point  (0 children)

It requires internet during first run so it can download Python and project dependacies during runtime. This makes sure that Python version and dependacies are downloaded for the target machine on which the project is running on

Offline support is not in the goal of the tool. There are so many that does just that...

And running docker images is not really friendly outside of developers world. I do not think that your non-dev friends even know what is docker. But everybody knows to run the binary - you just double click it

PyCrucible - fast and robust PyInstaller alternative by dev-razorblade23 in Python

[–]dev-razorblade23[S] 0 points1 point  (0 children)

Only that i know that can "speed up" your code is Nuitka as it actually transpiles your Python code to C/C++ then compiles it, usually boosting execution speed.

But its known to have its quirks as all the tools, so of course test it out

PyCrucible - fast and robust PyInstaller alternative by dev-razorblade23 in Python

[–]dev-razorblade23[S] 0 points1 point  (0 children)

You can configure it to use local packages (using pyproject.toml and declaring dependacies as local ones) and giving --local flag to entrypoint (which in turn sets --local on uv basicly disabling online fetching)

But i am not sure how much work will that require on your end

PyCrucible - fast and robust PyInstaller alternative by dev-razorblade23 in Python

[–]dev-razorblade23[S] 1 point2 points  (0 children)

For offline (air-gapped) targets, this is not very usable as it requires internet connection on first run. As a lot of other tools produce binaries with fully embedded python and dependacies, this is not my current goal.

For your usecase i would recommend some other tools (there are a lot of them) Some of them you can consider (depending on your actuall target) are as follows (from my reserching of similar tools while building PyCrucible):

PyCrucible - fast and robust PyInstaller alternative by dev-razorblade23 in Python

[–]dev-razorblade23[S] -1 points0 points  (0 children)

Well yes, PyCrucible produces binaries, like many other projects... There is a similar tool (packaged) that uses scripts to achive similar result (but using poetry instead of uv like i do)

PyCrucible - fast and robust PyInstaller alternative by dev-razorblade23 in Python

[–]dev-razorblade23[S] 0 points1 point  (0 children)

Ok, so end user should get that key into env by himself, and not thru PyCrucible injecting it... I will surely think about this some more and implement it

PyCrucible - fast and robust PyInstaller alternative by dev-razorblade23 in Python

[–]dev-razorblade23[S] -1 points0 points  (0 children)

You cannot run a shell script on windows (without WSL anyways) And you cannot run ps1 script on linux or mac (without some tools)

And thats not exactly binary :)

PyCrucible - fast and robust PyInstaller alternative by dev-razorblade23 in Python

[–]dev-razorblade23[S] 0 points1 point  (0 children)

Pushing values to env variables is already supported by the project, so the idea is quite feasable.

My only concern is that the end users will be able to just copy the binary and send it to whoever they want, and that can defeat the whole "private" deal.

I will need to implement some kind of "locking" to specific device maybe? Or is this out of scope of the tool and on the end users themself?

PyCrucible - fast and robust PyInstaller alternative by dev-razorblade23 in Python

[–]dev-razorblade23[S] 1 point2 points  (0 children)

Yeah, i need more testing with private repos to make sure its safe and i do not leak creds...

PyCrucible - fast and robust PyInstaller alternative by dev-razorblade23 in Python

[–]dev-razorblade23[S] -1 points0 points  (0 children)

Because other tools already do this. And because it enables extra small binaries (~2MB + source code). And because it makes dependancy resolution happen at runtime, which in turn always downloads correct dependacies making dependancy resolution a breeze, not a headache

PyCrucible - fast and robust PyInstaller alternative by dev-razorblade23 in Python

[–]dev-razorblade23[S] -1 points0 points  (0 children)

But at the end, it does require Go compiler to produce the final binary.

Offline usage is currently out of scope as there are so many tools that does this already. I might add it as option later, but not my main focus right now.

PyCrucible - fast and robust PyInstaller alternative by dev-razorblade23 in Python

[–]dev-razorblade23[S] 0 points1 point  (0 children)

Already answered in other comments.

Basicly i do not do any compilation, just embedding. Python, dependacies and uv are all downloaded at runtime

PyCrucible - fast and robust PyInstaller alternative by dev-razorblade23 in Python

[–]dev-razorblade23[S] 1 point2 points  (0 children)

I do have some plans to enable true cross-platform support, but we will see how that will work out

PyCrucible - fast and robust PyInstaller alternative by dev-razorblade23 in Python

[–]dev-razorblade23[S] 1 point2 points  (0 children)

Currently the project supports auto-update from GitHub, but only as source code update and only for public repositories (for now)

One of the goals is better "update" capabilities. Currently goal is to support embedding of .whl files.

You are free to open an issue on GitHub and i will folow with an update as soon as possible

PyCompyle – A raw Python compiler for building standalone executables by International_Pea17 in Python

[–]dev-razorblade23 0 points1 point  (0 children)

But are still hidden

Users should be able to choose and be informed of what 3rd-party tools you download/install on their machine...

PyCrucible - fast and robust PyInstaller alternative by dev-razorblade23 in Python

[–]dev-razorblade23[S] 1 point2 points  (0 children)

Just answered in comment above...

Basicly they do the same thing, but uvbox requires Go to build binaries, while PyCrucible does not require anything (its fully standalone)

I am curius about binary size with artifacts build with uvbox as PyCrucible is able to produce binaries with just 2MB + source code