14
0
Files
python-Delorean/python-Delorean.spec

73 lines
2.3 KiB
RPMSpec
Raw Permalink Normal View History

Accepting request 609887 from devel:languages:python:misc Manipulating datetimes with ease and clarityof older code and makes some small modifications to the `Delorean` API to make it more Pythonic. 1.0.0 includes support for humanizing a `Delorean` object, as well as outputing a localized string representing the `Delorean` object. + This change introduces the following breaking changes: * `Delorean.epoch` is a property, not a function. * `Delorean.midnight` is a property, not a function. * `Delorean.naive` is a property, not a function. * `Delorean.timezone` is a property, not a function. + delorean/dates.py * `is_datetime_naive()` no longer returns True when dt is None * `localize()` works with pytz tzinfo objects * `normalize()` works with pytz tzinfo objects * `Delorean.__init__()` accepts tzinfo objects as input to timezone * `Delorean.timezone()` is now a property * Added suport for humanizing a `Delorean` object * Added support for localizing a `Delorean` object for string output + delorean/interface.py * `parse()` understands `dateutil.tz.tzoffset`, `datetutil.tz.tzlocal` and `dateutil.tz.tzutc` and converts those tzinfo objects into pytz based tzinfo objects. This allows `parse()` to return a `Delorean` object with a `pytz.FixedOffset` timezone attached to it instead of returning a `Delorean` object converted to UTC - Implement single-spec version - Complete spec file rewrite - Require python-python-dateutil. package was renamed - Don't run testsuite, there is none - Add LICENSE.txt and README.rst - Add runtime dependencies - created package (version 0.2.0) OBS-URL: https://build.opensuse.org/request/show/609887 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Delorean?expand=0&rev=1
2018-05-16 17:36:59 +00:00
#
# spec file for package python-Delorean
#
# Copyright (c) 2025 SUSE LLC
Accepting request 609887 from devel:languages:python:misc Manipulating datetimes with ease and clarityof older code and makes some small modifications to the `Delorean` API to make it more Pythonic. 1.0.0 includes support for humanizing a `Delorean` object, as well as outputing a localized string representing the `Delorean` object. + This change introduces the following breaking changes: * `Delorean.epoch` is a property, not a function. * `Delorean.midnight` is a property, not a function. * `Delorean.naive` is a property, not a function. * `Delorean.timezone` is a property, not a function. + delorean/dates.py * `is_datetime_naive()` no longer returns True when dt is None * `localize()` works with pytz tzinfo objects * `normalize()` works with pytz tzinfo objects * `Delorean.__init__()` accepts tzinfo objects as input to timezone * `Delorean.timezone()` is now a property * Added suport for humanizing a `Delorean` object * Added support for localizing a `Delorean` object for string output + delorean/interface.py * `parse()` understands `dateutil.tz.tzoffset`, `datetutil.tz.tzlocal` and `dateutil.tz.tzutc` and converts those tzinfo objects into pytz based tzinfo objects. This allows `parse()` to return a `Delorean` object with a `pytz.FixedOffset` timezone attached to it instead of returning a `Delorean` object converted to UTC - Implement single-spec version - Complete spec file rewrite - Require python-python-dateutil. package was renamed - Don't run testsuite, there is none - Add LICENSE.txt and README.rst - Add runtime dependencies - created package (version 0.2.0) OBS-URL: https://build.opensuse.org/request/show/609887 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Delorean?expand=0&rev=1
2018-05-16 17:36:59 +00:00
#
# 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/
#
Accepting request 609887 from devel:languages:python:misc Manipulating datetimes with ease and clarityof older code and makes some small modifications to the `Delorean` API to make it more Pythonic. 1.0.0 includes support for humanizing a `Delorean` object, as well as outputing a localized string representing the `Delorean` object. + This change introduces the following breaking changes: * `Delorean.epoch` is a property, not a function. * `Delorean.midnight` is a property, not a function. * `Delorean.naive` is a property, not a function. * `Delorean.timezone` is a property, not a function. + delorean/dates.py * `is_datetime_naive()` no longer returns True when dt is None * `localize()` works with pytz tzinfo objects * `normalize()` works with pytz tzinfo objects * `Delorean.__init__()` accepts tzinfo objects as input to timezone * `Delorean.timezone()` is now a property * Added suport for humanizing a `Delorean` object * Added support for localizing a `Delorean` object for string output + delorean/interface.py * `parse()` understands `dateutil.tz.tzoffset`, `datetutil.tz.tzlocal` and `dateutil.tz.tzutc` and converts those tzinfo objects into pytz based tzinfo objects. This allows `parse()` to return a `Delorean` object with a `pytz.FixedOffset` timezone attached to it instead of returning a `Delorean` object converted to UTC - Implement single-spec version - Complete spec file rewrite - Require python-python-dateutil. package was renamed - Don't run testsuite, there is none - Add LICENSE.txt and README.rst - Add runtime dependencies - created package (version 0.2.0) OBS-URL: https://build.opensuse.org/request/show/609887 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Delorean?expand=0&rev=1
2018-05-16 17:36:59 +00:00
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-Delorean
Version: 1.0.0
Release: 0
Summary: Python library for manipulating datetimes
License: MIT
URL: https://github.com/myusuf3/delorean
Accepting request 609887 from devel:languages:python:misc Manipulating datetimes with ease and clarityof older code and makes some small modifications to the `Delorean` API to make it more Pythonic. 1.0.0 includes support for humanizing a `Delorean` object, as well as outputing a localized string representing the `Delorean` object. + This change introduces the following breaking changes: * `Delorean.epoch` is a property, not a function. * `Delorean.midnight` is a property, not a function. * `Delorean.naive` is a property, not a function. * `Delorean.timezone` is a property, not a function. + delorean/dates.py * `is_datetime_naive()` no longer returns True when dt is None * `localize()` works with pytz tzinfo objects * `normalize()` works with pytz tzinfo objects * `Delorean.__init__()` accepts tzinfo objects as input to timezone * `Delorean.timezone()` is now a property * Added suport for humanizing a `Delorean` object * Added support for localizing a `Delorean` object for string output + delorean/interface.py * `parse()` understands `dateutil.tz.tzoffset`, `datetutil.tz.tzlocal` and `dateutil.tz.tzutc` and converts those tzinfo objects into pytz based tzinfo objects. This allows `parse()` to return a `Delorean` object with a `pytz.FixedOffset` timezone attached to it instead of returning a `Delorean` object converted to UTC - Implement single-spec version - Complete spec file rewrite - Require python-python-dateutil. package was renamed - Don't run testsuite, there is none - Add LICENSE.txt and README.rst - Add runtime dependencies - created package (version 0.2.0) OBS-URL: https://build.opensuse.org/request/show/609887 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Delorean?expand=0&rev=1
2018-05-16 17:36:59 +00:00
Source: https://files.pythonhosted.org/packages/source/D/Delorean/Delorean-%{version}.tar.gz
BuildRequires: %{python_module pip}
Accepting request 609887 from devel:languages:python:misc Manipulating datetimes with ease and clarityof older code and makes some small modifications to the `Delorean` API to make it more Pythonic. 1.0.0 includes support for humanizing a `Delorean` object, as well as outputing a localized string representing the `Delorean` object. + This change introduces the following breaking changes: * `Delorean.epoch` is a property, not a function. * `Delorean.midnight` is a property, not a function. * `Delorean.naive` is a property, not a function. * `Delorean.timezone` is a property, not a function. + delorean/dates.py * `is_datetime_naive()` no longer returns True when dt is None * `localize()` works with pytz tzinfo objects * `normalize()` works with pytz tzinfo objects * `Delorean.__init__()` accepts tzinfo objects as input to timezone * `Delorean.timezone()` is now a property * Added suport for humanizing a `Delorean` object * Added support for localizing a `Delorean` object for string output + delorean/interface.py * `parse()` understands `dateutil.tz.tzoffset`, `datetutil.tz.tzlocal` and `dateutil.tz.tzutc` and converts those tzinfo objects into pytz based tzinfo objects. This allows `parse()` to return a `Delorean` object with a `pytz.FixedOffset` timezone attached to it instead of returning a `Delorean` object converted to UTC - Implement single-spec version - Complete spec file rewrite - Require python-python-dateutil. package was renamed - Don't run testsuite, there is none - Add LICENSE.txt and README.rst - Add runtime dependencies - created package (version 0.2.0) OBS-URL: https://build.opensuse.org/request/show/609887 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Delorean?expand=0&rev=1
2018-05-16 17:36:59 +00:00
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-Babel >= 2.1.1
Requires: python-humanize >= 0.5.1
Requires: python-python-dateutil >= 2.4.2
Requires: python-pytz >= 2015.7
Requires: python-tzlocal >= 1.2
BuildArch: noarch
Accepting request 609887 from devel:languages:python:misc Manipulating datetimes with ease and clarityof older code and makes some small modifications to the `Delorean` API to make it more Pythonic. 1.0.0 includes support for humanizing a `Delorean` object, as well as outputing a localized string representing the `Delorean` object. + This change introduces the following breaking changes: * `Delorean.epoch` is a property, not a function. * `Delorean.midnight` is a property, not a function. * `Delorean.naive` is a property, not a function. * `Delorean.timezone` is a property, not a function. + delorean/dates.py * `is_datetime_naive()` no longer returns True when dt is None * `localize()` works with pytz tzinfo objects * `normalize()` works with pytz tzinfo objects * `Delorean.__init__()` accepts tzinfo objects as input to timezone * `Delorean.timezone()` is now a property * Added suport for humanizing a `Delorean` object * Added support for localizing a `Delorean` object for string output + delorean/interface.py * `parse()` understands `dateutil.tz.tzoffset`, `datetutil.tz.tzlocal` and `dateutil.tz.tzutc` and converts those tzinfo objects into pytz based tzinfo objects. This allows `parse()` to return a `Delorean` object with a `pytz.FixedOffset` timezone attached to it instead of returning a `Delorean` object converted to UTC - Implement single-spec version - Complete spec file rewrite - Require python-python-dateutil. package was renamed - Don't run testsuite, there is none - Add LICENSE.txt and README.rst - Add runtime dependencies - created package (version 0.2.0) OBS-URL: https://build.opensuse.org/request/show/609887 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Delorean?expand=0&rev=1
2018-05-16 17:36:59 +00:00
# SECTION test requirements
BuildRequires: %{python_module Babel >= 2.1.1}
BuildRequires: %{python_module humanize >= 0.5.1}
BuildRequires: %{python_module pytest}
Accepting request 609887 from devel:languages:python:misc Manipulating datetimes with ease and clarityof older code and makes some small modifications to the `Delorean` API to make it more Pythonic. 1.0.0 includes support for humanizing a `Delorean` object, as well as outputing a localized string representing the `Delorean` object. + This change introduces the following breaking changes: * `Delorean.epoch` is a property, not a function. * `Delorean.midnight` is a property, not a function. * `Delorean.naive` is a property, not a function. * `Delorean.timezone` is a property, not a function. + delorean/dates.py * `is_datetime_naive()` no longer returns True when dt is None * `localize()` works with pytz tzinfo objects * `normalize()` works with pytz tzinfo objects * `Delorean.__init__()` accepts tzinfo objects as input to timezone * `Delorean.timezone()` is now a property * Added suport for humanizing a `Delorean` object * Added support for localizing a `Delorean` object for string output + delorean/interface.py * `parse()` understands `dateutil.tz.tzoffset`, `datetutil.tz.tzlocal` and `dateutil.tz.tzutc` and converts those tzinfo objects into pytz based tzinfo objects. This allows `parse()` to return a `Delorean` object with a `pytz.FixedOffset` timezone attached to it instead of returning a `Delorean` object converted to UTC - Implement single-spec version - Complete spec file rewrite - Require python-python-dateutil. package was renamed - Don't run testsuite, there is none - Add LICENSE.txt and README.rst - Add runtime dependencies - created package (version 0.2.0) OBS-URL: https://build.opensuse.org/request/show/609887 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Delorean?expand=0&rev=1
2018-05-16 17:36:59 +00:00
BuildRequires: %{python_module python-dateutil >= 2.4.2}
BuildRequires: %{python_module pytz >= 2015.7}
BuildRequires: %{python_module tzlocal >= 1.2}
# /SECTION
%python_subpackages
%description
Delorean is a library for clearing up the inconvenient truths that
arise dealing with datetimes in Python.
Accepting request 609887 from devel:languages:python:misc Manipulating datetimes with ease and clarityof older code and makes some small modifications to the `Delorean` API to make it more Pythonic. 1.0.0 includes support for humanizing a `Delorean` object, as well as outputing a localized string representing the `Delorean` object. + This change introduces the following breaking changes: * `Delorean.epoch` is a property, not a function. * `Delorean.midnight` is a property, not a function. * `Delorean.naive` is a property, not a function. * `Delorean.timezone` is a property, not a function. + delorean/dates.py * `is_datetime_naive()` no longer returns True when dt is None * `localize()` works with pytz tzinfo objects * `normalize()` works with pytz tzinfo objects * `Delorean.__init__()` accepts tzinfo objects as input to timezone * `Delorean.timezone()` is now a property * Added suport for humanizing a `Delorean` object * Added support for localizing a `Delorean` object for string output + delorean/interface.py * `parse()` understands `dateutil.tz.tzoffset`, `datetutil.tz.tzlocal` and `dateutil.tz.tzutc` and converts those tzinfo objects into pytz based tzinfo objects. This allows `parse()` to return a `Delorean` object with a `pytz.FixedOffset` timezone attached to it instead of returning a `Delorean` object converted to UTC - Implement single-spec version - Complete spec file rewrite - Require python-python-dateutil. package was renamed - Don't run testsuite, there is none - Add LICENSE.txt and README.rst - Add runtime dependencies - created package (version 0.2.0) OBS-URL: https://build.opensuse.org/request/show/609887 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Delorean?expand=0&rev=1
2018-05-16 17:36:59 +00:00
%prep
%setup -q -n Delorean-%{version}
%build
%pyproject_wheel
Accepting request 609887 from devel:languages:python:misc Manipulating datetimes with ease and clarityof older code and makes some small modifications to the `Delorean` API to make it more Pythonic. 1.0.0 includes support for humanizing a `Delorean` object, as well as outputing a localized string representing the `Delorean` object. + This change introduces the following breaking changes: * `Delorean.epoch` is a property, not a function. * `Delorean.midnight` is a property, not a function. * `Delorean.naive` is a property, not a function. * `Delorean.timezone` is a property, not a function. + delorean/dates.py * `is_datetime_naive()` no longer returns True when dt is None * `localize()` works with pytz tzinfo objects * `normalize()` works with pytz tzinfo objects * `Delorean.__init__()` accepts tzinfo objects as input to timezone * `Delorean.timezone()` is now a property * Added suport for humanizing a `Delorean` object * Added support for localizing a `Delorean` object for string output + delorean/interface.py * `parse()` understands `dateutil.tz.tzoffset`, `datetutil.tz.tzlocal` and `dateutil.tz.tzutc` and converts those tzinfo objects into pytz based tzinfo objects. This allows `parse()` to return a `Delorean` object with a `pytz.FixedOffset` timezone attached to it instead of returning a `Delorean` object converted to UTC - Implement single-spec version - Complete spec file rewrite - Require python-python-dateutil. package was renamed - Don't run testsuite, there is none - Add LICENSE.txt and README.rst - Add runtime dependencies - created package (version 0.2.0) OBS-URL: https://build.opensuse.org/request/show/609887 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Delorean?expand=0&rev=1
2018-05-16 17:36:59 +00:00
%install
%pyproject_install
Accepting request 609887 from devel:languages:python:misc Manipulating datetimes with ease and clarityof older code and makes some small modifications to the `Delorean` API to make it more Pythonic. 1.0.0 includes support for humanizing a `Delorean` object, as well as outputing a localized string representing the `Delorean` object. + This change introduces the following breaking changes: * `Delorean.epoch` is a property, not a function. * `Delorean.midnight` is a property, not a function. * `Delorean.naive` is a property, not a function. * `Delorean.timezone` is a property, not a function. + delorean/dates.py * `is_datetime_naive()` no longer returns True when dt is None * `localize()` works with pytz tzinfo objects * `normalize()` works with pytz tzinfo objects * `Delorean.__init__()` accepts tzinfo objects as input to timezone * `Delorean.timezone()` is now a property * Added suport for humanizing a `Delorean` object * Added support for localizing a `Delorean` object for string output + delorean/interface.py * `parse()` understands `dateutil.tz.tzoffset`, `datetutil.tz.tzlocal` and `dateutil.tz.tzutc` and converts those tzinfo objects into pytz based tzinfo objects. This allows `parse()` to return a `Delorean` object with a `pytz.FixedOffset` timezone attached to it instead of returning a `Delorean` object converted to UTC - Implement single-spec version - Complete spec file rewrite - Require python-python-dateutil. package was renamed - Don't run testsuite, there is none - Add LICENSE.txt and README.rst - Add runtime dependencies - created package (version 0.2.0) OBS-URL: https://build.opensuse.org/request/show/609887 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Delorean?expand=0&rev=1
2018-05-16 17:36:59 +00:00
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
# https://github.com/myusuf3/delorean/issues/113
sed -i 's:import mock:from unittest import mock:' tests/delorean_tests.py
%pytest tests/delorean_tests.py
Accepting request 609887 from devel:languages:python:misc Manipulating datetimes with ease and clarityof older code and makes some small modifications to the `Delorean` API to make it more Pythonic. 1.0.0 includes support for humanizing a `Delorean` object, as well as outputing a localized string representing the `Delorean` object. + This change introduces the following breaking changes: * `Delorean.epoch` is a property, not a function. * `Delorean.midnight` is a property, not a function. * `Delorean.naive` is a property, not a function. * `Delorean.timezone` is a property, not a function. + delorean/dates.py * `is_datetime_naive()` no longer returns True when dt is None * `localize()` works with pytz tzinfo objects * `normalize()` works with pytz tzinfo objects * `Delorean.__init__()` accepts tzinfo objects as input to timezone * `Delorean.timezone()` is now a property * Added suport for humanizing a `Delorean` object * Added support for localizing a `Delorean` object for string output + delorean/interface.py * `parse()` understands `dateutil.tz.tzoffset`, `datetutil.tz.tzlocal` and `dateutil.tz.tzutc` and converts those tzinfo objects into pytz based tzinfo objects. This allows `parse()` to return a `Delorean` object with a `pytz.FixedOffset` timezone attached to it instead of returning a `Delorean` object converted to UTC - Implement single-spec version - Complete spec file rewrite - Require python-python-dateutil. package was renamed - Don't run testsuite, there is none - Add LICENSE.txt and README.rst - Add runtime dependencies - created package (version 0.2.0) OBS-URL: https://build.opensuse.org/request/show/609887 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Delorean?expand=0&rev=1
2018-05-16 17:36:59 +00:00
%files %{python_files}
%doc CHANGES.rst README.rst
%license LICENSE.txt
%{python_sitelib}/delorean
%{python_sitelib}/[Dd]elorean-%{version}*info
Accepting request 609887 from devel:languages:python:misc Manipulating datetimes with ease and clarityof older code and makes some small modifications to the `Delorean` API to make it more Pythonic. 1.0.0 includes support for humanizing a `Delorean` object, as well as outputing a localized string representing the `Delorean` object. + This change introduces the following breaking changes: * `Delorean.epoch` is a property, not a function. * `Delorean.midnight` is a property, not a function. * `Delorean.naive` is a property, not a function. * `Delorean.timezone` is a property, not a function. + delorean/dates.py * `is_datetime_naive()` no longer returns True when dt is None * `localize()` works with pytz tzinfo objects * `normalize()` works with pytz tzinfo objects * `Delorean.__init__()` accepts tzinfo objects as input to timezone * `Delorean.timezone()` is now a property * Added suport for humanizing a `Delorean` object * Added support for localizing a `Delorean` object for string output + delorean/interface.py * `parse()` understands `dateutil.tz.tzoffset`, `datetutil.tz.tzlocal` and `dateutil.tz.tzutc` and converts those tzinfo objects into pytz based tzinfo objects. This allows `parse()` to return a `Delorean` object with a `pytz.FixedOffset` timezone attached to it instead of returning a `Delorean` object converted to UTC - Implement single-spec version - Complete spec file rewrite - Require python-python-dateutil. package was renamed - Don't run testsuite, there is none - Add LICENSE.txt and README.rst - Add runtime dependencies - created package (version 0.2.0) OBS-URL: https://build.opensuse.org/request/show/609887 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Delorean?expand=0&rev=1
2018-05-16 17:36:59 +00:00
%changelog