-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
AttributeError: Distribution instance has no attribute 'install_requires' #1086
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Yep, sorry... See #1085. |
Obviously, it would be great if there was a test to prevent this kind of error in the future. So I've looked into adding one using pytest-virtualenv. But one of the dependencies that end up getting pulled is ___________________________ ERROR at setup of test_ordering ___________________________$
file setuptools/pkg_resources/tests/test_markers.py, line 6
@mock.patch('platform.python_version', return_value='2.7.10')
def test_ordering(python_version_mock):
E fixture 'python_version_mock' not found
> available fixtures: cache, capfd, capsys, doctest_namespace, monkeypatch, pytest
config, record_xml_property, recwarn, tmpdir, tmpdir_cwd, tmpdir_factory, user_override,
virtualenv, workspace
> use 'pytest --fixtures [testpath]' for help on them.
setuptools/pkg_resources/tests/test_markers.py:6
_________________ ERROR at setup of TestBuildCLib.test_build_libraries _________________
file setuptools/setuptools/tests/test_build_clib.py, line 12
@mock.patch(
'setuptools.command.build_clib.newer_pairwise_group'
)
def test_build_libraries(self, mock_newer):
E fixture 'mock_newer' not found
> available fixtures: cache, capfd, capsys, doctest_namespace, monkeypatch, pytes$
config, record_xml_property, recwarn, tmpdir, tmpdir_cwd, tmpdir_factory, user_override$
virtualenv, workspace
> use 'pytest --fixtures [testpath]' for help on them.
setuptools/setuptools/tests/test_build_clib.py:12 From the log, I can see that switching to See branch for the changes, note that this include porting the recently added clean install test too (tested locally by reverting 1cebea7). |
Oups, I meant to comment on the related PR, sorry! |
Odd, I can't seem to isolate when the downgrade works and when it doesn't.
|
It only happens when downgrading/upgrading from 36.2.0 and from sources. |
OK, I've confirmed that if doing both an install of something from a git source and downgrading setuptools at the same time causes the failure. |
Due to [1] the downgrade of setuptools is not possible, so this patch is updating setuptools to the current version as a stop-gap until a fix is released. [1] pypa/setuptools#1086 Change-Id: I9f529082fd646e58a6365ec7994f2c87fc9dfb8e
Due to [1] the downgrade of setuptools is not possible, so this patch is updating setuptools to the current version as a stop-gap until a fix is released. [1] pypa/setuptools#1086 Change-Id: I9f529082fd646e58a6365ec7994f2c87fc9dfb8e
Project: openstack/requirements 379a1e66a751988fd178aaf1b810b91070abc97f Blacklist setuptools 36.2.0 Setuptools 36.2.0 assumes that install_requires is always defined, which it is not. See the details in [1] and [2], with the ML notification [3]. [1] pypa/setuptools#1086 [2] pypa/setuptools#1085 [3] http://lists.openstack.org/pipermail/openstack-dev/2017-July/119694.html Change-Id: Ia4b665ec30a6aadf90ade523db8082063c0d09c6
Setuptools 36.2.0 assumes that install_requires is always defined, which it is not. See the details in [1] and [2], with the ML notification [3]. [1] pypa/setuptools#1086 [2] pypa/setuptools#1085 [3] http://lists.openstack.org/pipermail/openstack-dev/2017-July/119694.html Change-Id: Ia4b665ec30a6aadf90ade523db8082063c0d09c6
Project: openstack/requirements 379a1e66a751988fd178aaf1b810b91070abc97f Blacklist setuptools 36.2.0 Setuptools 36.2.0 assumes that install_requires is always defined, which it is not. See the details in [1] and [2], with the ML notification [3]. [1] pypa/setuptools#1086 [2] pypa/setuptools#1085 [3] http://lists.openstack.org/pipermail/openstack-dev/2017-July/119694.html Change-Id: Ia4b665ec30a6aadf90ade523db8082063c0d09c6
Setuptools 36.2.0 assumes that install_requires is always defined, which it is not. See the details in [1] and [2], with the ML notification [3]. [1] pypa/setuptools#1086 [2] pypa/setuptools#1085 [3] http://lists.openstack.org/pipermail/openstack-dev/2017-July/119694.html Change-Id: Ia4b665ec30a6aadf90ade523db8082063c0d09c6
Setuptools 36.2.0 assumes that install_requires is always defined, which it is not. See the details in [1] and [2], with the ML notification [3]. [1] pypa/setuptools#1086 [2] pypa/setuptools#1085 [3] http://lists.openstack.org/pipermail/openstack-dev/2017-July/119694.html Change-Id: Ia4b665ec30a6aadf90ade523db8082063c0d09c6
The ceph_client role is now executed inside the nova, cinder, and glance roles as an include_role statement to avoid service restart and library linking race conditions. NOTE: This commit also includes I9f529082fd646e58a6365ec7994f2c87fc9dfb8e, since a circular dependency exists between this patch and the setuptools pin bump due to a bug in setuptools. The following is the commit message of I9f529082fd646e58a6365ec7994f2c87fc9dfb8e in its entirety: "Update setuptools to 36.2.0 Due to [1] the downgrade of setuptools is not possible, so this patch is updating setuptools to the current version as a stop-gap until a fix is released. [1] pypa/setuptools#1086" Also includes a backport of Ia1d02070be2d5ab89e5ef51d96773395516d0c8d, which is a minor var optimization related to this work. Some changes were made to the way cinder_backends_rbd_inuse is generated from the master patch, since master no longer requires the var to be available to the cinder role due to Ie1c549461cfd6799d7535fda673b8c3872afe4af. In ocata that change did not take place yet so we need to keep that var available to cinder. Depends-On: Iea317a20d37ae6f187df3eb7db6290d6b99e6997 Depends-On: I1d24a82f22663150f0db5bbfcb4d957d600db5c2 Depends-On: I620552d7de367d89a99d1622a4e0c89e78336e86 Change-Id: I6a76e63881150677352520ce9658f1cf6b7e5456 (cherry picked from commit be1419d)
Really looking forward to getting our builds running again (e.g. https://travis-ci.org/NVIDIA/DIGITS/jobs/254616137). Since setuptools is such a critical piece of the Python infrastructure, I assume I can wait a day or two for a critical fix to be pushed out, rather than hacking our infrastructure to work around the issue for the long term. |
Caused by us requiring an older setuptools, together with a setuptools downgrading issue: pypa/setuptools#1086 In this change we actually upgrade *all* dependencies, but that seems to work out well in my tests so let's just do it (tm).
Works around pypa/setuptools#1086 and pypa/setuptools#1101
The python3.6 archive from travis contains setuptools 36.2.0 which breaks if additional packages are installed when setuptools is upgraded. Work around the issue by explicitly upgrading setuptools before installing our packages. Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de>
travis.yml: work around pypa/setuptools#1086
Is this issue supposed to be fixed? Still experiencing the error when building on Travis CI. Or is there something wrong on their side? |
Yes, it should be fixed. It's possible you've managed to somehow pick up the issue from an old build or you have the same error but with a different cause. Probably better to file a new issue unless you can ascertain that your symptoms have the same cause as those identified and fixed herein. |
I still experience the same issue as @mimischi described. |
@mimischi, @marius92mc: there's no way to know if you're experiencing the same issue with the limited information you provide. As noted above, the problem should only occur when a package is built from source and setuptools is also downgraded/upgraded from 36.2.0 as part of the same |
For what it's worth, I also just encountered the same issue on Travis-CI. I had specified
|
This checks out. A minimum reproducible test case had a requirements.txt file of just setuptools==36.5.0 and pylint==1.7.2. Looks like pylint is compiling wrapt in the installation, which is sufficient to trigger this bug. Added a new line to my |
To work around pypa/setuptools#1086.
This is exactly the situation I'm encountering. I'm trying to install https://github.com/Nanoseb/ncTelegram on Fedora following its instructions on the readme. When I call:
This is what I get:
Sorry, I'm complete zero in python world. What will be the command line to run to achieve that? UPD. Ok, a quick RTFM gave the answer:
Hope this helps anyone in the same situation. |
Due to [1] we should blacklist setuptools 36.2.0 [1] pypa/setuptools#1086 Change-Id: Ia4b665ec30a6aadf90ade523db8082063c0d09c6
Setuptools 36.2.0 assumes that install_requires is always defined, which it is not. See the details in [1] and [2]. [1] pypa/setuptools#1086 [2] pypa/setuptools#1085 Change-Id: Ia4b665ec30a6aadf90ade523db8082063c0d09c6
When downgrading setuptools 36.2.0 to 36.1.1 I get the above error. Here's a log output:
The text was updated successfully, but these errors were encountered: