Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 20 commits into from
Dec 9, 2023

Conversation

hadim
Copy link
Member

@hadim hadim commented Dec 4, 2023

Checklist

  • Used a personal fork of the feedstock to propose changes
  • Bumped the build number (if the version is unchanged)
  • Reset the build number to 0 (if the version changed)
  • Re-rendered with the latest conda-smithy (Use the phrase @conda-forge-admin, please rerender in a comment in this PR for automated rerendering)
  • Ensured the license file is being packaged.

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
Copy link
Contributor

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
Copy link
Member Author

hadim commented Dec 4, 2023

@conda-forge-admin, please rerender

@hadim
Copy link
Member Author

hadim commented Dec 4, 2023

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 hadim marked this pull request as draft December 4, 2023 20:40
@hadim hadim marked this pull request as ready for review December 4, 2023 21:51
@hadim
Copy link
Member Author

hadim commented Dec 4, 2023

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

I tested the package locally and it works well.

recipe/pyproject.patch Outdated Show resolved Hide resolved
recipe/pyproject.patch Outdated Show resolved Hide resolved
recipe/pyproject.patch Outdated Show resolved Hide resolved
hadim and others added 5 commits December 5, 2023 07:11
Co-authored-by: Greg Landrum <greg.landrum@gmail.com>
Co-authored-by: Greg Landrum <greg.landrum@gmail.com>
@hadim
Copy link
Member Author

hadim commented Dec 5, 2023

Thanks for the review Greg.

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

Copy link
Contributor

@greglandrum greglandrum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks fine to me, but I don't really have much of an understanding of how the pip-conda interplay works.

@greglandrum
Copy link
Contributor

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

@hadim hadim changed the title Run pip install during the build to generate the dist-info folder Run pip install during the build to generate the dist-info folder and add support for rdkit-stubs Dec 8, 2023
@hadim
Copy link
Member Author

hadim commented Dec 8, 2023

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
Copy link
Contributor

@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.

@greglandrum greglandrum merged commit 3cbd4da into conda-forge:main Dec 9, 2023
22 checks passed
@hadim hadim deleted the pypi branch December 9, 2023 11:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants