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

green breaks ./setup.py --help-commands #183

Closed
buzz opened this issue Feb 20, 2018 · 2 comments
Closed

green breaks ./setup.py --help-commands #183

buzz opened this issue Feb 20, 2018 · 2 comments
Labels

Comments

@buzz
Copy link

buzz commented Feb 20, 2018

I have a virtualenv, pip install green and have a standard setup.py. The following happens:

$ ./setup.py --help-commands                                                                                                                                    setuppy! venv
usage: green [options] [target [target2 ...]]
green: error: unrecognized arguments: --help-commands

If I do pip uninstall green things work as expected:

$ ./setup.py --help-commands                                                                                                                                             Standard commands:
  build            build everything needed to install
  build_py         "build" pure Python modules (copy to build directory)
  build_ext        build C/C++ extensions (compile/link to build directory)
  build_clib       build C/C++ libraries used by Python extensions
  build_scripts    "build" scripts (copy and fixup #! line)
  clean            clean up temporary files from 'build' command
  install          install everything from build directory
  install_lib      install all Python modules (extensions and pure Python)
  install_headers  install C/C++ header files
  install_scripts  install scripts (Python or otherwise)
  install_data     install data files
  sdist            create a source distribution (tarball, zip file, etc.)
  register         register the distribution with the Python package index
  bdist            create a built (binary) distribution
  bdist_dumb       create a "dumb" built distribution
  bdist_rpm        create an RPM distribution
  bdist_wininst    create an executable installer for MS Windows
  check            perform some checks on the package
  upload           upload binary package to PyPI

usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
   or: setup.py --help [cmd1 cmd2 ...]
   or: setup.py --help-commands
   or: setup.py cmd --help

My test setup.py:

#!/usr/bin/env python

from setuptools import setup

setup(name='foo',
      version='1.0',
      description='foo description',
      author='Foo',
      author_email='foo@example.com',
      url='https://www.example.com',
      packages=['foo',],
     )

If I change from setuptools import setup to from distutils.core import setup things are working again.

This only seems to happen on Python3 not Python2.

@CleanCut
Copy link
Owner

Wait, what??? I don't see how green could even get involved given that your code never imports it. Weird!

I'll see if I can reproduce that error on my setup.

What are your exact versions of the following?

  • Operating system
  • Python
  • virtualenv

Also, do you have an actual foo/ directory with any code in it? (Or any other code in your directory at all?)

@CleanCut
Copy link
Owner

Fixed by @althonos in #184

@CleanCut CleanCut added the bug label Feb 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants