Skip to content

Typo in podsixnet2 package on PyPi #41

Description

@mrsmond

Hi Chris,

When installing podsixnet2 as follows, I get an error about not being in a git repo:

$ pip install podsixnet2
Collecting podsixnet2
  Using cached podsixnet2-2.0.1.tar.gz (12 kB)
    ERROR: Command errored out with exit status 1:
     command: /home/mond/python-virtualenvs/cocos2d_pyglet-1.5/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-vaosdd_x/podsixnet2/setup.py'"'"'; __file__='"'"'/tmp/pip-install-vaosdd_x/podsixnet2/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-rofalij9
         cwd: /tmp/pip-install-vaosdd_x/podsixnet2/
    Complete output (10 lines):
    fatal: not a git repository (or any of the parent directories): .git
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-vaosdd_x/podsixnet2/setup.py", line 17, in <module>
        __version__ = subprocess.check_output(["git", "describe", "--tag", "--always"]).decode("utf8").strip("\n")
      File "/usr/lib/python3.8/subprocess.py", line 411, in check_output
        return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
      File "/usr/lib/python3.8/subprocess.py", line 512, in run
        raise CalledProcessError(retcode, process.args,
    subprocess.CalledProcessError: Command '['git', 'describe', '--tag', '--always']' returned non-zero exit status 128.
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

Which happens because in the setup.py file it incorrectly has the directory as podsixnet rather than podsixnet2

versionfile = "podsixnet/version.py"
if not os.path.isfile(versionfile):
    # assume git checkout
    __version__ = subprocess.check_output(["git", "describe", "--tag", "--always"]).decode("utf8").strip("\n")
else:
    # created by pip
    exec(open(versionfile).read())

After changing versionfile I am able to install it.

I think it would be useful to update the 'Project description' page to explain why there are two packages and that they are functionally equivalent (as I had to delve into previous issues #26 and PRs #35 #37 to find out 😄).

Many thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions