squidfunk / mkdocs-material

Documentation that simply works
https://squidfunk.github.io/mkdocs-material/
MIT License
20.64k stars 3.51k forks source link

When doing environment setup, install mkdocs-redirects mentions missing testresources #3211

Closed SchulteMarkus closed 2 years ago

SchulteMarkus commented 2 years ago

Contribution guidelines

I've found a bug and checked that ...

Description

I am following your guide to develop mkdocs on my own as described on https://squidfunk.github.io/mkdocs-material/customization/#environment-setup.

When doing

pip install mkdocs-redirects

a missing dependency is reported

ERROR: launchpadlib 1.10.13 requires testresources, which is not installed.

Seems not to effect mkdocs development, though.

Possible fix

Adding testresources>=2 to requirements.txt seems to fix the issue. But I am not a Pyhton dev, maybe there is a better way.

diff --git a/requirements.txt b/requirements.txt
--- a/requirements.txt  (revision 38e001313ab79b2d65f7755491022243867572c8)
+++ b/requirements.txt  (date 1636705522861)
@@ -19,6 +19,7 @@
 # IN THE SOFTWARE.

 # Direct dependencies
+testresources>=2
 jinja2>=2.11.1
 markdown>=3.2
 mkdocs>=1.2.3

Expected behaviour

pip install mkdocs-redirects

works without any issue

Actual behaviour

pip install mkdocs-redirects
Processing /home/<username>/.cache/pip/wheels/6f/bd/d7/ac1c4dcaf7c68ef41421c3f7557bc4f479513e76664e320337/mkdocs_redirects-1.0.3-py3-none-any.whl
Requirement already satisfied: mkdocs<2,>=1.0.4 in /home/<username>/.local/lib/python3.8/site-packages (from mkdocs-redirects) (1.2.3)
Collecting six<2,>=1.15.0
  Using cached six-1.16.0-py2.py3-none-any.whl (11 kB)
[...]
Requirement already satisfied: MarkupSafe>=2.0 in /home/<username>/.local/lib/python3.8/site-packages (from Jinja2>=2.10.1->mkdocs<2,>=1.0.4->mkdocs-redirects) (2.0.1)
ERROR: launchpadlib 1.10.13 requires testresources, which is not installed. # <-------------------------------
Installing collected packages: six, mkdocs-redirects
Successfully installed mkdocs-redirects-1.0.3 six-1.16.0

Steps to reproduce

Follow these steps on a clean system. In special, delete (local) Python cashes.

# from https://squidfunk.github.io/mkdocs-material/customization/#environment-setup
cd mkdocs-material
pip install -r requirements.txt
pip install mkdocs-minify-plugin
pip install mkdocs-redirects

Package versions

$ git log -n 1
commit 38e001313ab79b2d65f7755491022243867572c8 (HEAD -> master, origin/master, origin/HEAD)
Author: Markus Schulte <markusschulte.work@gmail.com>
Date:   Wed Nov 10 17:02:02 2021 +0100
[...]
$ mkdocs --version
mkdocs, version 1.2.3 from /home/<username>/.local/lib/python3.8/site-packages/mkdocs (Python 3.8)
$ python3 --version
Python 3.8.10
$ pip --version
pip 20.0.2 from /usr/lib/python3/dist-packages/pip (python 3.8)
$ node --version
v16.13.0
$ npm --version
8.1.0

Configuration

No configuration as developing mkdocs itself

System information

OS: Linux Mint 20.2 (based on Ubuntu 20.04)

squidfunk commented 2 years ago

Thanks for reporting.

pip install mkdocs-redirects

This is not related to Material for MkDocs but mkdocs-redirects. Please report this issue upstream.

SchulteMarkus commented 2 years ago

I reported to mkdocs-redirects here: https://github.com/datarobot/mkdocs-redirects/issues/31