techouse / sqlite3-to-mysql

Transfer data from SQLite to MySQL

Home Page:https://techouse.github.io/sqlite3-to-mysql/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Statically Binary missing

the-hotmann opened this issue · comments

Since I am used to golang I am used to easily compile any programm to one statically binary and use it how ever it pleases me.
Apparently in this programm still needs me to have python installed, which I on some systems do not have and on some older systems (very old ones) can not even install without any problem.

A statically binary that will work out of the box would be super awesome. Maybe even offer it in the download section for every version.
Best would be to compile it directly for the most common architectures, like:

  • amd64
  • arm64
  • i386
  • arm/v6
  • arm/v7

Anyway, for amd64 would be enough for the start.
I already tried to compile it with pyinstaller & staticx, but had no success. Once the prgramm was transfered to another OS (where the required files in the /tmp folder are missing) it was not working anymore.

Thanks in advance! :)

Hey,

Python was deliberately chosen because of the flexibility it offers. The tradeoff is speed and portability, however, the latter can be mitigated by a PyPI package.

A statically binary that will work out of the box would be super awesome. Maybe even offer it in the download section for every version.
Best would be to compile it directly for the most common architectures, like:

  • amd64
  • arm64
  • i386
  • arm/v6
  • arm/v7

Anyway, for amd64 would be enough for the start.
I already tried to compile it with pyinstaller & staticx, but had no success. Once the prgramm was transfered to another OS (where the required files in the /tmp folder are missing) it was not working anymore.

Static binaries would have to be produced for every OS, i.e. Linux, macOS and Windows, with the latter 2 requiring binary signing which is not free (for example Apple requires a Developer account costing 99 USD). Then there are various architectures, from x86, x86_64 to arm64. It becomes quite laborious super quickly. Last but not least, there are various OSS licenses which might not permit binary distribution.

Seeing that you already tried also points out another problem - Python is an interpreted language and was not designed to be compiled into a static binary like Go, Swift or C++.

A compromise here might be a Docker file, however, that drags along its dependencies as well. I might consider adding that, however, at the moment a PyPI package seems fairly up to the task.

Apparently in this programm still needs me to have python installed, which I on some systems do not have and on some older systems (very old ones) can not even install without any problem.

Frankly I'm not sure why one would be looking for a Python package without having Python installed in the first place.

Thanks for your feedback, I appreciate it.

I was not aware of apple requires you to pay for signing the binary, ofc I dont want to cause any costs.

A dockerfile would be awesome and I just have seen that it already is available, that is awesome, thanks, I will try it :)

Frankly I'm not sure why one would be looking for a Python package without having Python installed in the first place.

Ah, I probably poorly phrased what I ment. I wanted to point out, that as this is not statically bindable, it will require me to install Python on some very old RHEL 5 VMs. Which these days is problematic, as there are no repos available anymore.
A statically links/bind binary would be written in Python, but to execute it you dont need it. Sorry for the missunderstanding.

Then there are various architectures, from x86, x86_64 to arm64. It becomes quite laborious super quickly. Last but not least, there are various OSS licenses which might not permit binary distribution.

Yes, thats how we do it with golang. Also one of its nice features. I would not care about performance, at such migrator-tools :) So performance shall not play any role here.

Thanks for the swift answer!

A dockerfile would be awesome and I just have seen that it already is available, that is awesome, thanks, I will try it :)

Yeah, I just forgot to add push: true to the Github action so it didn't publish it 💩 Will fix it in the afternoon.

it will require me to install Python on some very old RHEL 5 VMs

You can use v1 for that as it still supports Python 2.7. In v2 I dropped Python 2 support completely.

You might also want to give the tool access to the SQLite file via ssh and access to the MySQL database via a network protocol in that case. You don't need to run the tool on the target machine as long as it has access to the data.