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

Command '['git', 'describe', '--tag', '--always']' returned non-zero exit status 128. #13

Closed
hjpotter92 opened this issue Feb 8, 2018 · 3 comments

Comments

@hjpotter92
Copy link

It is happening when I try to install the package using either pip or easy_install. There is no difference when I use either python 2.7 or 3.6

Python 2.7 traceback:

$ pip install podsixnet
Collecting podsixnet
  Using cached PodSixNet-0.9.3.tar.gz
    Complete output from command python setup.py egg_info:
    fatal: Not a git repository (or any of the parent directories): .git
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "c:\users\hjpott~1\appdata\local\temp\pip-build-8ny46c\podsixnet\setup.py", line 14, in <module>
        version=subprocess.check_output(["git", "describe", "--tag", "--always"]).decode().strip(),
      File "c:\program files\python\lib\subprocess.py", line 219, in check_output
        raise CalledProcessError(retcode, cmd, output=output)
    subprocess.CalledProcessError: Command '['git', 'describe', '--tag', '--always']' returned non-zero exit status 128

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in c:\users\hjpott~1\appdata\local\temp\pip-build-8ny46c\podsixnet\

Python 3.6 traceback

$ pip install podsixnet
Collecting podsixnet
  Using cached PodSixNet-0.9.3.tar.gz
    Complete output from command python setup.py egg_info:
    fatal: Not a git repository (or any of the parent directories): .git
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\HJPOTT~1\AppData\Local\Temp\pip-build-5nq253r5\podsixnet\setup.py", line 14, in <module>
        version=subprocess.check_output(["git", "describe", "--tag", "--always"]).decode().strip(),
      File "c:\program files\python3.6\lib\subprocess.py", line 336, in check_output
        **kwargs).stdout
      File "c:\program files\python3.6\lib\subprocess.py", line 418, in run
        output=stdout, stderr=stderr)
    subprocess.CalledProcessError: Command '['git', 'describe', '--tag', '--always']' returned non-zero exit status 128.

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\HJPOTT~1\AppData\Local\Temp\pip-build-5nq253r5\podsixnet\

The easy_install had a slightly longer stacktrace:

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "c:\program files\python3.6\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "c:\program files\python3.6\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Program Files\Python3.6\Scripts\easy_install.exe\__main__.py", line 9, in <module>
  File "c:\program files\python3.6\lib\site-packages\setuptools\command\easy_install.py", line 2265, in main
    **kw
  File "c:\program files\python3.6\lib\distutils\core.py", line 148, in setup
    dist.run_commands()
  File "c:\program files\python3.6\lib\distutils\dist.py", line 955, in run_commands
    self.run_command(cmd)
  File "c:\program files\python3.6\lib\distutils\dist.py", line 974, in run_command
    cmd_obj.run()
  File "c:\program files\python3.6\lib\site-packages\setuptools\command\easy_install.py", line 410, in run
    self.easy_install(spec, not self.no_deps)
  File "c:\program files\python3.6\lib\site-packages\setuptools\command\easy_install.py", line 665, in easy_install
    return self.install_item(spec, dist.location, tmpdir, deps)
  File "c:\program files\python3.6\lib\site-packages\setuptools\command\easy_install.py", line 695, in install_item
    dists = self.install_eggs(spec, download, tmpdir)
  File "c:\program files\python3.6\lib\site-packages\setuptools\command\easy_install.py", line 876, in install_eggs
    return self.build_and_install(setup_script, setup_base)
  File "c:\program files\python3.6\lib\site-packages\setuptools\command\easy_install.py", line 1115, in build_and_install
    self.run_setup(setup_script, setup_base, args)
  File "c:\program files\python3.6\lib\site-packages\setuptools\command\easy_install.py", line 1101, in run_setup
    run_setup(setup_script, args)
  File "c:\program files\python3.6\lib\site-packages\setuptools\sandbox.py", line 251, in run_setup
    raise
  File "c:\program files\python3.6\lib\contextlib.py", line 99, in __exit__
    self.gen.throw(type, value, traceback)
  File "c:\program files\python3.6\lib\site-packages\setuptools\sandbox.py", line 198, in setup_context
    yield
  File "c:\program files\python3.6\lib\contextlib.py", line 99, in __exit__
    self.gen.throw(type, value, traceback)
  File "c:\program files\python3.6\lib\site-packages\setuptools\sandbox.py", line 169, in save_modules
    saved_exc.resume()
  File "c:\program files\python3.6\lib\site-packages\setuptools\sandbox.py", line 144, in resume
    six.reraise(type, exc, self._tb)
  File "c:\program files\python3.6\lib\site-packages\pkg_resources\_vendor\six.py", line 685, in reraise
    raise value.with_traceback(tb)
  File "c:\program files\python3.6\lib\site-packages\setuptools\sandbox.py", line 157, in save_modules
    yield saved
  File "c:\program files\python3.6\lib\site-packages\setuptools\sandbox.py", line 198, in setup_context
    yield
  File "c:\program files\python3.6\lib\site-packages\setuptools\sandbox.py", line 248, in run_setup
    DirectorySandbox(setup_dir).run(runner)
  File "c:\program files\python3.6\lib\site-packages\setuptools\sandbox.py", line 278, in run
    return func()
  File "c:\program files\python3.6\lib\site-packages\setuptools\sandbox.py", line 246, in runner
    _execfile(setup_script, ns)
  File "c:\program files\python3.6\lib\site-packages\setuptools\sandbox.py", line 47, in _execfile
    exec(code, globals, locals)
  File "C:\Users\HJPOTT~1\AppData\Local\Temp\easy_install-00ahp3gk\PodSixNet-0.9.3\setup.py", line 14, in <module>
  File "c:\program files\python3.6\lib\subprocess.py", line 336, in check_output
    **kwargs).stdout
  File "c:\program files\python3.6\lib\subprocess.py", line 418, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['git', 'describe', '--tag', '--always']' returned non-zero exit status 128.
@chr15m chr15m closed this as completed in 1bd4601 Feb 22, 2018
@chr15m
Copy link
Owner

chr15m commented Feb 22, 2018

@hjpotter92 thank you very much for testing. I have released version 0.9.4 which should hopefully fix this issue. Please let me know if it works for you.

@hjpotter92
Copy link
Author

@chr15m Python 3 does not have execfile. Also; when installing from pip, it does not download the git history. It just fetches the tarball. You can't expect git descibe --tag --always to be executed, as there is no git repository available on client machine.

└──$ pip install podsixnet
Collecting podsixnet
  Downloading PodSixNet-0.9.4.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\HJPOTT~1\AppData\Local\Temp\pip-build-dlhyrha5\podsixnet\setup.py", line 13, in <module>
        execfile("PodSixNet/version.py")
    NameError: name 'execfile' is not defined

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\HJPOTT~1\AppData\Local\Temp\pip-build-dlhyrha5\podsixnet\

@chr15m
Copy link
Owner

chr15m commented Feb 22, 2018

I changed the setup script so it does not require git or the git history.

I haven't supported Python 3 so far in this library. There is a branch in this repository where some of that is happening slowly but I do not know the status. Maybe I will get time to look at it one day, but in the meantime patches to make the library work in Python 3 are welcome.

Thanks for testing. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants