From 1bff67f7aa9761eeed08fb33ebb5d46c63fcf2dccf429534068a08528ab26116 Mon Sep 17 00:00:00 2001 From: Nico Krapp Date: Sat, 28 Jun 2025 14:03:06 +0000 Subject: [PATCH] - Support libalternatives for 16.0 and newer - Update to 2.4.0 * add conversion of SQLite custom BOOL data type to MySQL TINYINT(1) * add --mysql-skip-create-tables and --mysql-skip-transfer-data options * fix default parameter parsing * add MySQL 8.4 and MariaDB 11.4 support * fix conversion of SQLite NUMERIC data type with precision and scale to MySQL DECIMAL with precision and scale * fix --mysql-insert-method * modify the existing check_mysql_json_support and check_mysql_fulltext_support to improve detection of MariaDB versions * fix connecting with empty MySQL password OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-sqlite3-to-mysql?expand=0&rev=15 --- .gitattributes | 23 ++++++ .gitignore | 1 + _service | 16 +++++ python-sqlite3-to-mysql.changes | 72 +++++++++++++++++++ python-sqlite3-to-mysql.spec | 120 ++++++++++++++++++++++++++++++++ sqlite3-to-mysql-2.1.7.obscpio | 3 + sqlite3-to-mysql-2.4.0.obscpio | 3 + sqlite3-to-mysql.obsinfo | 4 ++ 8 files changed, 242 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 _service create mode 100644 python-sqlite3-to-mysql.changes create mode 100644 python-sqlite3-to-mysql.spec create mode 100644 sqlite3-to-mysql-2.1.7.obscpio create mode 100644 sqlite3-to-mysql-2.4.0.obscpio create mode 100644 sqlite3-to-mysql.obsinfo diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/_service b/_service new file mode 100644 index 0000000..a96a530 --- /dev/null +++ b/_service @@ -0,0 +1,16 @@ + + + https://github.com/techouse/sqlite3-to-mysql.git + git + v2.4.0 + @PARENT_TAG@ + v(.*) + + + + + gz + *.tar + + + diff --git a/python-sqlite3-to-mysql.changes b/python-sqlite3-to-mysql.changes new file mode 100644 index 0000000..f5e7adf --- /dev/null +++ b/python-sqlite3-to-mysql.changes @@ -0,0 +1,72 @@ +------------------------------------------------------------------- +Sat Jun 28 12:00:45 UTC 2025 - Enno Gotthold + +- Support libalternatives for 16.0 and newer +- Update to 2.4.0 + * add conversion of SQLite custom BOOL data type to MySQL TINYINT(1) + * add --mysql-skip-create-tables and --mysql-skip-transfer-data options + * fix default parameter parsing + * add MySQL 8.4 and MariaDB 11.4 support + * fix conversion of SQLite NUMERIC data type with precision and scale to + MySQL DECIMAL with precision and scale + * fix --mysql-insert-method + * modify the existing check_mysql_json_support and check_mysql_fulltext_support + to improve detection of MariaDB versions + * fix connecting with empty MySQL password + +------------------------------------------------------------------- +Mon Jan 29 11:42:15 UTC 2024 - pgajdos@suse.com + +- python-six is not required + +------------------------------------------------------------------- +Sat Jan 20 13:18:29 UTC 2024 - Enno Gotthold + +- Update to 2.1.7 +- Update to 2.1.5 + * feat: add support for UNSIGNED numeric data type conversion + * fix: fix invalid column_type error message + +------------------------------------------------------------------- +Sun Oct 22 14:13:29 UTC 2023 - Enno Gotthold + +- Update to 2.1.0 + * 2.0.3: prevent AUTO_INCREMENT-ing fields from having a DEFAULT value + * 2.0.2: properly import CMySQLConnection + +------------------------------------------------------------------- +Sat Dec 3 01:01:44 UTC 2022 - Yogalakshmi Arunachalam + +- Update to version 1.4.16 + * Fix #46 - utf8 support + +- Update to version 1.4.15 + * Add option to truncate existing tables before inserting data + +- Update to version 1.4.14 + * Fix safe_identifier_length + +- Update to version 1.4.13 + * Add option to update duplicate records + +------------------------------------------------------------------- +Mon Jun 21 10:13:44 UTC 2021 - Jan Engelhardt + +- Ensure neutrality of descriptions. + +------------------------------------------------------------------- +Sun Jun 20 13:41:07 UTC 2021 - Enno Gotthold + +- Update to Version 1.4.1 + * Handle duplicate indices + * Transition from TravisCI to GH Actions + +------------------------------------------------------------------- +Mon Jan 4 12:33:40 UTC 2021 - Enno Gotthold + +- Update to version 1.3.11 + +------------------------------------------------------------------- +Tue Dec 1 17:42:41 UTC 2020 - Enno Gotthold + +- Packaging of Version 1.3.10 diff --git a/python-sqlite3-to-mysql.spec b/python-sqlite3-to-mysql.spec new file mode 100644 index 0000000..6b62b21 --- /dev/null +++ b/python-sqlite3-to-mysql.spec @@ -0,0 +1,120 @@ +# +# spec file for package python-sqlite3-to-mysql +# +# Copyright (c) 2025 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%define short_name sqlite3-to-mysql +%define skip_python2 1 +%if 0%{?suse_version} > 1500 +%bcond_without libalternatives +%else +%bcond_with libalternatives +%endif + +Name: python-sqlite3-to-mysql +Version: 2.4.0 +Release: 0 +Summary: A Python tool to transfer data from SQLite 3 to MySQL +License: MIT +URL: https://github.com/techouse/sqlite3-to-mysql +Source: %{short_name}-%{version}.tar.gz +# libalternative +%if %{with libalternatives} +Requires: alts +BuildRequires: alts +%else +Requires(post): update-alternatives +Requires(postun): update-alternatives +%endif +# Package Requirements +BuildRequires: %{python_module SQLAlchemy-Utils} +BuildRequires: %{python_module SQLAlchemy} +BuildRequires: %{python_module docker} +BuildRequires: %{python_module factory_boy} +BuildRequires: %{python_module hatchling} +BuildRequires: %{python_module pip} +BuildRequires: %{python_module setuptools} +BuildRequires: docker +BuildRequires: fdupes +BuildRequires: libmariadb-devel +BuildRequires: python-rpm-macros +Requires: python-Unidecode >= 1.3.6 +Requires: python-click >= 8.1.3 +Requires: python-mysql-connector-python >= 9.0.0 +Requires: python-packaging +Requires: python-python-dateutil +Requires: python-pytimeparse2 +Requires: python-simplejson >= 3.19.1 +Requires: python-tabulate +Requires: python-tqdm >= 4.65.0 +Requires: python-types-python-dateutil +Requires: python-typing_extensions +BuildArch: noarch +# SECTION test requirements +BuildRequires: %{python_module Sphinx} +BuildRequires: %{python_module click >= 7.0} +BuildRequires: %{python_module coverage} +BuildRequires: %{python_module ddt} +BuildRequires: %{python_module flake8} +BuildRequires: %{python_module mysql-connector-python >= 9.0.0} +BuildRequires: %{python_module packaging >= 20.3} +BuildRequires: %{python_module pytest >= 7.3.1} +BuildRequires: %{python_module pytest-cov} +BuildRequires: %{python_module pytest-mock} +BuildRequires: %{python_module pytest-timeout} +BuildRequires: %{python_module pytimeparse >= 1.1.8} +BuildRequires: %{python_module simplejson >= 3.16.0} +BuildRequires: %{python_module sphinxcontrib-programoutput} +BuildRequires: %{python_module tabulate} +BuildRequires: %{python_module tqdm >= 4.35.0} +# /SECTION +%python_subpackages + +%description +A Python tool to transfer data from SQLite 3 to MySQL + +%prep +%autosetup -p1 -n sqlite3-to-mysql-%{version} + +%build +%pyproject_wheel + +%install +%pyproject_install +%python_clone -a %{buildroot}%{_bindir}/sqlite3mysql +%python_expand %fdupes %{buildroot}%{$python_sitelib} + +# We cannot execute the tests here due to python-mysql-connector-python missing +# the C-extension. + +%pre +# removing old update-alternatives entries +%python_libalternatives_reset_alternative sqlite3mysql + +%post +%python_install_alternative sqlite3mysql + +%postun +%python_uninstall_alternative sqlite3mysql + +%files %{python_files} +%doc README.md +%license LICENSE +%python_alternative %{_bindir}/sqlite3mysql +%{python_sitelib}/sqlite3_to_mysql-%{version}*-info +%{python_sitelib}/sqlite3_to_mysql + +%changelog diff --git a/sqlite3-to-mysql-2.1.7.obscpio b/sqlite3-to-mysql-2.1.7.obscpio new file mode 100644 index 0000000..631097c --- /dev/null +++ b/sqlite3-to-mysql-2.1.7.obscpio @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e1a35f87ff486353f0d337dcdc799b44b607a25eee78c54d463e587bc511afd8 +size 207371 diff --git a/sqlite3-to-mysql-2.4.0.obscpio b/sqlite3-to-mysql-2.4.0.obscpio new file mode 100644 index 0000000..caac058 --- /dev/null +++ b/sqlite3-to-mysql-2.4.0.obscpio @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c1c197b7a0284a60cdf0ccb7402b1d0adbe75de7459a68a711ad4df0f5204c79 +size 240139 diff --git a/sqlite3-to-mysql.obsinfo b/sqlite3-to-mysql.obsinfo new file mode 100644 index 0000000..6ba5949 --- /dev/null +++ b/sqlite3-to-mysql.obsinfo @@ -0,0 +1,4 @@ +name: sqlite3-to-mysql +version: 2.4.0 +mtime: 1743058172 +commit: 8905a9572c8c20dbc07b1390a506eb6fb1083540