vzhong / mkdocs_pug

Use pug templates with your mkdocs template
0 stars 0 forks source link

Installation is broken in nonstandard destination: requirements.txt not found #1

Open oprypin opened 2 years ago

oprypin commented 2 years ago
$ pip install -U --no-deps --target mkdocs-pug mkdocs-pug 
Collecting mkdocs-pug
  Using cached mkdocs_pug-0.0.2.tar.gz (3.7 kB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [10 lines of output]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/tmp/pip-install-9t3sdcmp/mkdocs-pug_c26e99a678794ab29e9733c49e99d38a/setup.py", line 75, in <module>
          install_requires=parse_requirements(frequirement),
        File "/tmp/pip-install-9t3sdcmp/mkdocs-pug_c26e99a678794ab29e9733c49e99d38a/setup.py", line 17, in parse_requirements
          lineiter = (line.strip() for line in open(filename))
        File "/usr/lib/python3.10/codecs.py", line 905, in open
          file = builtins.open(filename, mode, buffering)
      FileNotFoundError: [Errno 2] No such file or directory: '/tmp/pip-install-9t3sdcmp/mkdocs-pug_c26e99a678794ab29e9733c49e99d38a/requirements.txt'
      [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.
oprypin commented 2 years ago

https://github.com/vzhong/mkdocs_pug/blob/4c67f26d726b42eda0a9089139329f1170f4e460/setup.py#L11-L18

It should be done like this instead; this code has been working very well for everyone:

https://github.com/squidfunk/mkdocs-material/blob/cccc21431e8e986a6d51aaba6a212db231a5eb09/setup.py#L29-L33