Skip to content

Wheels should also provide RDKit header files #142

@pechersky

Description

@pechersky

We could provide the header files from Code/RDGeneral. This would facilitate reuse for downstream libraries that would like to build on top of rdkit, like https://github.com/NVIDIA-Digital-Bio/nvMolKit (see their usage here).

Code change would go here

rdkit-pypi/setup.py

Lines 420 to 446 in f148f95

# RDKit stubs directory
dir_rdkit_stubs = path_site_packages / "rdkit-stubs"
# Data directory
rdkit_data_path = rdkit_install_path / "share" / "RDKit" / "Data"
# Contrib directory
rdkit_contrib_path = rdkit_install_path / "share" / "RDKit" / "Contrib"
# Setuptools searches at this path for files to include
wheel_path = Path(self.get_ext_fullpath(ext.name)).absolute().parent
wheel_path.mkdir(exist_ok=True)
# Copy RDMKit files to .../rdkit directory
def _logpath(path, names):
ignore_patterns
print(f"In directory {path} copy files: {names}", file=sys.stderr)
return ignore_patterns("*.pyc")(path, names)
# Copy the RDKit stubs files to the rdkit-stubs wheels path
copytree(dir_rdkit_stubs, wheel_path / "rdkit-stubs", ignore=_logpath)
# Copy the Python files
copytree(path_site_packages / "rdkit", wheel_path / "rdkit", ignore=_logpath)
# Copy the data directory
copytree(rdkit_data_path, wheel_path / "rdkit" / "Data", ignore=_logpath)
# Copy the contrib directory
copytree(rdkit_contrib_path, wheel_path / "rdkit" / "Contrib", ignore=_logpath)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions