camelot-dev / camelot-dev/camelot

On license compatibility

Open
#233 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
3.8k
Forks
546
Avg merge
3d 17h
Merged PRs (30d)
3

Description

Camelot uses [ghostscript](https://pypi.org/project/ghostscript/) (a GPLv3 licensed project, which is a wrapper on top of [ghostscript](https://www.ghostscript.com/), an AGPL licensed project) to convert PDFs to PNGs in order to do line recognition and table detection in the [Lattice flavor](https://camelot-py.readthedocs.io/en/master/user/how-it-works.html#lattice). Back when Camelot was created, we used `ghostscript` because it was the best solution out there for converting a PDF to a PNG, and we didn't know about how Camelot's license (MIT) is incompatible with `ghostscript`'s license (GPL and AGPL). Since then I've read that if you extend/use a GPL licensed project, you have to release the thing you build with the GPL license too. I want to get some clarity of where the distinction lies wrt Camelot, and if we need to relicense Camelot with the GPL license, or if there's something we can do (like calling `ghostscript` using the CLI and not import its code inside Camelot) to avoid relicensing. Right now the `ghostscript` wrapper is [distributed with Camelot](https://github.com/camelot-dev/camelot/tree/master/camelot/ext/ghostscript).

Since `ghostscript` (not the wrapper) has [been a pain to install for users](https://www.google.com/search?q=camelot+ghostscript+not+installed&sxsrf=ALeKk00SnxWPT4uVoT0vhn7UmqqnL4btEA%3A1617546893790&ei=jc5pYIbmL8GH8QPegKtQ&oq=camelot+ghostscript+not+installed&gs_lcp=Cgdnd3Mtd2l6EAMyBwgAEEcQsAMyBwgAEEcQsAMyBwgAEEcQsAMyBwgAEEcQsAMyBwgAEEcQsAMyBwgAEEcQsAMyBwgAEEcQsAMyBwgAEEcQsANQsh5Ysh5giCBoAXACeACAAY0CiAGNApIBAzItMZgBAKABAaoBB2d3cy13aXrIAQjAAQE&sclient=gws-wiz&ved=0ahUKEwjG4Ivg5-TvAhXBQ3wKHV7ACgoQ4dUDCA0&uact=5), I worked on [pdftopng](https://github.com/vinayak-mehta/pdftopng) some months ago, which is a wrapper on top of [poppler](https://github.com/freedesktop/poppler) a PDF rendering library written in C++. It has pre-built wheels for all major operating systems which should make installation as easy as a `pip install`. But `poppler` and therefore `pdftopng` is GPLv2 licensed, so I also want to get some clarity on what would be the best way to integrate it with Camelot, and remove `ghostscript` as a dependency / make `ghostscript` optional.

This has been a mental roadblock (apart from not getting enough free time) that has prevented me from spending a lot of time here, but I want to change that. It would also be awesome if other people want to help with maintenance. If you're interested we can [chat on Gitter](https://gitter.im/camelot-dev/Lobby)!

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reviewing camelot/ext/ghostscript and the Lattice flavor documentation, then examine the proposed pdftopng/poppler integration and dependency packaging. Done requires a documented licensing and architecture decision, plus an agreed path for replacing or making ghostscript optional.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.