I have noticed a rather weird error when installing a package that has Flask in install_requires. Here is the partial output of python setup.py install
Searching for Flask
Best match: Flask RESTful-0.2.12
Downloading https://pypi.python.org/packages/source/F/Flask-RESTful/Flask-RESTful-0.2.12.tar.gz#md5=53049771f4ccb3f40194696bb683db77
Processing Flask-RESTful-0.2.12.tar.gz
Writing /tmp/easy_install-ljhjqn/Flask-RESTful-0.2.12/setup.cfg
Running Flask-RESTful-0.2.12/setup.py -q bdist_egg --dist-dir /tmp/easy_install-ljhjqn/Flask-RESTful-0.2.12/egg-dist-tmp-4d1snj
Flask-RESTful 0.2.12 is already the active version in easy-install.pth
Installed /home/ayrx/.virtualenvs/test/lib/python3.3/site-packages/Flask_RESTful-0.2.12-py3.3.egg
error: Could not find required distribution Flask
Here is the relevant bit of setup.py
install_requires=[
"Flask",
"Flask-RESTful",
"cryptography"
]
Changing "Flask" to "flask" seems to fix things. Not a breaking bug but seems weird nonetheless especially since the packaging docs seem to indicate that "Flask" works fine.
This is a bug in setuptools.
See https://bitbucket.org/pypa/setuptools/issue/196/tests_require-pytest-pytest-cov-breaks.
Closing this because it's an issue in setuptools.
I know this issue is closed but, while it is still actually an issue with setuptools, you should be able to get around this by specifying the Flask version in your setup.py. For example, instead of "Flask" use "Flask>=0.10.1".
@EmergentBehavior This is useful to know, thanks!
Just for future reference, as setuptools moved from Bitbucket to GitHub: https://github.com/pypa/setuptools/issues/498
Also, rather than specifying a version number, changing the order of the dependencies may help too.
Most helpful comment
I know this issue is closed but, while it is still actually an issue with setuptools, you should be able to get around this by specifying the Flask version in your setup.py. For example, instead of
"Flask"use"Flask>=0.10.1".