Skip to content

httpie does not depend on py-argparse #3628

@hartzell

Description

@hartzell

httpie won't build for python 2.7.13.

[hartzelg@lb093login spack]$ grep python etc/spack/packages.yaml
  python:
[hartzelg@lb093login spack]$ grep -2 python etc/spack/packages.yaml
  prank:
    version: [150803]
  python:
    version: [2.7.13]
  py-flake8:
[hartzelg@lb093login spack]$ spack spec httpie
Input spec
--------------------------------
httpie

Normalized
--------------------------------
httpie
    ^[email protected]:
        ^py-setuptools
            ^[email protected]:2.7.99,3.3:
                ^bzip2
                ^ncurses
                    ^mawk
                    ^pkg-config
                ^openssl
                    ^[email protected]:
                    ^zlib
                ^readline
                ^sqlite
    ^[email protected]:
    ^[email protected]:

Concretized
--------------------------------
==> Error: httpie does not depend on py-argparse
[hartzelg@lb093login spack]$ grep argparse var/spack/repos/builtin/packages/httpie/package.py
    depends_on('[email protected]:', type=('build', 'run'), when='^python@:2.6,3.0:3.1')

It works w/ [email protected]

I think that this bit in the setup.py is what suggested the addition.

if 'bdist_wheel' not in sys.argv:
    try:
        # noinspection PyUnresolvedReferences
        import argparse
    except ImportError:
        install_requires.append('argparse>=1.2.1')

    if 'win32' in str(sys.platform).lower():
        # Terminal colors for Windows
        install_requires.append('colorama>=0.2.4')

Looking at it though, I believe that it only applies in certain (bdist_wheel...) situations.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions