Skip to content

Fix Python 2 setup extras requirement loading#120

Open
lazydreamy wants to merge 1 commit into
pjkundert:masterfrom
lazydreamy:pr/fix-py2-setup-extras
Open

Fix Python 2 setup extras requirement loading#120
lazydreamy wants to merge 1 commit into
pjkundert:masterfrom
lazydreamy:pr/fix-py2-setup-extras

Conversation

@lazydreamy

Copy link
Copy Markdown

Summary

Make setup.py parse requirement extras without Python 3-only f-string syntax.

The package still supports Python 2, but setup.py used an f-string while building extras_require. That makes setup.py fail to parse under Python 2 before installation metadata can be inspected.

Changes

  • Replace the f-string expression in setup.py with str.format().
  • Keep the generated extras keys unchanged.

Testing

  • py -2.7 setup.py --version
  • python setup.py --version

Avoid an f-string while building extras_require so setup.py remains parseable on Python 2.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant