Skip to content

Cannot specify dependency_links in setup.py when find_links is defined in setup.cfg #1375

@Jawshua

Description

@Jawshua

I have a package which relies on some packages within our private repo.

Within setup.cfg we have this:

[easy_install]
find_links = https://repo.xxx/blah

This works fine on its own. I tried adding another package that I need to install from source using dependency_links (using the method described at http://python-packaging.readthedocs.io/en/latest/dependencies.html) and it results in this error when running setup.py install:

Traceback (most recent call last):
  File "setup.py", line 72, in <module>
    'pop-dynamodb-checker=phpop.runner.dynamochecker:main'
  File "/Users/josh/.env/test/lib/python3.6/site-packages/setuptools/__init__.py", line 128, in setup
    _install_setup_requires(attrs)
  File "/Users/josh/.env/test/lib/python3.6/site-packages/setuptools/__init__.py", line 123, in _install_setup_requires
    dist.fetch_build_eggs(dist.setup_requires)
  File "/Users/josh/.env/test/lib/python3.6/site-packages/setuptools/dist.py", line 504, in fetch_build_eggs
    replace_conflicting=True,
  File "/Users/josh/.env/test/lib/python3.6/site-packages/pkg_resources/__init__.py", line 774, in resolve
    replace_conflicting=replace_conflicting
  File "/Users/josh/.env/test/lib/python3.6/site-packages/pkg_resources/__init__.py", line 1057, in best_match
    return self.obtain(req, installer)
  File "/Users/josh/.env/test/lib/python3.6/site-packages/pkg_resources/__init__.py", line 1069, in obtain
    return installer(requirement)
  File "/Users/josh/.env/test/lib/python3.6/site-packages/setuptools/dist.py", line 561, in fetch_build_egg
    links = opts['find_links'][1] + links
TypeError: must be str, not list

find_links is a string, so the error makes sense, and changing the line in question to this works:

                find_links = opts['find_links'][1]
                if isinstance(find_links, six.string_types):
                    find_links = find_links.split()

                links = find_links + links

but I'm not sure if it could be causing issues in other untested parts.

Cheers
Josh

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions