pycrypto oddness on fedora 16

Bug #989414 reported by Joshua Harlow
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance
Invalid
Undecided
Unassigned

Bug Description

This doesn't seem to make sense.
pycrypto seems to be installed, but python seems to think it isn't there??

On fedora 16 the following happens:

[josh@desktop app]$ sudo python setup.py develop -v
running develop
running egg_info
writing requirements to glance.egg-info/requires.txt
writing glance.egg-info/PKG-INFO
writing top-level names to glance.egg-info/top_level.txt
writing dependency_links to glance.egg-info/dependency_links.txt
reading manifest file 'glance.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching 'ChangeLog'
warning: no files found matching 'builddeb.sh'
warning: no files found matching 'glance/tests/functional/data/*'
writing manifest file 'glance.egg-info/SOURCES.txt'
running build_ext
Creating /usr/lib/python2.7/site-packages/glance.egg-link (link to .)
glance 2012.2 is already the active version in easy-install.pth
Installing glance script to /usr/bin
Installing glance-api script to /usr/bin
Installing glance-cache-prefetcher script to /usr/bin
Installing glance-cache-pruner script to /usr/bin
Installing glance-cache-manage script to /usr/bin
Installing glance-cache-cleaner script to /usr/bin
Installing glance-control script to /usr/bin
Installing glance-manage script to /usr/bin
Installing glance-registry script to /usr/bin
Installing glance-scrubber script to /usr/bin

Installed /home/josh/openstack/glance/app
Processing dependencies for glance==2012.2
Searching for pycrypto>=2.1.0alpha1
Reading http://pypi.python.org/simple/pycrypto/
Reading http://pycrypto.sourceforge.net
Reading http://www.amk.ca/python/code/crypto
Reading http://www.pycrypto.org/

Download error on http://www.pycrypto.org/: [Errno 101] Network is unreachable -- Some packages may not be found!
Reading http://www.pycrypto.org/

[josh@desktop app]$ sudo yum install pycrypto
Loaded plugins: langpacks, presto, refresh-packagekit
Package python-crypto-2.3-5.fc16.x86_64 already installed and latest version
Nothing to do

Revision history for this message
Brian Waldon (bcwaldon) wrote :

I don't think this is a bug in Glance, it seems like an issue with your local environment...

Brian Waldon (bcwaldon)
Changed in glance:
status: New → Incomplete
Revision history for this message
Joshua Harlow (harlowja) wrote :

Could be, or it could be a case that is only being produced in fedora 16, and or pip. I will try it again later to see what happens. Either way, if pycrypto is installed via yum, it doesn't seem like glance should be trying to install the pip version?

Revision history for this message
Brian Waldon (bcwaldon) wrote :

If you run setup.py install/develop, setuptools/distribute will try to install all indicated dependencies regardless of which system-level python packages you already have.

Revision history for this message
Joshua Harlow (harlowja) wrote :
Download full text (5.0 KiB)

Is that really true?

I just made the following:

#!/usr/bin/env python
# -*- coding: utf-8 -*-

import os
import sys

try:
    from setuptools import setup
except ImportError:
    from distutils.core import setup

required = ['httplib2>=0.4']
packages = [
]

setup(
    name='test',
    version='0.1',
    description='',
    long_description='',
    packages=packages,
    install_requires=required,
    license='',
    classifiers=(
        'Development Status :: 5 - Production/Stable',
        'Intended Audience :: Developers',
        'Natural Language :: English',
        'License :: OSI Approved :: ISC License (ISCL)',
        'Programming Language :: Python',
        'Programming Language :: Python :: 2.6',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.0',
        'Programming Language :: Python :: 3.1',
    ),
)

Then I ran the following:

$ sudo yum install python-httplib2
Loaded plugins: langpacks, presto, refresh-packagekit
Resolving Dependencies
--> Running transaction check
---> Package python-httplib2.noarch 0:0.6.0-5.fc15 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

=========================================================================================================================================================
 Package Arch Version Repository Size
=========================================================================================================================================================
Installing:
 python-httplib2 noarch 0.6.0-5.fc15 fedora 35 k

Transaction Summary
=========================================================================================================================================================
Install 1 Package

Total download size: 35 k
Installed size: 35 k
Is this ok [y/N]: y
Downloading Packages:
python-httplib2-0.6.0-5.fc15.noarch.rpm | 35 kB 00:00
Running Transaction Check
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : python-httplib2-0.6.0-5.fc15.noarch 1/1
  Verifying : python-httplib2-0.6.0-5.fc15.noarch 1/1

Installed:
  python-httplib2.noarch 0:0.6.0-5.fc15

Complete!
[josh@desktop test]$ sudo python setup.py develop
running develop
running egg_info
writing requirements to test.egg-info/requires.txt
writing test.egg-info/PKG-INFO
writing top-level names to test.egg-info/top_level.txt
writing dependency_links to test.egg-info/dependency_links.txt
reading manifest file 'test.egg-info/SOURCES...

Read more...

Revision history for this message
Pádraig Brady (p-draigbrady) wrote :

Tested as follows on Fedora 15 and Fedora 16 and python-crypto was _not_ downloaded.

cd ~/git/glance
$ rpm -q python-crypto
python-crypto-2.3-4.fc15.x86_64
mkdir tsetup
PYTHONPATH=$PWD/tsetup python setup.py develop -v --install-dir=$PWD/tsetup
...
Using /usr/lib/python2.7/site-packages
Searching for pycrypto==2.3
Best match: pycrypto 2.3
Adding pycrypto 2.3 to easy-install.pth file
...

Revision history for this message
Brian Waldon (bcwaldon) wrote :

I'm having a bit of an issue coming up with a path forward here. I'm still rather confident this isn't a bug in Glance. It screams environment issue to me.

Brian Waldon (bcwaldon)
Changed in glance:
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.