pypa / pypa/setuptools

setup confuses packages depending on order in install_requires list

Open
#498 10 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug help wanted major Needs Investigation
Dominant language
Python
Stars
2.9k
Forks
1.4k
Avg merge
1d 1h
Merged PRs (30d)
1

Description

Originally reported by: ikseek (Bitbucket: ikseek, GitHub: ikseek)


Try this simple reproducer with python3.5.

#!python

from setuptools import setup, find_packages

INSTALL_REQUIRES = [
    'Flask',
    'flask-mongoengine',
]

setup(
    include_package_data=True,
    author='Author',
    author_email='author@email.com',
    url='https://url.com',
    install_requires=INSTALL_REQUIRES,
    license='PROPRIETARY',
    long_description='Long description',
    name='pip-requirements-order-bug-reproducer',
    packages=find_packages(),
    version='1'
)

Observed behavior:
Running "python3 setup.py develop" fails to install Flask, because it tries to install flask-mongoengine second time!

Expected behavior:
Running "python3 setup.py develop" should install both Flask and flask-mongoengine

Note:
Swapping entries in INSTALL_REQUIRES list hides the issue.


Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the provided setup.py reproducer and run "python3 setup.py develop" using the two install_requires orderings. Trace how setup.py develop processes install_requires and why flask-mongoengine triggers a second Flask installation. Done means both list orders install Flask and flask-mongoengine successfully without a duplicate-install failure.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.