Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change to upstream tzdata #1

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions .azure-pipelines/azure-pipelines-linux.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 4 additions & 6 deletions .ci_support/linux_.yaml → .ci_support/linux_64_.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
c_compiler:
- gcc
c_compiler_version:
- '7'
channel_sources:
- conda-forge,defaults
channel_targets:
- conda-forge main
docker_image:
- condaforge/linux-anvil-comp7
pin_run_as_build:
python:
min_pin: x.x
max_pin: x.x
python:
- 3.6.* *_cpython
2 changes: 1 addition & 1 deletion .github/CODEOWNERS

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions .scripts/build_steps.sh

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 7 additions & 1 deletion .scripts/run_docker_build.sh

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion LICENSE.txt

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 10 additions & 8 deletions README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions recipe/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
make -e \
DESTDIR=./build \
USRDIR='' \
POSIXRULES='' \
install

mkdir -p "${PREFIX}/share"
mv ./build/share/zoneinfo "${PREFIX}/share/"
66 changes: 48 additions & 18 deletions recipe/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,41 +1,71 @@
{% set version = "2020.1" %}
{% set version = "2020a" %}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Although conda also uses Python-like versioning, tzdata uses consistent versions for which the non-numeric suffix is always lexicographical increasing.
Meaning: It's fine for us to use the upstream version scheme.


package:
name: tzdata
version: {{ version }}

source:
url: https://pypi.io/packages/source/t/tzdata/tzdata-{{ version }}.tar.gz
sha256: 5e0a01117b3dfc9be27ef727e8f39e355e29bbc788bcd8fe2110871df5f9a935
- url: https://data.iana.org/time-zones/releases/tzdata{{ version }}.tar.gz
sha256: 547161eca24d344e0b5f96aff6a76b454da295dc14ed4ca50c2355043fb899a2
- url: https://data.iana.org/time-zones/releases/tzcode{{ version }}.tar.gz
sha256: 7d2af7120ee03df71fbca24031ccaf42404752e639196fe93c79a41b38a6d669

build:
number: 0
noarch: python
script: "{{ PYTHON }} -m pip install . -vv"
noarch: generic
# The recipe assumes building on Linux, but we don't have "skip" active since
# the linter will complain with "`noarch` packages can't have selectors".
# skip: True # [not linux]
ignore_run_exports:
- libgcc-ng

requirements:
build:
- {{ compiler('c') }}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This uses a compiler because it builds its own tools. We add the ignore_run_exports above to get a noarch: generic package without any other dependencies.

- make
host:
- python
- pip
run:
- python

test:
imports:
- tzdata
commands:
- test -f "${PREFIX}/share/zoneinfo/leapseconds"
- test -f "${PREFIX}/share/zoneinfo/iso3166.tab"
- test -f "${PREFIX}/share/zoneinfo/zone1970.tab"
- test -f "${PREFIX}/share/zoneinfo/zone.tab"
- test -f "${PREFIX}/share/zoneinfo/tzdata.zi"
# Make sure we only package zoneinfo and nothing else.
- |
dirs="$(
find "${PREFIX}" -mindepth 1 -maxdepth 2 \
\! -path "${PREFIX}/share" \! -path "${PREFIX}/conda-meta*"
)"
test "${dirs}" = "${PREFIX}/share/zoneinfo"
# Make sure we only package timezone information files.
- |
heads="$(
find "${PREFIX}/share/zoneinfo" -type f \
\! -name \*.zi \! -name \*.tab \! -name leapseconds \
-exec head -c4 {} \; -printf \\n \
| uniq
)"
test "${heads}" = TZif

about:
home: https://github.com/python/tzdata
license: Apache-2.0
home: https://www.iana.org/time-zones
dev_url: https://github.com/eggert/tz
doc_url: https://data.iana.org/time-zones/tz-link.html
license: Public Domain
license_file: LICENSE
summary: Provider of IANA time zone data
summary: The Time Zone Database (called tz, tzdb or zoneinfo)

description: |
This is a Python package containing zic-compiled binaries for the IANA time zone database.
It is intended to be a fallback for systems that do not have system time zone data installed (or don't have it installed in a standard location),
as a part of PEP 615.

The Time Zone Database (called tz, tzdb or zoneinfo) contains code and
data that represent the history of local time for many representative
locations around the globe. It is updated periodically to reflect
changes made by political bodies to time zone boundaries, UTC offsets,
and daylight-saving rules.

extra:
recipe-maintainers:
- ocefpaf
- pganssle
- mbargull