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

svgcheck installation with python 3.11 #358

Closed
chris-wood opened this issue Dec 29, 2022 · 5 comments
Closed

svgcheck installation with python 3.11 #358

chris-wood opened this issue Dec 29, 2022 · 5 comments

Comments

@chris-wood
Copy link

chris-wood commented Dec 29, 2022

On macOS, the default svgcheck installation step seems to always fail. I work around it by removing this from the set of requirements in requirements.txt, but there's probably a better fix. The error I see is below.

$ make
Makefile:2: lib/main.mk: No such file or directory
git clone -q --depth 10  \
	    -b main https://github.com/martinthomson/i-d-template lib
python3 -m venv /Users/caw/docs/draft-foobar/lib/.venv
/Users/caw/docs/draft-foobar/lib/.venv/bin/python -m pip install --upgrade pip setuptools wheel
Requirement already satisfied: pip in ./lib/.venv/lib/python3.11/site-packages (22.3)
Collecting pip
  Using cached pip-22.3.1-py3-none-any.whl (2.1 MB)
Requirement already satisfied: setuptools in ./lib/.venv/lib/python3.11/site-packages (65.5.0)
Collecting setuptools
  Using cached setuptools-65.6.3-py3-none-any.whl (1.2 MB)
Collecting wheel
  Using cached wheel-0.38.4-py3-none-any.whl (36 kB)
Installing collected packages: wheel, setuptools, pip
  Attempting uninstall: setuptools
    Found existing installation: setuptools 65.5.0
    Uninstalling setuptools-65.5.0:
      Successfully uninstalled setuptools-65.5.0
  Attempting uninstall: pip
    Found existing installation: pip 22.3
    Uninstalling pip-22.3:
      Successfully uninstalled pip-22.3
Successfully installed pip-22.3.1 setuptools-65.6.3 wheel-0.38.4
/Users/caw/docs/draft-foobar/lib/.venv/bin/pip install -r lib/requirements.txt
Collecting archive-repo
  Using cached archive_repo-0.0.2-py3-none-any.whl (10 kB)
Collecting iddiff
  Using cached iddiff-0.4.2-py3-none-any.whl
Collecting pyang
  Using cached pyang-2.5.3-py2.py3-none-any.whl (592 kB)
Collecting pyyaml
  Using cached PyYAML-6.0-cp311-cp311-macosx_10_9_x86_64.whl (188 kB)
Collecting rfc-tidy
  Using cached rfc_tidy-0.1.1-py3-none-any.whl (4.0 kB)
Collecting svgcheck
  Using cached svgcheck-0.6.0.tar.gz (18 kB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error
  
  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [11 lines of output]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/private/var/folders/pj/r0zjp32n0z5cnf8lr4ssy26r0000gn/T/pip-install-ixxd3qqu/svgcheck_ed96d10110754b779f47dc755a6c34bd/setup.py", line 65, in <module>
          """ + "\n".join([ changelog_entry_template % entry for entry in parse("changelog")[:3] ])
                                                                          ^^^^^^^^^^^^^^^^^^
        File "/private/var/folders/pj/r0zjp32n0z5cnf8lr4ssy26r0000gn/T/pip-install-ixxd3qqu/svgcheck_ed96d10110754b779f47dc755a6c34bd/setup.py", line 32, in parse
          changelog = open(changelog, mode='rU', encoding='utf-8')
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "<frozen codecs>", line 905, in open
      ValueError: invalid mode: 'rUb'
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
@martinthomson martinthomson transferred this issue from martinthomson/internet-draft-template Jan 3, 2023
@martinthomson
Copy link
Owner

Hey @chris-wood, this is somewhat out of my hands, but I've passed it on to svgcheck with ietf-tools/svgcheck#23 . The problem seems to be down to some package using some pre-python3 syntax. I can't tell which package that is from the output you've provided and I'm not in a position to install python 3.11 right now. I'll leave this open to track that.

@martinthomson martinthomson changed the title svgcheck installation svgcheck installation with python 3.11 Jan 3, 2023
@nedmsmith
Copy link

I removed svgcheck from requirements.txt as was suggested above. Is there a (manual?) solution for building svgcheck?

@martinthomson
Copy link
Owner

@chris-wood @nedmsmith apparently the latest version of svgcheck has been updated. When you next get a chance, could you try again?

@nedmsmith
Copy link

@chris-wood I'm able to install svgcheck now. Thanks.

@martinthomson
Copy link
Owner

Thanks. Closing this on that basis.

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

3 participants