Comments (5)
FWIW, I was able to get sphinx-wavedrom
to install, and the example to compile on Windows 10 with the following patch:
diff --git a/example/source/conf.py b/example/source/conf.py
index bb235e9..4566cf1 100644
--- a/example/source/conf.py
+++ b/example/source/conf.py
@@ -61,7 +61,7 @@ release = '1.0'
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
-language = None
+language = 'en'
# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
diff --git a/setup.py b/setup.py
index 722ff18..faf9a30 100644
--- a/setup.py
+++ b/setup.py
@@ -4,8 +4,7 @@ project_url = 'https://github.com/bavovanachte/sphinx-wavedrom'
requires = ['Sphinx>=1.8',
'wavedrom>=1.9.0rc1',
- 'cairosvg>=2;python_version>="3.3"',
- 'xcffib;python_version>="3.3"']
+ 'cairosvg>=2;python_version>="3.3"',]
setup(
name='sphinxcontrib-wavedrom',
Tyvm @whitequark for pointing out that xcffib
is a top-level dep that's not used for e.g. HTML generation. Could PDF generation become an optional feature (disabled on Windows) as an interim solution?
from sphinx-wavedrom.
Not entirely sure, looks like it was added in d6067be.
@wallento (the author of that PR) probably knows. Maybe some missing downstream dependencies?
from sphinx-wavedrom.
What I see:
- sphinx-wavedrom depends (code import) on cairosvg
- cairosvg depends on cairocffi
- cairocffi provides an optional xcb dep and
xcb
module which requires xcffib - the
xcb
module is not used used (code import) by cairosvg
from sphinx-wavedrom.
I also ran into issues with the xcffib
dep today while building documentation for a LiteX SoC:
Generate the documentation by running `sphinx-build -M html C:/msys64/home/William/Projects/FPGA/litex/SoCs/orangecrab-feather/build/gsd_orangecrab/doc/ C:/msys64/home/William/Projects/FPGA/litex/SoCs/orangecrab-feather/build/gsd_orangecrab/doc/_build`
identifier_mem@f0003000: Found memory that's 8 x 59 (but memories aren't documented yet)
Running Sphinx v4.3.2
Exception occurred:
File "C:/msys64/mingw64/lib/python3.9/site-packages/xcffib/__init__.py", line 38, in <module>
lib = ffi.dlopen(soname)
OSError: cannot load library 'libxcb.dll': error 0x7e
The full traceback has been saved in C:/Users/William/AppData/Local/Temp/sphinx-err-uojq8_rl.log, if you want to report the issue to the developers.
Please also report this if it was a user error, so that a better error message can be provided next time.
A bug report can be filed in the tracker at <https://github.com/sphinx-doc/sphinx/issues>. Thanks!
I've provided the log as well:
# Sphinx version: 4.3.2
# Python version: 3.9.10 (CPython)
# Docutils version: 0.18.1 release
# Jinja2 version: 3.0.3
# Last messages:
# Loaded extensions:
Traceback (most recent call last):
File "C:/msys64/mingw64/lib/python3.9/site-packages/sphinx/cmd/build.py", line 276, in build_main
app = Sphinx(args.sourcedir, args.confdir, args.outputdir,
File "C:/msys64/mingw64/lib/python3.9/site-packages/sphinx/application.py", line 237, in __init__
self.setup_extension(extension)
File "C:/msys64/mingw64/lib/python3.9/site-packages/sphinx/application.py", line 394, in setup_extension
self.registry.load_extension(self, extname)
File "C:/msys64/mingw64/lib/python3.9/site-packages/sphinx/registry.py", line 429, in load_extension
mod = import_module(extname)
File "C:/msys64/mingw64/lib/python3.9/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 850, in exec_module
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "C:/msys64/mingw64/lib/python3.9/site-packages/sphinxcontrib/wavedrom.py", line 15, in <module>
from .wavedrom_render_image import render_wavedrom_image
File "C:/msys64/mingw64/lib/python3.9/site-packages/sphinxcontrib/wavedrom_render_image.py", line 6, in <module>
import cairosvg
File "C:/msys64/mingw64/lib/python3.9/site-packages/cairosvg/__init__.py", line 26, in <module>
from . import surface # noqa isort:skip
File "C:/msys64/mingw64/lib/python3.9/site-packages/cairosvg/surface.py", line 9, in <module>
import cairocffi as cairo
File "C:/msys64/mingw64/lib/python3.9/site-packages/cairocffi/__init__.py", line 125, in <module>
from .xcb import XCBSurface # noqa isort:skip
File "C:/msys64/mingw64/lib/python3.9/site-packages/cairocffi/xcb.py", line 11, in <module>
from xcffib import visualtype_to_c_struct
File "C:/msys64/mingw64/lib/python3.9/site-packages/xcffib/__init__.py", line 38, in <module>
lib = ffi.dlopen(soname)
OSError: cannot load library 'libxcb.dll': error 0x7e
Seeing that I'm running Windows, libxcb.dll
is unlikely to exist I imagine. So this error is expected. But it does mean I can't generate documentation for LiteX SoCs now (tbf, I'm not sure if doc generation ever worked on Windows, but it's been over a year since I touched my code and am refreshing it).
from sphinx-wavedrom.
It seems I need to take a look at some alternatives to cairosvg, as well as set up testing on windows machines. Adding "help wanted" as I have a feeling this will be hard to reproduce.
from sphinx-wavedrom.
Related Issues (20)
- Make the wavedrom link configurable HOT 10
- Support for bit fields HOT 4
- Followup of #12: Fix wavedrom build in CI HOT 1
- No tag with id="pmx" found HOT 3
- Graph is not drawing without name HOT 2
- Unable to install: Issues in installing cairo dependency HOT 4
- Plugin does not work in combination with hieroglyph HOT 2
- Latest Wavedrom release (v2.0.0) broken with Sphinx v3.0 HOT 6
- Can you adjust the scale of live-rendered waveforms? HOT 7
- Add support for the wavedrom CLI HOT 8
- Consider adding the sphinx-extension GitHub topic HOT 1
- Release HOT 2
- Fall back to wavedrompy, or give more helpful error message HOT 4
- Python3.10 issue: ImportError: cannot import name 'Mapping' from 'collections' HOT 8
- Can this extension be marked parallel read and/or write safe? HOT 4
- wavedrom not working with make latexpdf HOT 6
- Relative paths for wavedrom-cli HOT 2
- Feature request - support .yaml files as well as .json files for input HOT 2
- Projects with sphinxcontrib.wavedrom extension fail to build on Mac with M2 chip HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sphinx-wavedrom.