From 91ebf2a8fc1fce41f4ddd140e5e6d75b0f2c5ea1 Mon Sep 17 00:00:00 2001 From: rdobuilder Date: Nov 18 2022 15:31:05 +0000 Subject: Update to 0.1.0.post0 Related-to: https://review.rdoproject.org/r/q/If8207e5dac51a2a40693ff88f5ad9b2f23e70258 --- diff --git a/.python-pytz-deprecation-shim.metadata b/.python-pytz-deprecation-shim.metadata new file mode 100644 index 0000000..69a5ecc --- /dev/null +++ b/.python-pytz-deprecation-shim.metadata @@ -0,0 +1 @@ +d7900c309c26d48f6499fbda955eb80bd0b437dd SOURCES/pytz_deprecation_shim-0.1.0.post0.tar.gz diff --git a/SOURCES/.gitignore b/SOURCES/.gitignore new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/SOURCES/.gitignore diff --git a/SPECS/python-pytz-deprecation-shim.spec b/SPECS/python-pytz-deprecation-shim.spec new file mode 100644 index 0000000..78c5a2d --- /dev/null +++ b/SPECS/python-pytz-deprecation-shim.spec @@ -0,0 +1,94 @@ +## START: Set by rpmautospec +## (rpmautospec version 0.3.0) +%define autorelease(e:s:pb:n) %{?-p:0.}%{lua: + release_number = 1; + base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); + print(release_number + base_release_number - 1); +}%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} +## END: Set by rpmautospec + +Name: python-pytz-deprecation-shim +Version: 0.1.0.post0 +Release: %autorelease +Summary: Shims to help you safely remove pytz + +License: Apache-2.0 +URL: https://github.com/pganssle/pytz-deprecation-shim +Source0: %{pypi_source pytz_deprecation_shim} + +BuildArch: noarch + +BuildRequires: python3-devel +BuildRequires: pyproject-rpm-macros +# Depend on the system tzdata RPM, not the PyPI “tzdata” fallback package +BuildRequires: tzdata + +%global common_description %{expand: +pytz has served the Python community well for many years, but it is no longer +the best option for providing time zones. pytz has a non-standard interface +that is very easy to misuse; this interface was necessary when pytz was +created, because datetime had no way to represent ambiguous datetimes, but this +was solved in Python 3.6, which added a fold attribute to datetimes in PEP 495. +With the addition of the zoneinfo module in Python 3.9 (PEP 615), there has +never been a better time to migrate away from pytz. + +However, since pytz time zones are used very differently from a standard +tzinfo, and many libraries have built pytz zones into their standard time zone +interface (and thus may have users relying on the existence of the localize and +normalize methods); this library provides shim classes that are compatible with +both PEP 495 and pytz’s interface, to make it easier for libraries to deprecate +pytz.} + +%description %{common_description} + + +%package -n python3-pytz-deprecation-shim +Summary: %{summary} + +# Depend on the system tzdata RPM, not the PyPI “tzdata” fallback package +Requires: tzdata + +%description -n python3-pytz-deprecation-shim %{common_description} + + +%prep +%autosetup -n pytz_deprecation_shim-%{version} + +sed -i 's/pytest-randomly//g' tox.ini + +# https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_linters +sed -r -i -e '/\bpytest-cov\b/d' -e 's/--cov=[^[:blank:]}]+//g' tox.ini + +# Depend on the system tzdata RPM, not the PyPI “tzdata” fallback package +sed -r -i -e '/\btzdata\b/d' setup.cfg + + +%generate_buildrequires +%pyproject_buildrequires -t + + +%build +%pyproject_wheel + + +%install +%pyproject_install +%pyproject_save_files pytz_deprecation_shim + + +%check +%tox + + +%files -n python3-pytz-deprecation-shim -f %{pyproject_files} +# pyproject-rpm-macros takes care of the LICENSE file in dist-info, but not +# licenses/LICENSE_APACHE; we manually include both files in %%_licensedir +%license LICENSE +%license licenses/LICENSE_APACHE +%doc CHANGELOG.rst +%doc README.rst + + +%changelog +* Sat Oct 29 2022 Benjamin A. Beasley 0.1.0.post0-1 +- Initial package