Skip to content

solved: Installation failed due to reversed boolean #140

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

Closed
ghost opened this issue Jan 23, 2014 · 1 comment
Closed

solved: Installation failed due to reversed boolean #140

ghost opened this issue Jan 23, 2014 · 1 comment

Comments

@ghost
Copy link

ghost commented Jan 23, 2014

Originally reported by: Anonymous


On Sunday, 2014-01-19, I downloaded and ran the script posted at https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py yielded these messages:

'''
Downloading https://pypi.python.org/packages/source/s/setuptools/setuptools-2.1.tar.gz
Extracting in d:\users\xxxxxxx\appdata\local\temp\tmpvw3rn3
Now working in d:\users\xxxxxxx\appdata\local\temp\tmpvw3rn3\setuptools-2.1
Installing Setuptools
Something went wrong during the installation.
See the error message above.
'''

The last two messages are from the try block in _install(tarball, install_args=()):

    if not _python_cmd('setup.py', 'install', *install_args):
        log.warn('Something went wrong during the installation.')
        log.warn('See the error message above -- exit code is 2.')

The last line of _python_cmd(*args) is:

    return subprocess.call(args) == 0

which means that (pseudo code):

if subprocess.call(args) succeeds:
    _python_cmd returns False to _install
    _install issues the messages given above
    _install calls sys.exit()

When I changed the _python_cmd boolean to:

    return subprocess.call(args) == 1

setuptools v. 0.6c11 was installed without error and I was able to install ipython and some other packages with no problems.

I'm running Python 2.7.6 on Windows 7.


@ghost
Copy link
Author

ghost commented Jan 23, 2014

Original comment by jaraco (Bitbucket: jaraco, GitHub: jaraco):


I believe you're mistaken. Subprocess.call returns the process exit code, which is 0 upon success. Thus if the subprocess call succeeds, _python_cmd returns True. Then, _install does not print the messages or exit.

Furthermore, it's very strange that you've downloaded setuptools-2.1, yet 0.6c11 is installed.

I run this script on clean and dirty Windows environments all the time without incident. I'm pretty sure the logic is accurate. The code suggests "See the error message above". What was the error message above?

@ghost ghost added major bug labels Mar 29, 2016
@ghost ghost closed this as completed Mar 29, 2016
jaraco pushed a commit that referenced this issue Jun 12, 2022
- `/usr/lib/lib${name}.a` Static library, needed at link time, embedded for run time
- `/usr/lib/lib${name}.dll.a` Import library, needed at link time, sets up run-time redirections to DLL
- `/usr/bin/cyg${name}.dll` Dynamically-linked library, needed at run time.  Extension used for python C extension modules.

Replaces #140
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

0 participants