citeproc-py icon indicating copy to clipboard operation
citeproc-py copied to clipboard

broken - can't currently install due to new rnc2rng

Open bpoldrack opened this issue 4 years ago • 3 comments

Running setup.py install for citeproc-py ... error
    ERROR: Command errored out with exit status 1:
     command: /tmp/test-rnc2rng/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-_3se60gv/citeproc-py/setup.py'"'"'; __file__='"'"'/tmp/pip-install-_3se60gv/citeproc-py/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-t8o7ctfr/install-record.txt --single-version-externally-managed --compile --install-headers /tmp/test-rnc2rng/include/site/python3.7/citeproc-py
         cwd: /tmp/pip-install-_3se60gv/citeproc-py/
    Complete output (47 lines):
    Attempting to get version number from git...
    fatal: not a git repository (or any of the parent directories): .git
    Assume we are running from a source distribution.
    running install
    running build
    running build_py
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-_3se60gv/citeproc-py/setup.py", line 129, in <module>
        'Topic :: Software Development :: Libraries :: Python Modules',
      File "/tmp/test-rnc2rng/lib/python3.7/site-packages/setuptools/__init__.py", line 144, in setup
        return distutils.core.setup(**attrs)
      File "/usr/lib/python3.7/distutils/core.py", line 148, in setup
        dist.run_commands()
      File "/usr/lib/python3.7/distutils/dist.py", line 966, in run_commands
        self.run_command(cmd)
      File "/usr/lib/python3.7/distutils/dist.py", line 985, in run_command
        cmd_obj.run()
      File "/tmp/test-rnc2rng/lib/python3.7/site-packages/setuptools/command/install.py", line 61, in run
        return orig.install.run(self)
      File "/usr/lib/python3.7/distutils/command/install.py", line 589, in run
        self.run_command('build')
      File "/usr/lib/python3.7/distutils/cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "/usr/lib/python3.7/distutils/dist.py", line 985, in run_command
        cmd_obj.run()
      File "/usr/lib/python3.7/distutils/command/build.py", line 135, in run
        self.run_command(cmd_name)
      File "/usr/lib/python3.7/distutils/cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "/usr/lib/python3.7/distutils/dist.py", line 985, in run_command
        cmd_obj.run()
      File "/tmp/pip-install-_3se60gv/citeproc-py/setup.py", line 74, in run
        convert_rnc()
      File "/tmp/pip-install-_3se60gv/citeproc-py/setup.py", line 67, in convert_rnc
        root = rnc2rng.load(CSL_SCHEMA_RNC)
      File "/tmp/test-rnc2rng/lib/python3.7/site-packages/rnc2rng/__init__.py", line 4, in load
        return parser.parse(f=f)
      File "/tmp/test-rnc2rng/lib/python3.7/site-packages/rnc2rng/parser.py", line 709, in parse
        return parser.parse(lex(src), state=State(fn, src))
      File "/tmp/test-rnc2rng/lib/python3.7/site-packages/rply/parser.py", line 62, in parse
        self.error_handler(state, lookahead)
      File "/tmp/test-rnc2rng/lib/python3.7/site-packages/rnc2rng/parser.py", line 675, in error
        raise ParseError(t, s.fn, ln, col, line)
    rnc2rng.parser.ParseError: in citeproc/data/schema/csl.rnc [10:1]
    dc:title [ "Citation Style Language" ]
    ^
    ----------------------------------------
ERROR: Command errored out with exit status 1: /tmp/test-rnc2rng/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-_3se60gv/citeproc-py/setup.py'"'"'; __file__='"'"'/tmp/pip-install-_3se60gv/citeproc-py/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-t8o7ctfr/install-record.txt --single-version-externally-managed --compile --install-headers /tmp/test-rnc2rng/include/site/python3.7/citeproc-py Check the logs for full command output.

While trying to figure it out (since citeproc-py isn't a direct dependency for me), it seems that todays release of rnc2rng is the issue. One hint pointing at this: I could only reproduce it locally when I went with --no-cache-dir option for pip. Worked perfectly fine before.

bpoldrack avatar Apr 06 '20 14:04 bpoldrack

I was misguided by lack of release on github -- didn't realize that new rnc2rng was actually released (https://github.com/djc/rnc2rng/issues/27). Would need to figure out if bug is in citeproc or rnc2rng. Meanwhile could be mitigated by removing duecredit from dependencies -- it is very optional (gy -- I thought that this is datalad issue ;))

yarikoptic avatar Apr 06 '20 15:04 yarikoptic

FWIW, just pushed 0.5.1 release with e600cefe97e12c65fcfecedd5bad45f190ccf81e which blacklists 2.6.2 and also comes with a (then forgotten) .whl. I think this should mitigate installation problems for now. Proper fix is yet to be worked out. Also, strangely enough (yet to investiage) -- this run of python setup.py sdist did generate and included citeproc/data/schema/csl.rng, whenever the one I had uploaded for 0.5.0 didn't.

yarikoptic avatar Apr 06 '20 16:04 yarikoptic

That seems to work. Thanks much, @yarikoptic!

bpoldrack avatar Apr 07 '20 07:04 bpoldrack