Hello community, here is the log from the commit of package txt2tags for openSUSE:Factory checked in at 2019-12-14 12:19:18 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/txt2tags (Old) and /work/SRC/openSUSE:Factory/.txt2tags.new.4691 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "txt2tags" Sat Dec 14 12:19:18 2019 rev:6 rq:756869 version:3.3 Changes: -------- --- /work/SRC/openSUSE:Factory/txt2tags/txt2tags.changes 2017-10-11 23:02:30.105883453 +0200 +++ /work/SRC/openSUSE:Factory/.txt2tags.new.4691/txt2tags.changes 2019-12-14 12:23:37.343197119 +0100 @@ -1,0 +2,5 @@ +Sat Dec 7 14:40:37 UTC 2019 - Christoph Junghans <jungh...@votca.org> + +- Switch to jendrikseipp version to support python3 + +------------------------------------------------------------------- Old: ---- txt2tags-2.6.tar.bz2 New: ---- txt2tags-3.3.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ txt2tags.spec ++++++ --- /var/tmp/diff_new_pack.62txu8/_old 2019-12-14 12:23:37.931197031 +0100 +++ /var/tmp/diff_new_pack.62txu8/_new 2019-12-14 12:23:37.935197030 +0100 @@ -2,7 +2,7 @@ # spec file for package txt2tags # # Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. -# Copyright (c) 2013 Christoph Junghans <jungh...@votca.org> +# Copyright (c) 2013,2019 Christoph Junghans <jungh...@votca.org> # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,22 +16,28 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # - +%{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: txt2tags -Version: 2.6 +Version: 3.3 Release: 0 Summary: Converts text files to HTML, XHTML, sgml, LaTeX, man and others License: GPL-2.0 Group: Productivity/Text/Convertors Url: http://txt2tags.sourceforge.net -Source: %{name}-%{version}.tar.bz2 +Source: https://github.com/jendrikseipp/txt2tags/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz # PATCH-FIX-UPSTREAM https://github.com/txt2tags/txt2tags/commit/49b0808 Patch0: reproducible.patch -Requires: python +BuildRequires: %{python_module setuptools} +BuildRequires: python-rpm-macros BuildArch: noarch -BuildRequires: fdupes -BuildRequires: gettext-devel -BuildRoot: %{_tmppath}/%{name}-%{version}-build +Obsoletes: txt2tags < %{version} +Provides: txt2tags = %{version} +Requires: %{python_module setuptools} + +Requires(post): update-alternatives +Requires(postun): update-alternatives + +%python_subpackages %description Txt2tags is a generic text converter. From a simple text file with minimal @@ -46,49 +52,29 @@ %patch0 -p1 %build -# compile the translated messages for all languages -%define LANGS $(cd po; ls *.po | cut -d. -f1) -for lang in %{LANGS}; do - msgfmt -o po/$lang.mo po/$lang.po -done +%python_build %install -#chmod 744 extras/* - -# executables -install -d %{buildroot}%{_bindir} -install -m 0755 %{name} %{buildroot}%{_bindir} - -# man pages -install -d %{buildroot}/%{_mandir}/man1 -install -m 0644 doc/manpage.man %{buildroot}/%{_mandir}/man1/txt2tags.1 -rm doc/manpage.man - -cd doc -for lang in $(ls -p1 | grep / | cut -d/ -f1); do - if [ ! -z $(ls $lang | grep .man) ]; then - install -d %{buildroot}/%{_mandir}/$lang/man1 - install -m 0644 $lang/$(ls $lang | grep .man) %{buildroot}/%{_mandir}/$lang/man1/txt2tags.1 - rm $lang/$(ls $lang | grep .man) - fi -done -cd .. - -# translations -for lang in %{LANGS}; do - install -d \ - %{buildroot}%{_datadir}/locale/$lang/LC_MESSAGES - install -m 0644 po/$lang.mo \ - %{buildroot}%{_datadir}/locale/$lang/LC_MESSAGES/txt2tags.mo -done - -%files -%defattr(-,root,root,0755) -%doc ChangeLog README COPYING -%doc doc/ extras/ samples/ -%{_bindir}/%{name} -%{_mandir}/man1/txt2tags.1* -#%{_mandir}/*/man1/txt2tags.1* -%{_datadir}/locale/*/LC_MESSAGES/txt2tags.mo +%python_install +%python_clone -a %{buildroot}%{_bindir}/txt2tags +sed -i '1s/env python/python3/' %{buildroot}%{python3_sitelib}/txt2tags.py +chmod +x %{buildroot}%{python3_sitelib}/txt2tags.py +%ifpython2 +sed -i '1s/env python/python2/' %{buildroot}%{python2_sitelib}/txt2tags.py +chmod +x %{buildroot}%{python2_sitelib}/txt2tags.py +%endif + +%post +%python_install_alternative txt2tags + +%postun +%python_uninstall_alternative txt2tags + +%files %python_files +%doc CHANGELOG.md README.md +%license COPYING +%python_alternative %{_bindir}/txt2tags +%{python_sitelib}/txt2tags* +%pycache_only %{python_sitelib}/__pycache__ %changelog ++++++ reproducible.patch ++++++ --- /var/tmp/diff_new_pack.62txu8/_old 2019-12-14 12:23:37.955197027 +0100 +++ /var/tmp/diff_new_pack.62txu8/_new 2019-12-14 12:23:37.955197027 +0100 @@ -1,13 +1,12 @@ -Index: txt2tags-2.6/txt2tags -=================================================================== ---- txt2tags-2.6.orig/txt2tags -+++ txt2tags-2.6/txt2tags -@@ -4110,7 +4110,7 @@ class MacroMaster: - self.config = config or CONF - self.infile = self.config['sourcefile'] - self.outfile = self.config['outfile'] -- self.currdate = time.localtime(time.time()) -+ self.currdate = time.gmtime(int(os.environ.get('SOURCE_DATE_EPOCH', time.time()))) - self.rgx = regex.get('macros') or getRegexes()['macros'] - self.fileinfo = { 'infile': None, 'outfile': None } - self.dft_fmt = MACROS +diff -Naur txt2tags-3.3.orig/txt2tags.py txt2tags-3.3/txt2tags.py +--- txt2tags-3.3.orig/txt2tags.py 2019-11-04 15:13:51.000000000 -0700 ++++ txt2tags-3.3/txt2tags.py 2019-12-07 07:55:13.073011191 -0700 +@@ -3794,7 +3794,7 @@ + self.config = config or CONF + self.infile = self.config["sourcefile"] + self.outfile = self.config["outfile"] +- self.currdate = time.localtime(time.time()) ++ self.currdate = time.gmtime(int(os.environ.get('SOURCE_DATE_EPOCH', time.time()))) + self.rgx = regex.get("macros") or getRegexes()["macros"] + self.fileinfo = {"infile": None, "outfile": None} + self.dft_fmt = MACROS