Advice needed for Python packaging - can't find required library during installation

dieter dieter at handshake.de
Tue Feb 4 02:30:00 EST 2014


thebiggestbangtheory at gmail.com writes:

> I am trying to package up a very simple python app. In my setup.py file I have a couple of lines that include the following:
>
> from setuptools import setup
>
> setup(
>         name='ban',
>         version='0.1',
>         packages=['ban',],
>         description='Python Distribution Utilities',
>         author='Ban',
>         author_email='ban at tbbt.com',
>         package_data={'ban': ['data/*.dat']},
>         long_description=open('README.txt').read(),
>         install_requires=['Google-Safe-Browsing-v2-Lookup'],
> )
> ...
> Processing dependencies for ban==0.1
> Searching for Google-Safe-Browsing-v2-Lookup
> Reading http://pypi.python.org/simple/Google-Safe-Browsing-v2-Lookup/
> No local packages or download links found for Google-Safe-Browsing-v2-Lookup
> error: Could not find suitable distribution for Requirement.parse('Google-Safe-Browsing-v2-Lookup')
> **************************
>
> Issue #1
>
> Apparently the setup script cannot find the package - Google-Safe-Browsing-v2-Lookup . However, I can install this package via pip. 
>
> What should I specify in the setup.py file instead of install_requires=['Google-Safe-Browsing-v2-Lookup'] so that the library is properly installed ?

I suppose that "setuptools" is confused by the "-" in the package
names together with these "-" being omitted in the uploaded file
(https://pypi.python.org/packages/source/G/Google-Safe-Browsing-v2-Lookup/Google%20Safe%20Browsing%20v2%20Lookup-0.1.0.tar.gz5").

If this supposition is correct, then you would either need to
contact the "setuptools" author (to get "setuptools" handle this case)
or the "Google Safe Browsing" author to get a filename more
in line with the package name.




More information about the Python-list mailing list