python-validators / validators

Python Data Validation for Humans™.
MIT License
977 stars 155 forks source link

0.18.1: build_sphinx setuptools target fails #193

Closed kloczek closed 1 year ago

kloczek commented 3 years ago

Looks like it is used sphinx.ext.pngmath extension which mo longer exist.

+ /usr/bin/python3 setup.py build_sphinx -b man
/usr/lib64/python3.8/distutils/dist.py:274: UserWarning: Unknown distribution option: 'build_requires'
  warnings.warn(msg)
running build_sphinx
Running Sphinx v4.0.2

Extension error:
Could not import extension sphinx.ext.pngmath (exception: No module named 'sphinx.ext.pngmath')

I had recently simillar issi with cython https://github.com/cython/cython/issues/4209

kloczek commented 2 years ago

This issue can be fixed using below patch

--- a/docs/conf.py~     2021-06-11 13:40:10.000000000 +0100
+++ b/docs/conf.py      2021-06-11 13:41:09.393084207 +0100
@@ -35,7 +35,7 @@
     'sphinx.ext.intersphinx',
     'sphinx.ext.todo',
     'sphinx.ext.coverage',
-    'sphinx.ext.pngmath',
+    'sphinx.ext.imgmath',
     'sphinx.ext.mathjax',
     'sphinx.ext.ifconfig',
     'sphinx.ext.viewcode',

Please let me know if you want that as PR.

kloczek commented 2 years ago

With that patch sphinx shows some warnings

+ /usr/bin/python3 setup.py build_sphinx -b man --build-dir build/sphinx
/usr/lib/python3.8/site-packages/setuptools/_distutils/dist.py:275: UserWarning: Unknown distribution option: 'build_requires'
  warnings.warn(msg)
running build_sphinx
Running Sphinx v4.3.2
making output directory... done
WARNING: html_static_path entry '_static' does not exist
loading intersphinx inventory from http://docs.python.org/objects.inv...
intersphinx inventory has moved: http://docs.python.org/objects.inv -> https://docs.python.org/3/objects.inv
building [mo]: targets for 0 po files that are out of date
building [man]: all manpages
updating environment: [new config] 1 added, 0 changed, 0 removed
reading sources... [100%] index
/home/tkloczko/rpmbuild/BUILD/validators-0.18.1/docs/index.rst:74: WARNING: Title underline too short.

btc_address
------
/home/tkloczko/rpmbuild/BUILD/validators-0.18.1/docs/index.rst:74: WARNING: Title underline too short.

btc_address
------
/home/tkloczko/rpmbuild/BUILD/validators-0.18.1/docs/index.rst:146: WARNING: duplicate object description of validators.hashes, other instance in index, use :noindex: for one of them
/home/tkloczko/rpmbuild/BUILD/validators-0.18.1/docs/index.rst:154: WARNING: duplicate object description of validators.hashes, other instance in index, use :noindex: for one of them
/home/tkloczko/rpmbuild/BUILD/validators-0.18.1/docs/index.rst:162: WARNING: duplicate object description of validators.hashes, other instance in index, use :noindex: for one of them
/home/tkloczko/rpmbuild/BUILD/validators-0.18.1/docs/index.rst:170: WARNING: duplicate object description of validators.hashes, other instance in index, use :noindex: for one of them
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
writing... python-validators.3 { } done
build succeeded, 7 warnings.
yozachar commented 1 year ago

related: #156