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

Improve CMake support #8

Merged
merged 42 commits into from
Feb 1, 2024
Merged

Improve CMake support #8

merged 42 commits into from
Feb 1, 2024

Conversation

cNoNim
Copy link
Contributor

@cNoNim cNoNim commented Jan 30, 2024

Checklist

Closes #7

@cNoNim cNoNim changed the title Will work on improve CMake support Improve CMake support Jan 30, 2024
conda-forge-webservices[bot] and others added 4 commits January 30, 2024 11:57
Patch upstream cmake/CMakeLists.txt
Install it as GladConfig.cmake
@cNoNim cNoNim marked this pull request as ready for review January 30, 2024 22:42
@cNoNim
Copy link
Contributor Author

cNoNim commented Jan 30, 2024

@conda-forge-admin, please ping conda-forge/core

Looks like I broke the noarch.
I read https://conda-forge.org/docs/maintainer/knowledge_base.html#noarch-builds

And actually, we have two packages.

  1. glad2 - noarch: python
  2. glad2-cmake requires OS-specific build scripts to place the cmake package in different prefixes for Windows and Unix.

How can it be fixed?

I can try putting cmake-package in both locations, but not fully understand how i can do that without scripts.

@conda-forge-webservices
Copy link
Contributor

Hi! This is the friendly automated conda-forge-webservice.

I was asked to ping @conda-forge/core and so here I am doing that.

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

recipe/meta.yaml Outdated Show resolved Hide resolved
@cNoNim
Copy link
Contributor Author

cNoNim commented Feb 1, 2024

@traversaro

The last iteration seems to have worked.
Going into production?

@cNoNim
Copy link
Contributor Author

cNoNim commented Feb 1, 2024

@conda-forge-admin, please rerender

@cNoNim cNoNim merged commit 51ca929 into conda-forge:main Feb 1, 2024
6 checks passed
@traversaro
Copy link
Contributor

@traversaro

The last iteration seems to have worked. Going into production?

Interesting! To be honest I am afraid that in this configuration the pin_subpackage('glad2', exact=True) will fail once a new glad2 version will be released, as for example for glad2-cmake==3.0.0 there will be no glad2==3.0.0 available on non-Linux platforms. However, you can handle that once a new glad2 version is released. Anyhow, now I understand a bit better the problem, thanks! I have a similar situation in https://github.com/conda-forge/gz-msgs-feedstock/blob/main/recipe/meta.yaml#L66, but to be honest I never realized the problem: indeed multiple noarch package with the same version and build numbers are uploaded, and at the moment I never had problems with that, but I understand that the situation may be confusing. Perhaps a possible solution to avoid uploading multiple noarch packages is to manually force the build string to be a given unique value, so that even if each operating system creates its own noarch package, then only a single one will be uploaded, and all other will be skipped.

@cNoNim
Copy link
Contributor Author

cNoNim commented Feb 1, 2024

Interesting! To be honest I am afraid that in this configuration the pin_subpackage('glad2', exact=True) will fail once a new glad2 version will be released, as for example for glad2-cmake==3.0.0 there will be no glad2==3.0.0 available on non-Linux platforms.

Ouch... So because I made pin_subpackage('glad2', exact=True), the dependency is not allowed on platforms other than Linux.
This is my mistake, I think it needs to be fixed even now.
I'll try to test on a clean environment now.

@cNoNim
Copy link
Contributor Author

cNoNim commented Feb 1, 2024

Seems to have worked.

PS E:\Projects\test-glad2-cmake> micromamba create -p ./.mamba
Empty environment created at prefix: .mamba
PS E:\Projects\test-glad2-cmake> micromamba activate .\.mamba\
(.mamba)PS E:\Projects\test-glad2-cmake> micromamba install glad2-cmake
nvidia/noarch                                                 No change
pytorch/win-64                                                No change
pytorch/noarch                                                No change
nvidia/win-64                                                 No change
pkgs/msys2/win-64                                             No change
pkgs/msys2/noarch                                             No change
pkgs/r/noarch                                                 No change
pkgs/main/noarch                                              No change
pkgs/r/win-64                                                 No change
pkgs/main/win-64                                              No change
conda-forge/win-64                                  20.7MB @  29.9MB/s  0.7s
conda-forge/noarch                                  13.4MB @   9.7MB/s  1.1s

Transaction

  Prefix: E:\Projects\test-glad2-cmake\.mamba

  Updating specs:

   - glad2-cmake


  Package                 Version  Build               Channel           Size
-------------------------------------------------------------------------------
  Install:
-------------------------------------------------------------------------------

  + libexpat                2.5.0  h63175ca_1          conda-forge     Cached
  + ucrt             10.0.22621.0  h57928b3_0          conda-forge     Cached
  + ca-certificates    2023.11.17  h56e8100_0          conda-forge     Cached
  + python_abi               3.12  4_cp312             conda-forge     Cached
  + vc14_runtime      14.38.33130  h82b7239_18         conda-forge     Cached
  + vs2015_runtime    14.38.33130  hcb4865c_18         conda-forge     Cached
  + vc                       14.3  hcf57466_18         conda-forge     Cached
  + tk                     8.6.13  h5226925_1          conda-forge     Cached
  + openssl                 3.2.1  hcfcfb64_0          conda-forge     Cached
  + libzlib                1.2.13  hcfcfb64_5          conda-forge     Cached
  + libffi                  3.4.2  h8ffe710_5          conda-forge     Cached
  + bzip2                   1.0.8  hcfcfb64_5          conda-forge     Cached
  + libsqlite              3.44.2  hcfcfb64_0          conda-forge     Cached
  + xz                      5.2.6  h8d14728_0          conda-forge     Cached
  + tzdata                  2023d  h0c530f3_0          conda-forge     Cached
  + python                 3.12.1  h2628c8c_1_cpython  conda-forge     Cached
  + markupsafe              2.1.4  py312he70551f_0     conda-forge     Cached
  + jinja2                  3.1.3  pyhd8ed1ab_0        conda-forge     Cached
  + glad2                   2.0.4  pyha770c72_1        conda-forge      396kB
  + glad2-cmake             2.0.4  h57928b3_1          conda-forge       11kB

  Summary:

  Install: 20 packages

  Total download: 407kB

-------------------------------------------------------------------------------

@cNoNim cNoNim deleted the glad-cmake branch February 1, 2024 09:42
@traversaro
Copy link
Contributor

Yes, it works fine now. But as soon as a new version of glad is released, the build of glad2-cmake will fail on platforms different from linux64.

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.

Add CMake integration
2 participants