You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/dev-python/pytz/files/pytz-2020.5-system-zoneinfo...

34 lines
1.3 KiB

diff --git a/pytz/__init__.py b/pytz/__init__.py
index a1f75b6..f2a2330 100644
--- a/pytz/__init__.py
+++ b/pytz/__init__.py
@@ -92,8 +92,7 @@ def open_resource(name):
if zoneinfo_dir is not None:
filename = os.path.join(zoneinfo_dir, *name_parts)
else:
- filename = os.path.join(os.path.dirname(__file__),
- 'zoneinfo', *name_parts)
+ filename = os.path.join('/usr/share/zoneinfo', *name_parts)
if not os.path.exists(filename):
# http://bugs.launchpad.net/bugs/383171 - we avoid using this
# unless absolutely necessary to help when a broken version of
diff --git a/setup.py b/setup.py
index e31ff2b..ba6926b 100644
--- a/setup.py
+++ b/setup.py
@@ -15,14 +15,8 @@ me = 'Stuart Bishop'
memail = 'stuart@stuartbishop.net'
packages = ['pytz']
resources = ['zone.tab', 'locales/pytz.pot']
-for dirpath, dirnames, filenames in os.walk(os.path.join('pytz', 'zoneinfo')):
- # remove the 'pytz' part of the path
- basepath = dirpath.split(os.path.sep, 1)[1]
- resources.extend([os.path.join(basepath, filename) for filename in filenames])
package_data = {'pytz': resources}
-assert len(resources) > 10, 'zoneinfo files not found!'
-
setup(
name='pytz',
version=pytz.VERSION,