Skip to content
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

TypeError in install_wrapper_scripts #464

Closed
ghost opened this issue Nov 24, 2015 · 21 comments
Closed

TypeError in install_wrapper_scripts #464

ghost opened this issue Nov 24, 2015 · 21 comments

Comments

@ghost
Copy link

@ghost ghost commented Nov 24, 2015

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


Just updated to setuptools 18.6 from 18.5 and installing from an editable git repo seems to fail.

Steps to reproduce:

#!shell

$ pip list | grep setuptools
setuptools (18.5)
$ pip install -e git+https://github.com/jcugat/django-crispy-forms.git@1.4.0-django1.9#egg=django_crispy_forms
Obtaining django-crispy-forms from git+https://github.com/jcugat/django-crispy-forms.git@1.4.0-django1.9#egg=django_crispy_forms
  Updating /usr/local/opt/pyenv/versions/virtualtest/src/django-crispy-forms clone (to 1.4.0-django1.9)
Installing collected packages: django-crispy-forms
  Running setup.py develop for django-crispy-forms
Successfully installed django-crispy-forms
$ pip uninstall django-crispy-forms
Uninstalling django-crispy-forms-1.4.0:
  /usr/local/opt/pyenv/versions/virtualtest/lib/python2.7/site-packages/django-crispy-forms.egg-link
Proceed (y/n)? y
  Successfully uninstalled django-crispy-forms-1.4.0
$ pip install setuptools==18.6
Collecting setuptools==18.6
  Using cached setuptools-18.6-py2.py3-none-any.whl
Installing collected packages: setuptools
  Found existing installation: setuptools 18.5
    Uninstalling setuptools-18.5:
      Successfully uninstalled setuptools-18.5
Successfully installed setuptools-18.6
$ pip list | grep setuptools
setuptools (18.6)
$ pip install -e git+https://github.com/jcugat/django-crispy-forms.git@1.4.0-django1.9#egg=django_crispy_forms
Obtaining django-crispy-forms from git+https://github.com/jcugat/django-crispy-forms.git@1.4.0-django1.9#egg=django_crispy_forms
  Updating /usr/local/opt/pyenv/versions/virtualtest/src/django-crispy-forms clone (to 1.4.0-django1.9)
Installing collected packages: django-crispy-forms
  Running setup.py develop for django-crispy-forms
    Complete output from command /usr/local/opt/pyenv/versions/virtualtest/bin/python2.7 -c "import setuptools, tokenize; __file__='/usr/local/opt/pyenv/versions/virtualtest/src/django-crispy-forms/setup.py'; exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" develop --no-deps:
    running develop
    running egg_info
    writing requirements to django_crispy_forms.egg-info/requires.txt
    writing django_crispy_forms.egg-info/PKG-INFO
    writing top-level names to django_crispy_forms.egg-info/top_level.txt
    writing dependency_links to django_crispy_forms.egg-info/dependency_links.txt
    warning: manifest_maker: standard file '-c' not found

    reading manifest file 'django_crispy_forms.egg-info/SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    warning: no files found matching '*' under directory 'crispy_forms/static'
    writing manifest file 'django_crispy_forms.egg-info/SOURCES.txt'
    running build_ext
    Creating /usr/local/var/lib/pyenv/versions/virtualtest/lib/python2.7/site-packages/django-crispy-forms.egg-link (link to .)
    Adding django-crispy-forms 1.4.0 to easy-install.pth file
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/usr/local/opt/pyenv/versions/virtualtest/src/django-crispy-forms/setup.py", line 39, in <module>
        zip_safe=False,
      File "/usr/local/opt/pyenv/versions/2.7.10/lib/python2.7/distutils/core.py", line 151, in setup
        dist.run_commands()
      File "/usr/local/opt/pyenv/versions/2.7.10/lib/python2.7/distutils/dist.py", line 953, in run_commands
        self.run_command(cmd)
      File "/usr/local/opt/pyenv/versions/2.7.10/lib/python2.7/distutils/dist.py", line 972, in run_command
        cmd_obj.run()
      File "/usr/local/opt/pyenv/versions/virtualtest/lib/python2.7/site-packages/setuptools/command/develop.py", line 32, in run
        self.install_for_development()
      File "/usr/local/opt/pyenv/versions/virtualtest/lib/python2.7/site-packages/setuptools/command/develop.py", line 132, in install_for_development
        self.process_distribution(None, self.dist, not self.no_deps)
      File "/usr/local/opt/pyenv/versions/virtualtest/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 695, in process_distribution
        self.install_egg_scripts(dist)
      File "/usr/local/opt/pyenv/versions/virtualtest/lib/python2.7/site-packages/setuptools/command/develop.py", line 160, in install_egg_scripts
        self.install_wrapper_scripts(dist)
      File "/usr/local/opt/pyenv/versions/virtualtest/lib/python2.7/site-packages/setuptools/command/develop.py", line 173, in install_wrapper_scripts
        return super(develop, self).install_wrapper_scripts(dist)
    TypeError: must be type, not classobj

    ----------------------------------------
