1

I have some requirements listed using git urls in requirements.txt and I wan to make them extras (optional requirements).

Example:

git+https://git.example.com/foo/#egg=foo

usually moving a package from requirements.txt to setup.cfg would work:

[extras]
super =
    foo
    bar

Bug when I try to put a git url there pip chockes.

What is the correct syntax for using git url in extras?

Traceback (most recent call last):
      File "/Users/ssbarnea/.pyenv/versions/2.7.15/lib/python2.7/site-packages/pbr/core.py", line 96, in pbr
        attrs = util.cfg_to_args(path, dist.script_args)
      File "/Users/ssbarnea/.pyenv/versions/2.7.15/lib/python2.7/site-packages/pbr/util.py", line 261, in cfg_to_args
        kwargs = setup_cfg_to_setup_kwargs(config, script_args)
      File "/Users/ssbarnea/.pyenv/versions/2.7.15/lib/python2.7/site-packages/pbr/util.py", line 455, in setup_cfg_to_setup_kwargs
        if pkg_resources.evaluate_marker('(%s)' % env_marker):
      File "/Users/ssbarnea/.pyenv/versions/2.7.15/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1372, in evaluate_marker
        raise SyntaxError(e)
    SyntaxError: Invalid marker: '(//git.openstack.org/openstack/browbeat/)', parse error at '//git.op'
sorin
  • 161,544
  • 178
  • 535
  • 806
  • This post might help: https://stackoverflow.com/questions/20101834/pip-install-from-git-repo-branch – Dascienz Oct 26 '18 at 13:49
  • This is not an answer, but it looks like there's a clash with `pbr`'s env marker syntax (`pkgname:envmarker`). It just splits each string by first colon when processing extras, so the URLs are turned into dependencies `http` or `https`, the `//url` being treated as an env marker. – hoefling Oct 27 '18 at 00:19

0 Answers0