GithubHelp home page GithubHelp logo

Comments (12)

xolox avatar xolox commented on July 26, 2024

Thanks for the feedback! The stack trace kind of looks like a bug in distutils unless I'm misunderstanding things completely... Basically pip-accel executes python setup.py bdist_dumb and expects it to work (which it did on the 50+ modules I tried it on). I'll see if I can reproduce this on my Mac this weekend.

from pip-accel.

xolox avatar xolox commented on July 26, 2024

I'm running Mac OS X Lion 10.7.5 and the command pip-accel install ssh==1.7.14 works for me. Looking at the output you posted you seem to be running Mac OS X 10.8. Yes, that's it, I'm able to reproduce it on Mac OS X 10.8 (tested just now). I suppose it's to do with the version of distutils included in 10.8. I don't think this is a bug in pip-accel but I can see if there's a solution.

from pip-accel.

xolox avatar xolox commented on July 26, 2024

I can reproduce it on my girlfriend's MacBook running Mac OS X 10.8, but the system wide *.py files referenced in the stack trace don't exist, there's just *.pyc and *.pyo files, so I can't even take a look at the source code (I don't like that Mac OS X bundles Python like this, but I digress).

However fortunately I did take a look at the setup.py and setup_helper.py scripts in the ssh distribution and I think the problem is caused there. The setup.py script for version 1.7.14 contains this bit of code:

if sys.platform == 'darwin':
    import setup_helper
    setup_helper.install_custom_make_tarball()

Inside setup_helper.py I found this:

_custom_formats = {
    'gztar': (make_tarball, [('compress', 'gzip')], "gzip'ed tar-file"),
    'bztar': (make_tarball, [('compress', 'bzip2')], "bzip2'ed tar-file"),
    'ztar':  (make_tarball, [('compress', 'compress')], "compressed tar file"),
    'tar':   (make_tarball, [('compress', None)], "uncompressed tar file"),
}

# Hack in and insert ourselves into the distutils code base
def install_custom_make_tarball():
    distutils.archive_util.ARCHIVE_FORMATS.update(_custom_formats)

As the comment points out this is a monkey patch of distutils, and I'm convinced this is the cause of the problem. I found the ssh project on GitHub to report the bug, however I noticed that the readme says that ssh was a fork of Paramiko and has since been merged back, making the project / repository defunct. So I guess there's no point in reporting the bug. All I can suggest to you is to try a different version of ssh or maybe Paramiko?

from pip-accel.

nvie avatar nvie commented on July 26, 2024

Wow, that's some awesome support, Peter. Cool. I believe ssh is s secondary dependency—I don't use it directly. I'll find out which project uses it and see if they can upgrade to paramiko anyway. Thanks for the great reply here.

from pip-accel.

mbrochh avatar mbrochh commented on July 26, 2024

I fell into the same trap and could get around it by pinning to paramiko==dev in my requirements.txt

from pip-accel.

l0kix2 avatar l0kix2 commented on July 26, 2024

So latest paramiko have this annoying hack https://github.com/paramiko/paramiko/blob/master/setup.py#L52

Pip installs it without complains, so maybe pip-accel somehow should do it? This issue closed, but it can't see workaround or smth.

from pip-accel.

xolox avatar xolox commented on July 26, 2024

@l0kix2: Just got an email notification from your message here. I don't have time to look into this right now but I will definitely forget if I don't follow up on this in some way, so I'll reopen this issue as a reminder to investigate. If things stay quiet for too long then feel free to bump this issue to remind me ;-)

from pip-accel.

l0kix2 avatar l0kix2 commented on July 26, 2024

Thanks, i really don't know how to handle it for a long time. When i'm trying to install fabric on mac os via pip-accel it installs paramiko, which fails with TypeError: make_tarball() got an unexpected keyword argument 'owner'

from pip-accel.

enkeboll avatar enkeboll commented on July 26, 2024

Bump, happening over here as well with paramiko-1.12.4 on OS X 10.10.5 with Python 2.7.10 as the base.

from pip-accel.

xolox avatar xolox commented on July 26, 2024

Hi @l0kix2 and @enkeboll,

As I explained before in this issue the bug here is not in pip-accel but in the SSH and Paramiko packages: Various versions of both packages (including apparently the master branch of Paramiko :-s) include a Mac OS X specific customization of the python setup.py bdist_dumb command as implemented by distutils. This customization has become incompatible with newer versions of distutils which is why installation of SSH and Paramiko via pip-accel on Mac OS X is now broken.

However I understand that just pointing out a bug elsewhere doesn't really help you at all :-). Given that I understand what the problem is here and really it shouldn't be that hard to fix it I decided to create a pull request on the Paramiko project to get this fixed, you can find the pull request here: paramiko/paramiko#582.

In the short term, if the version of Paramiko on the master branch satisfies your requirements you can install it as follows:

pip-accel install https://github.com/xolox/paramiko/archive/fix-bdist-dumb-mac-os-x.zip

Let's hope my pull request is merged quickly :-).

from pip-accel.

enkeboll avatar enkeboll commented on July 26, 2024

Thanks a lot for the update;.

from pip-accel.

xolox avatar xolox commented on July 26, 2024

My pull request was just merged which means the Paramiko master branch is now installable via pip-accel on Mac OS X. Until a proper release is made you should be able to use e.g. this syntax:

pip-accel install https://github.com/paramiko/paramiko/archive/master.zip

I believe this is the best I can do so I'm going to go ahead and close this issue now. Thanks for the feedback everyone!

from pip-accel.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.