diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 04ec87c..2bbcf43 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -9,6 +9,7 @@ source: sha256: aec25c98c5bf77a9ce5c1d2e9bf0564b4129339c8a122f42d6c55d8bdcef42d6 patches: - patches/0001-point-to-our-own-libraries-includes.patch + - patches/0002-remove-TZDIR-work-arounds-that-aren-t-needed-for-orc.patch build: number: 0 @@ -32,15 +33,13 @@ requirements: run: - python - backports.zoneinfo # [py<39] - - python-tzdata # [win] + - tzdata test: requires: - pytest imports: - - pytest - pyorc - - tzdata # [win] source_files: - tests/ commands: diff --git a/recipe/patches/0001-point-to-our-own-libraries-includes.patch b/recipe/patches/0001-point-to-our-own-libraries-includes.patch index aeaa46d..78afd12 100644 --- a/recipe/patches/0001-point-to-our-own-libraries-includes.patch +++ b/recipe/patches/0001-point-to-our-own-libraries-includes.patch @@ -1,7 +1,7 @@ From dd0833a651f238114c7b744bd190036d64f01a23 Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Tue, 21 May 2024 17:27:27 +1100 -Subject: [PATCH] point to our own libraries/includes +Subject: [PATCH 1/2] point to our own libraries/includes --- setup.py | 19 ++++--------------- diff --git a/recipe/patches/0002-remove-TZDIR-work-arounds-that-aren-t-needed-for-orc.patch b/recipe/patches/0002-remove-TZDIR-work-arounds-that-aren-t-needed-for-orc.patch new file mode 100644 index 0000000..9b9a14d --- /dev/null +++ b/recipe/patches/0002-remove-TZDIR-work-arounds-that-aren-t-needed-for-orc.patch @@ -0,0 +1,42 @@ +From 3175fd8250a35a85e9e5e64b1980806d269c4e32 Mon Sep 17 00:00:00 2001 +From: "H. Vetinari" +Date: Tue, 21 May 2024 21:38:05 +1100 +Subject: [PATCH 2/2] remove TZDIR work-arounds that aren't needed for + orc>=2.0.1 + +--- + setup.py | 1 - + src/pyorc/__init__.py | 8 -------- + 2 files changed, 9 deletions(-) + +diff --git a/setup.py b/setup.py +index 2d147b2..14e6287 100644 +--- a/setup.py ++++ b/setup.py +@@ -263,7 +263,6 @@ setup( + ], + python_requires=">=3.6", + install_requires=[ +- 'tzdata >= 2020.5 ; sys_platform == "win32"', + 'backports.zoneinfo >= 0.2.1 ; python_version < "3.9"', + ], + ) +diff --git a/src/pyorc/__init__.py b/src/pyorc/__init__.py +index 9be7043..447481c 100644 +--- a/src/pyorc/__init__.py ++++ b/src/pyorc/__init__.py +@@ -2,14 +2,6 @@ import os + import sys + from typing import NamedTuple + +-if sys.platform.startswith("win32") and "TZDIR" not in os.environ: +- # Windows does not come with a standard IANA time zone database, +- # but the ORC lib requires it. Set the TZDIR environment variable +- # to the tzdata module's data directory. +- import tzdata +- +- os.environ["TZDIR"] = os.path.join(os.path.dirname(tzdata.__file__), "zoneinfo") +- + from pyorc._pyorc import _orc_version + + from .enums import *