# Optional PyPI dependencies in CI jobs

**URL:** <https://discuss.python.org/t/optional-pypi-dependencies-in-ci-jobs/4111>\
**Category:** Core Workflow\
**Created:** [May 6, 2020, 1:33pm UTC](https://discuss.python.org/t/optional-pypi-dependencies-in-ci-jobs/4111 "2020-05-06T13:33:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![pganssle](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/pganssle/32/245_2.png) [@pganssle](https://discuss.python.org/u/pganssle)\
**Post date:** [May 6, 2020, 1:33pm UTC](https://discuss.python.org/t/optional-pypi-dependencies-in-ci-jobs/4111/1 "2020-05-06T13:33:35Z")

</div>

I am in the process of migrating the [PEP 615 reference implementation](https://github.com/pganssle/zoneinfo) over to [CPython](https://github.com/python/cpython/pull/19909). One issue is that because `zoneinfo` has an optional PyPI dependency on the `tzdata` package, in order to get full test coverage, we need to pull in `tzdata` for at least some of the tests. The `tzdata`-specific tests are skipped automatically if the package is missing, so local development shouldn’t require `tzdata` (unless you’re working on something that requires it and want to run those tests), but we should definitely test against `tzdata` in CI.

Where is the best place for me to declare this dependency so that it will get pulled in wherever possible? I am not seeing any centralized mechanism for this – it seems like it’s mostly done ad-hoc in the various CI providers. If there’s no place for it already, should I add a `requirements-test.txt` or something somewhere?

---

<div class="post-metadata">

**Author:** ![brettcannon](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/brettcannon/32/34895_2.png) [@brettcannon](https://discuss.python.org/u/brettcannon)\
**Post date:** [May 6, 2020, 10:02pm UTC](https://discuss.python.org/t/optional-pypi-dependencies-in-ci-jobs/4111/2 "2020-05-06T22:02:16Z")

</div>

This is new territory, so there’s no standard. 🙂 Probably some requirements file would work and then update the CI jobs and the Buildbot configs to use it. Also means wanting a buildbot to test without the dependencies installed to make sure things work.

---

<div class="post-metadata">

**Author:** ![pganssle](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/pganssle/32/245_2.png) [@pganssle](https://discuss.python.org/u/pganssle)\
**Post date:** [May 9, 2020, 5:03pm UTC](https://discuss.python.org/t/optional-pypi-dependencies-in-ci-jobs/4111/3 "2020-05-09T17:03:24Z")

</div>

Thanks Brett.

I ended up going with Misc/requirements-test.txt`, at least for now, and I added it to the [Travis](https://github.com/python/cpython/pull/19909/commits/93c03aa965b55a978c1b7b0c00f018d43c833ad8) and [Github Actions](https://github.com/python/cpython/pull/19909/commits/ea7afeaa8181cb44f24cb97f0fb70c1656e596cd) jobs. I wasn’t able to figure out how to get it working with Azure Pipelines and I haven’t tried messing with the buildbot configuration yet, but this seems like a good start.

Seems relatively painless.
