Skip to main content

How to use conda-build to build a Python package with C/C++ dependencies

· 5 min read
Vasvi Sood
Open Source Contributor

Image credit: Mahe Iram Khan


conda-build is an application that automates the process of building and distributing Python packages. It is a powerful tool that has the added advantage of handling dependencies that require C/C++ or other languages. This is particularly useful for scientific computing, where many Python packages have complex dependencies and require specialized libraries and tools.

A recipe outlines the steps needed to build a package from source code. We can create this "recipe" using grayskull. A recipe includes all the necessary information, from downloading and installing dependencies to compiling the source code and creating the final package. Conda-build then renders the recipe to build the package. A recipe typically includes:

  • A script that contains metadata.
  • The script that installs the files for the package on macOS and Linux.
  • The build script that installs the files for the package on Windows.
  • Any additional setup files, depending on the complexity of the package.

In this article, we will guide you through the process of building your Python package with conda-build! conda-build can help us handle even the most complex dependencies for our package, making the process smoother and more efficient. Let's get ready to build an amazing Python package!

How we reduced conda's index fetch bandwidth by 99%

· 7 min read
Daniel Holth
Conda maintainer

The new conda 23.3.1 release from March, 2023 includes an --experimental=jlap flag or experimental: ["jlap"] .condarc setting that can reduce repdata.json fetch bandwidth by orders of magnitude. This is how we developed conda's new incremental repodata feature.

Conda is a cross-platform, language-agnostic binary package manager that includes a constraint solver to choose compatible sets of packages. Before conda can install a package, it downloads information about all available packages. This allows the solver to make global decisions about which packages to install. The time and bandwidth spent downloading this metadata can be significant, but we have improved this in conda 23.3.1. By enabling the experimental: ["jlap"] feature in .condarc, conda users can see more than a 99% reduction in index fetch bandwidth.

Welcome to conda.org!

· 2 min read
Travis Hathaway
Conda maintainer 👷🔧

Image credit: Nico Smit on Unsplash


Welcome to conda.org! This website was created by and for the conda community and aims to support the greater conda ecosystem. As a site visitor, these are just some of the things you can expect to find here going forward:

  • News and updates for many projects within the conda ecosystem; from organizations such as conda, mamba, and conda-forge
  • Information on how to get involved with our projects (check out the Community page)
  • Emerging trends and technologies within the ecosystem; this site will be a platform to promote cutting edge work going on in the community
  • Plus more!

Conda survey results

· 10 min read
Dave Clements
Open Source Community Manager

Anaconda surveyed the conda community in late 2022. This post reviews what we learned from that survey and how it is impacting the future directions of conda.

Around the same time, the Python Software Foundation published the results of their (much, much bigger) Python Packaging Survey. The two surveys asked some similar questions and some distinct ones. We include insights from the PSF survey when they are particularly relevant to the conda community.

Conda Community Chat is now on Element/Matrix

· 5 min read
Dave Clements
Open Source Community Manager

We are pleased to announce that the conda community has migrated our chat rooms to the Matrix/Element platform. For the first time since the conda ecosystem was young, every conda-related chat room is now easily accessible on one platform.

Matrix and Element have been around for a couple of years, and are used widely by communities like ours. Let's dive in:

Get conda news on the conda Announce mailing list

· One min read

Conda Announce is a new mailing list for announcements and news relevant to the conda ecosystem and community.

If you want to stay informed about software releases, new features, upcoming events, and other community news then this is the list for you.

The mailing list is moderated and low-volume: Most news will go out in monthly summary posts. (Our goal is to keep the list volume low enough, and the content relevant enough, that you don’t feel a need to filter it out of your inbox.)

See:

We hope to see you online!

Conda now fiscally sponsored by NumFOCUS

· One min read
Dave Clements
Open Source Community Manager

The conda Organization is delighted to announce that we are now fiscally sponsored by NumFOCUS. This will enable conda to apply for grants, accept and distribute funds, manage trademarks and own web domains with a distinct legal standing.

This milestone demonstrates how far the organization has come in creating an effective open source community with capable governance processes on par with other established projects. With this sponsorship comes the promise of further development - such as transitioning into full openness within GitHub – so stay tuned!

Conda 22.11.1 Released

· One min read

The latest conda release is now available. To update run:

conda install -n base conda=22.11.1

This release includes a number of improvements including:

Check out the 🎥 release video (!) and the changelog for the complete list of improvements.

Conda-build 3.23 Released

· One min read

conda-build is a conda package for building your own packages for conda and other package managers.

To install conda-build run

conda install conda-build

If you already have it installed, you can upgrade to the newest version with

conda upgrade conda-build

The 3.23.0 and 3.23.1 releases have several updates:

  • Outputs now support both script and files arguments. When both script and an explicit file list are given, the script is run first and then the files given in the explicit file list are packaged. (#4281)
  • Add overlinking_ignore_patterns build parameter to speed up recipes where it is not helpful. (#4576)
  • Add win-arm64 as a recognized platform (subdir). (#4579)
  • Add opt-in environment variable to run conda in isolated mode (python -I -m conda) when invoked from conda-build. This is necessary to fix an issue when packaging conda itself. Alternative solutions (see #4628) are under investigation, so the current implementation will likely change. (#4604, #4625)
  • Refactored conda_build.convert.update_lib_contents to use pathlib.Path. Mark test_cli.test_convert as xfail on Windows (something with the GitHub Windows Runner makes this particularly flaky). (#4619, #4626)

See the conda-build documentation for more on how to use it to create packages.

prefix.dev - A Fast Package Search Website

· One min read
Bas Zalmstra
prefix.dev

Hey everyone!

Im very proud to announce the launch of prefix.dev, a fast conda package search website with many more features to come.

For more information about prefix.dev the company and the website see here.

If you get the time to check it out, Im very curious to your thoughts! Would also love to see if we can work together with the community here!

Cheers! Bas Zalmstra