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

Python 3 SyntaxError from long literal 0x950412deL in po/msgfmt.py #671

Open
peterjc opened this issue Jul 22, 2016 · 7 comments
Open

Python 3 SyntaxError from long literal 0x950412deL in po/msgfmt.py #671

peterjc opened this issue Jul 22, 2016 · 7 comments

Comments

@peterjc
Copy link

peterjc commented Jul 22, 2016

README says "Python 2.7.2 or later is needed." which implies Python 3 should work.

However, installation under Python 3 fails, first problem is at line 82 in file po/msgfmt.py

    output = struct.pack("Iiiiiii",
                         0x950412deL,       # Magic
                         0,                 # Version
                         len(keys),         # # of entries
                         7*4,               # start of key index
                         7*4+len(keys)*8,   # start of value index
                         0, 0)              # size and offset of hash table

This prevent installation under Python 3, e.g.

$ pip3.5 install linkchecker
Collecting linkchecker
  Using cached LinkChecker-9.3.tar.gz
...
  ----------------------------------------
  Failed building wheel for linkchecker
  Running setup.py clean for linkchecker
Failed to build linkchecker
Installing collected packages: linkchecker
  Running setup.py install for linkchecker ... error
    Complete output from command /Users/pjcock/bin/python3.5 -u -c "import setuptools, tokenize;__file__='/private/var/folders/t_/q00rqqr15lg950n1c8r2yxf00000gn/T/pip-build-700dus_5/linkchecker/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/t_/q00rqqr15lg950n1c8r2yxf00000gn/T/pip-d_khddby-record/install-record.txt --single-version-externally-managed --compile:
    /Users/pjcock/lib/python3.5/distutils/dist.py:261: UserWarning: Unknown distribution option: 'app'
      warnings.warn(msg)
    creating /private/var/folders/t_/q00rqqr15lg950n1c8r2yxf00000gn/T/pip-build-700dus_5/linkchecker/_LinkChecker_configdata.py
    running install
    running build
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/t_/q00rqqr15lg950n1c8r2yxf00000gn/T/pip-build-700dus_5/linkchecker/setup.py", line 976, in <module>
        setup(**args)
      File "/Users/pjcock/lib/python3.5/distutils/core.py", line 148, in setup
        dist.run_commands()
      File "/private/var/folders/t_/q00rqqr15lg950n1c8r2yxf00000gn/T/pip-build-700dus_5/linkchecker/setup.py", line 476, in run_commands
        super(MyDistribution, self).run_commands()
      File "/Users/pjcock/lib/python3.5/distutils/dist.py", line 955, in run_commands
        self.run_command(cmd)
      File "/Users/pjcock/lib/python3.5/distutils/dist.py", line 974, in run_command
        cmd_obj.run()
      File "/Users/pjcock/lib/python3.5/site-packages/setuptools/command/install.py", line 61, in run
        return orig.install.run(self)
      File "/Users/pjcock/lib/python3.5/distutils/command/install.py", line 539, in run
        self.run_command('build')
      File "/Users/pjcock/lib/python3.5/distutils/cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "/Users/pjcock/lib/python3.5/distutils/dist.py", line 974, in run_command
        cmd_obj.run()
      File "/private/var/folders/t_/q00rqqr15lg950n1c8r2yxf00000gn/T/pip-build-700dus_5/linkchecker/setup.py", line 602, in run
        self.build_message_files()
      File "/private/var/folders/t_/q00rqqr15lg950n1c8r2yxf00000gn/T/pip-build-700dus_5/linkchecker/setup.py", line 592, in build_message_files
        import msgfmt
      File "po/msgfmt.py", line 82
        0x950412deL,       # Magic
                  ^
    SyntaxError: invalid syntax

    ----------------------------------------
@cacois
Copy link

cacois commented Sep 9, 2016

+1, just ran into this issue today

@DonRichards
Copy link

+1 Same issue today

@kelvan
Copy link

kelvan commented Dec 12, 2016

Seems to be a doc bug
Website: "Python 3 is not yet supported."
Nevertheless python3 support should be high priority imho.
Is there a similar lib supporting py3?

@reagle
Copy link

reagle commented Dec 20, 2016

I had the same problem with python3, and can't install with python2 either.

~$ pip2 install linkchecker
Collecting linkchecker
Requirement already satisfied: requests>=2.2.0 in /usr/local/lib/python2.7/site-packages (from linkchecker)
Installing collected packages: linkchecker
Successfully installed linkchecker-9.3
hom:~$ linkchecker
This program requires Python requests 2.2.0 or later.
...
~$ pip2 show requests
Name: requests
Version: 2.10.0
Summary: Python HTTP for Humans.
Home-page: http://python-requests.org
Author: Kenneth Reitz
Author-email: [email protected]
License: Apache 2.0
Location: /usr/local/lib/python2.7/site-packages

@peterjc
Copy link
Author

peterjc commented Dec 22, 2016

@reagle your Python 2 problem is something different, can you open a new issue for that instead?

Update: You are probably seeing #649

@reagle
Copy link

reagle commented Dec 22, 2016

@peterjc okay, thanks.

@dpalic
Copy link

dpalic commented Oct 29, 2017

Thank you for the issue report. Sadly this project is dead, and a new team is around with https://github.com/linkcheck/linkchecker
for more details please see: #708
Also please close this issue and report it freshly on the new repo https://github.com/linkcheck/linkchecker/issues if your issue still persists

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

6 participants