Command "/usr/local/opt/pyenv/versions/virtualtest/bin/python2.7 -c "import setuptools, tokenize; __file__='/usr/local/opt/pyenv/versions/virtualtest/src/django-crispy-forms/setup.py'; exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" develop --no-deps" failed with error code 1 in /usr/local/opt/pyenv/versions/virtualtest/src/django-crispy-forms

@ghost
Copy link
Author

@ghost ghost commented Nov 24, 2015

Original comment by jonathan_mccall (Bitbucket: jonathan_mccall, GitHub: Unknown):


I am also experiencing this problem installing an editable git repo.

@ghost
Copy link
Author

@ghost ghost commented Nov 24, 2015

Original comment by foobacca (Bitbucket: foobacca, GitHub: foobacca):


I am also experiencing this since the 18.6 update - in my case:

pip install -e git+https://github.com/ludwiktrammer/django-tagging-autocomplete.git@9e1b6603972757df9525b49a79dc5789c440e02c#egg=django-tagging-autocomplete

@ghost
Copy link
Author

@ghost ghost commented Nov 24, 2015

Original comment by tflam (Bitbucket: tflam, GitHub: Unknown):


I am also experiencing the issue with
pip install -e

@ghost
Copy link
Author

@ghost ghost commented Nov 24, 2015

@ghost
Copy link
Author

@ghost ghost commented Nov 24, 2015

Original comment by ryanleeschneider (Bitbucket: ryanleeschneider, GitHub: Unknown):


I see the same issue pip installing redis==2.4.9, and I believe Ryan Kelly is correct, the issue is with packages that use 'old-style' classes (not derived from object).

@ghost
Copy link
Author

@ghost ghost commented Nov 24, 2015

Original comment by christianmlong (Bitbucket: christianmlong, GitHub: christianmlong):


I am having the same problem with 18.6, installing an old package (SOAPpy-0.12.6) from a private github repo.

@ghost
Copy link
Author

@ghost ghost commented Nov 24, 2015

Original comment by papachoco (Bitbucket: papachoco, GitHub: papachoco):


IT happens also w/ zc.buildout

cmd_obj.run()

File "build/bdist.macosx-10.11-x86_64/egg/setuptools/command/develop.py", line 32, in run
File "build/bdist.macosx-10.11-x86_64/egg/setuptools/command/develop.py", line 132, in install_for_development
File "build/bdist.macosx-10.11-x86_64/egg/setuptools/command/easy_install.py", line 695, in process_distribution

File "build/bdist.macosx-10.11-x86_64/egg/setuptools/command/develop.py", line 160, in install_egg_scripts
File "build/bdist.macosx-10.11-x86_64/egg/setuptools/command/develop.py", line 173, in install_wrapper_scripts
TypeError: must be type, not classobj
While:

@ghost
Copy link
Author

@ghost ghost commented Nov 24, 2015

Original comment by andrew_dowds (Bitbucket: andrew_dowds, GitHub: Unknown):


This is breaking our builds. instead of building our source code, setuptools is outputting the following error

line 173, in install_wrapper_scripts
return super(develop, self).install_wrapper_scripts(dist)
TypeError: must be type, not classobj

@ghost
Copy link
Author

@ghost ghost commented Nov 24, 2015

Original comment by charlax (Bitbucket: charlax, GitHub: charlax):


Having the same issue.

@ghost
Copy link
Author

@ghost ghost commented Nov 24, 2015

Original comment by thisfred (Bitbucket: thisfred, GitHub: thisfred):


Same here, reverting to 18.5 solved it.

@ghost
Copy link
Author

@ghost ghost commented Nov 24, 2015

Original comment by ericnewcomer (Bitbucket: ericnewcomer, GitHub: ericnewcomer):


Same problem here: Build Failure

@ghost
Copy link
Author

@ghost ghost commented Nov 24, 2015

Original comment by andrew_dowds (Bitbucket: andrew_dowds, GitHub: Unknown):


buildout is always grabbing newest version of setuptools (18.6). How do I lock buildout at 18.5 to avoid this error?

@ghost
Copy link
Author

@ghost ghost commented Nov 24, 2015

Original comment by teamrubberandy (Bitbucket: teamrubberandy, GitHub: teamrubberandy):


another +1; we're encountering this error when using buildout with 18.6. EDIT resolved by 18.6.1 thanks.

@ghost
Copy link
Author

@ghost ghost commented Nov 24, 2015

Original comment by StefanRijnhart (Bitbucket: StefanRijnhart, GitHub: StefanRijnhart):


@andrew_dowds that would be

python bootstrap.py --setuptools-version 18.5

and

[buildout]
newest = false
@ghost
Copy link
Author

@ghost ghost commented Nov 24, 2015

Original comment by chrisw (Bitbucket: chrisw, GitHub: chrisw):


Just started biting me on Travis nightly builds tonight:

https://travis-ci.org/Mortar/mortar_rdb/jobs/93030519#L256

https://travis-ci.org/Simplistix/mush/jobs/93042214

@ghost
Copy link
Author

@ghost ghost commented Nov 24, 2015

Original comment by chrisw (Bitbucket: chrisw, GitHub: chrisw):


I should note that this only affects Python 2.

@ghost
Copy link
Author

@ghost ghost commented Nov 24, 2015

Original comment by darkrho (Bitbucket: darkrho, GitHub: Unknown):


As a workaround, you can fix the version to 18.5 or don't use -e option in pip.

@ghost
Copy link
Author

@ghost ghost commented Nov 24, 2015

Original comment by jonhanks (Bitbucket: jonhanks, GitHub: jonhanks):


I'm seeing this problem too please fix. Python version 2.7.3
Edit: New version 18.6.1 seems to fix the problem

@ghost
Copy link
Author

@ghost ghost commented Nov 25, 2015

Original comment by jaraco (Bitbucket: jaraco, GitHub: jaraco):


Glad to hear it's fixed. Sorry for the trouble. Tests are needed for this functionality.

@ghost
Copy link
Author

@ghost ghost commented Nov 25, 2015

Original comment by chrisw (Bitbucket: chrisw, GitHub: chrisw):


Indeed, confirm fixed for me.

@ghost
Copy link
Author

@ghost ghost commented Nov 25, 2015

Original comment by teamrubberandy (Bitbucket: teamrubberandy, GitHub: teamrubberandy):


The fast fix on this is much appreciated. Without the fix we would have had to start today by patching our ansible toolchain and our CI configuration, and communicating with a bunch of customers about delayed deployments. Thanks for resolving it so quickly.

@ghost ghost closed this Mar 29, 2016
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
0 participants