public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
To: git-commits@fedoraproject.org
Subject: [rpms/mlt] epel9-next: Add python3-mlt in addition to python2-mlt, document Python 2 exception
Date: Mon, 20 Jul 2026 18:17:26 GMT [thread overview]
Message-ID: <178457144676.1.14725245536028579891.rpms-mlt-1902f658609e@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/mlt
Branch : epel9-next
Commit : 1902f658609efacc3f89d8b238a67b9075d7ccc9
Author : Sérgio M. Basto <sergio@serjux.com>
Date : 2019-10-23T01:30:16+01:00
Stats : +44/-31 in 1 file(s)
URL : https://src.fedoraproject.org/rpms/mlt/c/1902f658609efacc3f89d8b238a67b9075d7ccc9?branch=epel9-next
Log:
Add python3-mlt in addition to python2-mlt, document Python 2 exception
---
diff --git a/mlt.spec b/mlt.spec
index 1585241..35b7410 100644
--- a/mlt.spec
+++ b/mlt.spec
@@ -1,7 +1,14 @@
%bcond_without ruby
%bcond_without php
%bcond_with freeworld
-%if 0%{?fedora} >= 32
+
+%if (0%{?rhel} && 0%{?rhel} <= 7) || (0%{?fedora} && 0%{?fedora} <= 32)
+%bcond_without python2
+%else
+%bcond_with python2
+%endif
+
+%if 0%{?fedora} >= 31 || 0%{?rhel} >= 8
%bcond_without python3
%else
%bcond_with python3
@@ -49,10 +56,11 @@ BuildRequires: libxml2-devel
BuildRequires: sox-devel
# verion 3.0.11 needed for php7 IIRC
BuildRequires: swig >= 3.0.11
+%if %{with python2}
+BuildRequires: python2-devel
+%endif
%if %{with python3}
BuildRequires: python3-devel
-%else
-BuildRequires: python2-devel
%endif
BuildRequires: freetype-devel
BuildRequires: libexif-devel
@@ -68,7 +76,7 @@ BuildRequires: ffmpeg-devel
BuildRequires: xine-lib-devel
%endif
-%if %{with python3}
+%if !%{with python2}
Obsoletes: python2-mlt < %{version}-%{release}
%endif
@@ -105,25 +113,22 @@ Requires: %{name}%{?_isa} = %{version}-%{release}
The %{name}-devel package contains the header files and static libraries for
building applications which use %{name}.
-%package -n python3-mlt
-%{?python_provide:%python_provide python3-mlt}
-Requires: python3
-Requires: %{name}%{?_isa} = %{version}-%{release}
-Summary: Python package to work with MLT
-
-%description -n python3-mlt
-This module allows to work with MLT using python.
-
%package -n python2-mlt
%{?python_provide:%python_provide python2-mlt}
Obsoletes: %{name}-python < %{version}-%{release}
-Requires: python2
Requires: %{name}%{?_isa} = %{version}-%{release}
-Summary: Python package to work with MLT
+Summary: Python 2 package to work with MLT
%description -n python2-mlt
-This module allows to work with MLT using python.
+This module allows to work with MLT using python 2.
+%package -n python3-mlt
+%{?python_provide:%python_provide python3-mlt}
+Requires: %{name}%{?_isa} = %{version}-%{release}
+Summary: Python package to work with MLT
+
+%description -n python3-mlt
+This module allows to work with MLT using python 3.
%package ruby
Requires: %{name}%{_isa} = %{version}-%{release}
@@ -165,16 +170,20 @@ sed -i 's|mlt_wrap.cpp|mlt_wrap.cxx|g' src/swig/php/build
%endif
%if %{with python3}
-find src/swig/python -name '*.py' | xargs sed -i '1s|^#!/usr/bin/env python|#!%{__python3}|'
-sed -i -e 's|which python|which python3|' src/swig/python/build
-sed -i -e 's|python -c|python3 -c|' src/swig/python/build
-sed -i -e 's|python-config|python3-config|' src/swig/python/build
-sed -i -e 's|python{}.{}|python{}.{}m|' src/swig/python/build
-%else
+cp -a src/swig/python src/swig/python3
+find src/swig/python3 -name '*.py' | xargs sed -i '1s|^#!/usr/bin/env python|#!%{__python3}|'
+sed -i -e 's|which python|which python3|' src/swig/python3/build
+sed -i -e 's|python -c|python3 -c|' src/swig/python3/build
+sed -i -e 's|python-config|python3-config|' src/swig/python3/build
+sed -i -e 's|python{}.{}|python{}.{}m|' src/swig/python3/build
+%endif
+%if %{with python2}
find src/swig/python -name '*.py' | xargs sed -i '1s|^#!/usr/bin/env python|#!%{__python2}|'
sed -i -e 's|which python|which python2|' src/swig/python/build
sed -i -e 's|python -c|python2 -c|' src/swig/python/build
sed -i -e 's|python-config|python2-config|' src/swig/python/build
+%else
+rm -rf src/swig/python
%endif
%build
@@ -189,7 +198,7 @@ sed -i -e 's|python-config|python2-config|' src/swig/python/build
--disable-xine \
%endif
--rename-melt=%{name}-melt \
- --swig-languages="python %{?with_php: php}%{?with_ruby: ruby}"
+ --swig-languages="%{?with_python2: python}%{?with_python3: python3}%{?with_php: php}%{?with_ruby: ruby}"
%make_build
@@ -198,13 +207,14 @@ sed -i -e 's|python-config|python2-config|' src/swig/python/build
%make_install
# manually do what 'make install' skips
-%if %{with python3}
-install -D -pm 0644 src/swig/python/mlt.py %{buildroot}%{python3_sitelib}/mlt.py
-install -D -pm 0755 src/swig/python/_mlt.so %{buildroot}%{python3_sitearch}/_mlt.so
-%else
+%if %{with python2}
install -D -pm 0644 src/swig/python/mlt.py %{buildroot}%{python2_sitelib}/mlt.py
install -D -pm 0755 src/swig/python/_mlt.so %{buildroot}%{python2_sitearch}/_mlt.so
%endif
+%if %{with python3}
+install -D -pm 0644 src/swig/python3/mlt.py %{buildroot}%{python3_sitelib}/mlt.py
+install -D -pm 0755 src/swig/python3/_mlt.so %{buildroot}%{python3_sitearch}/_mlt.so
+%endif
%if %{with ruby}
install -D -pm 0755 src/swig/ruby/play.rb %{buildroot}%{ruby_vendorlibdir}/play.rb
@@ -241,15 +251,17 @@ test "$(pkg-config --modversion mlt++)" = "%{version}"
%{_libdir}/libmlt.so.*
%{_datadir}/mlt/
+%if %{with python2}
+%files -n python2-mlt
+%{python2_sitelib}/mlt.py*
+%{python2_sitearch}/_mlt.so
+%endif
+
%if %{with python3}
%files -n python3-mlt
%{python3_sitelib}/mlt.py*
%{python3_sitearch}/_mlt.so
%{python3_sitelib}/__pycache__/mlt.*
-%else
-%files -n python2-mlt
-%{python2_sitelib}/mlt.py*
-%{python2_sitearch}/_mlt.so
%endif
%if %{with ruby}
@@ -278,6 +290,7 @@ test "$(pkg-config --modversion mlt++)" = "%{version}"
%changelog
* Tue Oct 22 2019 Sérgio Basto <sergio@serjux.com> - 6.16.0-3
- Couple of fixes from upstream for kdenlive
+- Add python3-mlt in addition to python2-mlt, document Python 2 exception
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 6.16.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
reply other threads:[~2026-07-20 18:17 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=178457144676.1.14725245536028579891.rpms-mlt-1902f658609e@fedoraproject.org \
--to=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox