conda-forge / rdkit-feedstock

A conda-smithy repository for rdkit.
BSD 3-Clause "New" or "Revised" License
8 stars 21 forks source link

Run `pip install` during the build to generate the `dist-info` folder and add support for rdkit-stubs #143

Closed hadim closed 7 months ago

hadim commented 7 months ago

Checklist

The goal of this PR is to correctly add a dist-info folder to the conda package in order for python to detect rdkit is installed when the installation is coming from conda. It prevents pip to override rdkit from conda whenever rdkit is a pip dep.

See the following tickets for context and history on this topic:

conda-forge-webservices[bot] commented 7 months ago

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.

hadim commented 7 months ago

@conda-forge-admin, please rerender

hadim commented 7 months ago

This is a bit hacky and this method won't work outside of building a conda package (like building a wheel for example) but it seems good enough for the benefits it brings without having to revisit the build process.

hadim commented 7 months ago

@conda-forge/rdkit ready for review - please let me know what you think.

I tested the package locally and it works well.

hadim commented 7 months ago

Thanks for the review Greg.

I don't have the permission to merge. Feel free to do so or wait for someone else review.

greglandrum commented 7 months ago

@jaimergp do you have an opinion on this one or should we just go ahead and merge?

hadim commented 7 months ago

The latest commits bring the fix to the windows package as well, and also add a test that will fail if the .dist-info folder does not exist (see run_test.py).

Even if 2023_09_3 does not ship rdkit-stubs yet, I added the required bytes to correctly build and package it in that PR (tested on latest main from rdkit).

Once 2023_09_4 is out, everything should work out-of-the-box.

@greglandrum : would you be ok merging here? and in case anything goes wrong, I will fix it quick (but I am fairly confident we're good here).

greglandrum commented 7 months ago

@greglandrum : would you be ok merging here? and in case anything goes wrong, I will fix it quick (but I am fairly confident we're good here).

Yep, looks fine.

Re: rdkit-stubs, I forgot to cherry-pick that PR onto the release branch, so it didn't end up in 2023.09.3. It will be in 2023.09.4 with some improvements that Paolo is working on now.