Re: python-mkdocs new dependancy
Piotr Ożarowski writes: > dh_python* is checking usr/share/mkdocs-bootstrap by default (among > other dirs). If you want it to check usr/share/mkdocs as well, you have > to point it to, f.e. like this: > > override_dh_python3: > dh_python3 -N mkdocs-bootstrap > dh_python3 -p mkdocs-bootstrap /usr/share/mkdocs/themes/ Ok, done. Thanks for your help. -- Brian May
Re: python-mkdocs new dependancy
[Brian May, 2016-05-10] > Brian May writes: > > >> export PYBUILD_INSTALL_ARGS=--install-lib=/usr/share/mkdocs/themes/ > > > > Was hoping to avoid the need to add /usr/share/mkdocs/themes to the > > sys.path. > > This results in the following lintian warning: > > E: mkdocs-bootstrap: package-installs-python-pycache-dir > usr/share/mkdocs/themes/mkdocs_bootstrap/__pycache__/ dh_python* is checking usr/share/mkdocs-bootstrap by default (among other dirs). If you want it to check usr/share/mkdocs as well, you have to point it to, f.e. like this: override_dh_python3: dh_python3 -N mkdocs-bootstrap dh_python3 -p mkdocs-bootstrap /usr/share/mkdocs/themes/ -- Piotr Ożarowski Debian GNU/Linux Developer www.ozarowski.pl www.griffith.cc www.debian.org GPG Fingerprint: 1D2F A898 58DA AF62 1786 2DF7 AEF6 F1A2 A745 7645
Re: python-mkdocs new dependancy
Brian May writes: >> export PYBUILD_INSTALL_ARGS=--install-lib=/usr/share/mkdocs/themes/ > > Was hoping to avoid the need to add /usr/share/mkdocs/themes to the > sys.path. This results in the following lintian warning: E: mkdocs-bootstrap: package-installs-python-pycache-dir usr/share/mkdocs/themes/mkdocs_bootstrap/__pycache__/ I think yes we do need this because of __init__.py even though it is 0 bytes. mkdocs uses __init__.py to find the location of the directory. Should I ignore/override this lintian error? -- Brian May
Re: python-mkdocs new dependancy
Piotr Ożarowski writes: > * please use --install-lib instead of moving files after dh_python3. > Moving files once dh_python{2,3} creates hooks to bytecompile py files > is not really a good idea. > > export PYBUILD_INSTALL_ARGS=--install-lib=/usr/share/mkdocs/themes/ Was hoping to avoid the need to add /usr/share/mkdocs/themes to the sys.path. However, this in hindsight probably would result in a much simpler patch to mkdocs; and as a result a much better solution. > * PYBUILD_NAME doesn't really make sense if you don't have python- or > python3- binary packages > * s/Suggests: mkdocs/Enhances: mkdocs/ > * s/Description: B/Description: b/ Thanks for the suggestions. At the moment the theme packages are stuck in NEW, however if the packages get approved I will make these changes before uploading mkdocs. -- Brian May
Re: python-mkdocs new dependancy
[Brian May, 2016-05-02] > Dmitry Shachnev writes: > > > Your plan LGTM, though I would still use setup.py to install the themes > > (with passing appropriate --install-lib), to make sure that the egg-info > > directory (with entry points declarations) is still installed. > > > > And then patch mkdocs to add /usr/share/mkdocs/themes to sys.path like > > Piotr suggested. > > I have a test version of the packages available: > > https://linuxpenguins.xyz/debian/pool/main/m/mkdocs-bootstrap/ * please use --install-lib instead of moving files after dh_python3. Moving files once dh_python{2,3} creates hooks to bytecompile py files is not really a good idea. export PYBUILD_INSTALL_ARGS=--install-lib=/usr/share/mkdocs/themes/ * PYBUILD_NAME doesn't really make sense if you don't have python- or python3- binary packages * s/Suggests: mkdocs/Enhances: mkdocs/ * s/Description: B/Description: b/ -- Piotr Ożarowski Debian GNU/Linux Developer www.ozarowski.pl www.griffith.cc www.debian.org GPG Fingerprint: 1D2F A898 58DA AF62 1786 2DF7 AEF6 F1A2 A745 7645
Re: python-mkdocs new dependancy
Dmitry Shachnev writes: > Your plan LGTM, though I would still use setup.py to install the themes > (with passing appropriate --install-lib), to make sure that the egg-info > directory (with entry points declarations) is still installed. > > And then patch mkdocs to add /usr/share/mkdocs/themes to sys.path like > Piotr suggested. I have a test version of the packages available: https://linuxpenguins.xyz/debian/pool/main/m/mkdocs-bootstrap/ https://linuxpenguins.xyz/debian/pool/main/m/mkdocs-bootswatch/ https://linuxpenguins.xyz/debian/pool/main/p/python-mkdocs/ Just noticed I should have referenced #820783 in the changelog for python-mkdocs. I haven't yet created git repositories for mkdocs-* in collab-maint - just trying to work out how to do this. Or do I just type "git init --bare" and fix the permissions manually? -- Brian May
Re: python-mkdocs new dependancy
Hi Brian, On Sat, Apr 23, 2016 at 06:16:19PM +1000, Brian May wrote: > So I think it is probably a good idea to have three seperate Debian > source packages and three seperate binary packages. > > It looks like both mkdocs-bootswatch and mkdocs-bootstrap contain > non-Python code. > > So instead of installing these using pybuild/setup.py I could install > them in /usr/share/mkdocs/themes/mkdocs-bootswatch and > /usr/share/mkdocs/themes/mkdocs-bootstrap instead. > > Then I need to patch mkdocs to look for files in this directory instead > of using Python's setuptools mechanism. > > Does this match what you are thinking? Your plan LGTM, though I would still use setup.py to install the themes (with passing appropriate --install-lib), to make sure that the egg-info directory (with entry points declarations) is still installed. And then patch mkdocs to add /usr/share/mkdocs/themes to sys.path like Piotr suggested. -- Dmitry Shachnev signature.asc Description: PGP signature
Re: python-mkdocs new dependancy
Piotr Ożarowski writes: > [Brian May, 2016-04-18] >> Sorry, I don't quite understand. How will this help with the fact that >> mkdocs-bootswatch is listed as a requirement, but we don't have >> mkdocs-bootswatch in Debian? > > FTR: using not packaged version of mkdocs-bootswatch is not an option, > but that's obvious, right? Sorry, still not clear what you intend me to do. I notice that the three packages have different release cycles. mkdocs 0.15.1 mkdocs-bootswatch 0.1.0 mkdocs-bootstrap 0.1.1 So I think it is probably a good idea to have three seperate Debian source packages and three seperate binary packages. It looks like both mkdocs-bootswatch and mkdocs-bootstrap contain non-Python code. So instead of installing these using pybuild/setup.py I could install them in /usr/share/mkdocs/themes/mkdocs-bootswatch and /usr/share/mkdocs/themes/mkdocs-bootstrap instead. Then I need to patch mkdocs to look for files in this directory instead of using Python's setuptools mechanism. Does this match what you are thinking? -- Brian May
Re: python-mkdocs new dependancy
[Brian May, 2016-04-18] > Sorry, I don't quite understand. How will this help with the fact that > mkdocs-bootswatch is listed as a requirement, but we don't have > mkdocs-bootswatch in Debian? FTR: using not packaged version of mkdocs-bootswatch is not an option, but that's obvious, right?
Re: python-mkdocs new dependancy
[Brian May, 2016-04-18] > >> What is the appropriate fix? Should I create a new mkdocs-bootswatch > > > > I moved all themes to /usr/share in python-pastescript and it works > > Sorry, I don't quite understand. How will this help with the fact that > mkdocs-bootswatch is listed as a requirement, but we don't have > mkdocs-bootswatch in Debian? > > Just noticed, that same problem exists for mkdocs-bootstrap too. if you move themes to /usr/share/mkdocs/themes and patch /usr/bin/mkdocs to add this dir to sys.path (and there's no other entry point), even those themes that use pkg_requires will continue to work -- Piotr Ożarowski Debian GNU/Linux Developer www.ozarowski.pl www.griffith.cc www.debian.org GPG Fingerprint: 1D2F A898 58DA AF62 1786 2DF7 AEF6 F1A2 A745 7645
Re: python-mkdocs new dependancy
Piotr Ożarowski writes: >> What is the appropriate fix? Should I create a new mkdocs-bootswatch > > I moved all themes to /usr/share in python-pastescript and it works Sorry, I don't quite understand. How will this help with the fact that mkdocs-bootswatch is listed as a requirement, but we don't have mkdocs-bootswatch in Debian? Just noticed, that same problem exists for mkdocs-bootstrap too. -- Brian May
Re: python-mkdocs new dependancy
[Brian May, 2016-04-12] > When building python-mkdocs from git source I get this error: > > LANG=C.UTF-8 PYTHONPATH=. ./debian/scripts/mkdocs build > Traceback (most recent call last): > File "./debian/scripts/mkdocs", line 7, in > from mkdocs.__main__ import cli > File "/<>/mkdocs/__main__.py", line 77, in > theme_choices = utils.get_theme_names() I suggest to patch this one to search for themes in /usr/share/mkdocs/ (I just reported a bug asking to move files there) > File "/<>/mkdocs/utils/__init__.py", line 382, in > get_theme_names > return get_themes().keys() > File "/<>/mkdocs/utils/__init__.py", line 374, in get_themes > for name, theme in themes.items()) > File "/<>/mkdocs/utils/__init__.py", line 374, in > for name, theme in themes.items()) > File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2201, > in load > self.require(*args, **kwargs) > File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2218, > in require > items = working_set.resolve(reqs, env, installer) > File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 830, > in resolve > raise DistributionNotFound(req, requirers) > pkg_resources.DistributionNotFound: The 'mkdocs-bootswatch>=0.1.0' > distribution was not found and is required by the application > debian/rules:12: recipe for target 'override_dh_auto_build' failed > > The python-mkdocs-bootswatch package is distributed as a python module > but doesn't contain python code. It appears to contain HTML and CSS > themes for mkdocs. > > What is the appropriate fix? Should I create a new mkdocs-bootswatch I moved all themes to /usr/share in python-pastescript and it works > package? Or should I try to somehow incooporate it into the > python-mkdocs package (not sure pybuild/git-dpm supports this?) dpkg-source supports this (multiple tarballs) and so does pybuild (multiple calls with different --dir) but I suggest to simply patch utils.get_theme_names and move .png/.js/... out of dist-packages -- Piotr Ożarowski Debian GNU/Linux Developer www.ozarowski.pl www.griffith.cc www.debian.org GPG Fingerprint: 1D2F A898 58DA AF62 1786 2DF7 AEF6 F1A2 A745 7645