diff --git a/python-dfdatetime.changes b/python-dfdatetime.changes index 10e9385..217728f 100644 --- a/python-dfdatetime.changes +++ b/python-dfdatetime.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Jan 17 10:12:11 UTC 2020 - Matej Cepl + +- Convert to python3 only + ------------------------------------------------------------------- Mon Aug 19 19:37:10 UTC 2019 - Greg Freemyer @@ -34,3 +39,4 @@ Thu Jul 28 20:57:06 UTC 2016 - Greg.Freemyer@gmail.com - initial package v0~20160323 + diff --git a/python-dfdatetime.spec b/python-dfdatetime.spec index ec39dec..dc0f95b 100644 --- a/python-dfdatetime.spec +++ b/python-dfdatetime.spec @@ -1,7 +1,7 @@ # # spec file for package python-dfdatetime # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,45 +16,53 @@ # -%define timestamp 20190517 %{?!python_module:%define python_module() python-%{**} python3-%{**}} +%define timestamp 20190517 +%define skip_python2 1 +%define modname dfdatetime Name: python-dfdatetime Version: 0~%{timestamp} Release: 0 -Summary: Digital Forensics Date and Time (dfDateTime) +Summary: Digital Forensics date and time (dfDateTime) License: Apache-2.0 Group: Development/Languages/Python -Url: https://github.com/log2timeline/dfdatetime -Source: https://github.com/log2timeline/dfdatetime/releases/download/%{timestamp}/dfdatetime-%{timestamp}.tar.gz +URL: https://github.com/log2timeline/dfdatetime +Source: https://files.pythonhosted.org/packages/source/d/%{modname}/%{modname}-%{timestamp}.tar.gz BuildRequires: %{python_module devel} +BuildRequires: %{python_module mock >= 2.0.0} +BuildRequires: %{python_module pbr >= 4.2.0} BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module six >= 1.1.0} BuildRequires: fdupes BuildRequires: python-rpm-macros -#Python-mock is used for internal self-test at a minimum -Requires: python-mock -BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildArch: noarch %python_subpackages %description -dfDateTime, or Digital Forensics date and time, provides date and time objects to preserve accuracy and precision. +dfDateTime, or Digital Forensics date and time, provides date and time +objects to preserve accuracy and precision. %prep -%setup -q -n dfdatetime-%{timestamp} +%setup -q -n %{modname}-%{timestamp} %build %python_build %install %python_install -# these doc files are installed to the wrong place -rm -rf %{buildroot}/usr/share/doc/dfdatetime -%fdupes %{buildroot}/%{_prefix} +# setup.py install helpfully installs files where it shouldn’t +rm -rfv %{buildroot}%{_datadir}/doc/%{modname} + +%python_expand %fdupes %{buildroot}%{$python_sitelib} + +%check +# Using pytest leads to some horribly-looking crashes, not sure what's +# going on. +%python_exec ./run_tests.py %files %{python_files} -%defattr(-,root,root) %license LICENSE %doc ACKNOWLEDGEMENTS AUTHORS README -%{python_sitelib}/dfdatetime* +%{python_sitelib}/* %changelog