Skip to content

Commit

Permalink
Move poetry to run_constrained to avoid dep cycle
Browse files Browse the repository at this point in the history
  • Loading branch information
mbargull authored Oct 30, 2022
1 parent f21dc99 commit c284c6f
Showing 1 changed file with 20 additions and 5 deletions.
25 changes: 20 additions & 5 deletions recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,29 @@ requirements:
- poetry-core
run:
- python >=3.7,<4.0
- poetry >=1.2.0b3,<2.0.0
- poetry-core >=1.1.0b3,<2.0.0
- poetry-core >=1.1.0,<2.0.0
# poetry is actually a run dependency. But since that creates a dependency
# cycle, we add it only as a run_constrained for now (until fixed upstream).
# (N.B.: This means this package is unusable if `conda install`ed on its own.)
# refs:
# - https://github.com/python-poetry/poetry/pull/5980
# - https://github.com/conda-forge/poetry-feedstock/issues/70
run_constrained:
- poetry >=1.2.0,<2.0.0

# Skip tests partially due to dependency cycle (see above):
# File/version check instead of import test; ignored poetry dep in pip check
test:
imports:
- poetry_plugin_export
# imports:
# - poetry_plugin_export
commands:
- pip check
- test -f "${SP_DIR}"/poetry_plugin_export/__init__.py
- "pip show poetry-plugin-export | grep -Fx 'Version: {{ version }}'"
# Ensure pip check has non-empty output and recognizes the missing dep.
- "pip check | grep -F 'requires poetry, which is not installed.'"
# Ensure pip check does not output anything else. (This includes
# "No broken requirements found." -- a signal to update the recipe ;)
- "! pip check | grep -Fv 'requires poetry, which is not installed.'"
requires:
- pip

Expand Down

0 comments on commit c284c6f

Please sign in to comment.