Sublime Forum

Python Dependencies

#1

I’ve been working on a simple plugin to preview reStructuredText files as HTML. It generally works quite well, however it requires the python package docutils. I originally attempted to bundle docutils in the plugin source, by just copying it over, however this lead to strange import errors and eventually gave up. So at the moment users are expected to set it up themselves, this is almost fine but depending on the setup and familiarity with Python its fairly complex.

Are there any best practices for requiring external packages?

Thanks!

( For the curious, more details can be read about this here in a github issue where I outlines the problem: github.com/d0ugal/RstPreview/issues/7 )

0 Likes

#2

I think this is a related discussion. It’s about how external packages/modules should be handled, used by different plugins and probably in different versions.

0 Likes

#3

Thanks - that is quite an interesting discussion. Unfortunately it doesn’t help. The problem I seem to have is that docutils doesn’t like being bundled in the plugin, I suspect because its not a pure Python lib.

0 Likes