Skip to content

Commit

Permalink
Compile Cairo from scratch for all Linux builds (#33)
Browse files Browse the repository at this point in the history
* Compile cairo from source

* Add a test

* Append .1 to RDKit version for PyPi

* Ooopsi
  • Loading branch information
kuelumbus authored Mar 9, 2022
1 parent 0528d4a commit a840605
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
10 changes: 9 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,15 @@ test-command = "pytest --exitfirst --verbose --failed-first {package}/tests"
before-all = [
# Has eigen3-devel.aarch64
"yum install -y epel-release",
"yum install -y wget freetype-devel zlib-devel libpng12-devel pixman-devel eigen3-devel cairo-devel",
"yum install -y wget freetype-devel libpng12-devel pixman-devel zlib-devel eigen3-devel",
# cairo-devel from the centos repo does not work, build here
"wget https://www.cairographics.org/snapshots/cairo-1.15.14.tar.xz --no-check-certificate",
"tar xvf cairo-*",
"cd cairo-*",
"./configure",
"make -j 20",
"make install",
"cd ..",
]

repair-wheel-command = [
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ def to_win_path(pt: Path):

setup(
name="rdkit-pypi",
version=rdkit_tag.replace("Release_", "").replace("_", "."),
version=rdkit_tag.replace("Release_", "").replace("_", ".") + ".1",
description="A collection of chemoinformatics and machine-learning software written in C++ and Python",
author="Christopher Kuenneth",
author_email="[email protected]",
Expand Down
5 changes: 5 additions & 0 deletions tests/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,8 @@ def test_data_dir_and_chemical_features():
m = Chem.MolFromSmiles("OCc1ccccc1CN")
feats = factory.GetFeaturesForMol(m)
assert len(feats) == 8


def test_rdkit_chem_draw_import():
# This segfaults if the compiled cairo version from centos is used
from rdkit.Chem.Draw import ReactionToImage

0 comments on commit a840605

Please sign in to comment.