File pg_chameleon.spec of Package pg_chameleon
#
# spec file for package pg_chameleon
#
# Copyright (c) 2022 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/
#
%if 0%{?suse_version} == 1500
%global pythons python311
%else
%global pythons %{primary_python}
%endif
Name:           pg_chameleon
Version:        2.0.21
Release:        0
Summary:        MySQL to PostgreSQL replica system
License:        BSD-2-Clause
Url:            https://www.pgchameleon.org/
Source:         https://codeberg.org/the4thdoctor/pg_chameleon/archive/v%{version}.tar.gz#/pg_chameleon-v%{version}.tar.gz
BuildRequires:  %{pythons} >= 3.6
BuildRequires:  %{pythons}-pip
BuildRequires:  %{pythons}-setuptools
BuildRequires:  %{pythons}-wheel
%if %{with tests}
BuildRequires:  %{pythons}-PyMySQL >= 0.10.0
BuildRequires:  %{pythons}-mysql-replication >= 0.22
BuildRequires:  %{pythons}-psycopg2 >= 2.8.3
BuildRequires:  %{pythons}-PyYAML >= 5.1.2
BuildRequires:  %{pythons}-tabulate >= 0.8.1
BuildRequires:  %{pythons}-daemonize >= 2.4.7
BuildRequires:  %{pythons}-rollbar >= 0.13.17
%endif
Requires:       %{pythons}-PyMySQL >= 0.10.0
Requires:       %{pythons}-mysql-replication >= 0.22
Requires:       %{pythons}-psycopg2 >= 2.8.3
Requires:       %{pythons}-PyYAML >= 5.1.2
Requires:       %{pythons}-tabulate >= 0.8.1
Requires:       %{pythons}-daemonize >= 2.4.7
Requires:       %{pythons}-rollbar >= 0.13.17
BuildArch:      noarch
%description
pg_chameleon is a MySQL to PostgreSQL replica system written in Python 3. The
system use the library mysql-replication to pull the row images from MySQL
which are stored into PostgreSQL as JSONB. A pl/pgsql function decodes the
jsonb values and replays the changes against the PostgreSQL database.
%prep
%autosetup -p1 -n %{name}
%build
%pyproject_wheel
%install
%pyproject_install
%files
%license LICENSE.txt
%doc *.rst *.md
%doc docs/*.rst
%{_bindir}/chameleon*
%{python_sitelib}/%{name}/
%{python_sitelib}/%{name}*info*/
%changelog