conda-build | Commands and tools for building conda packages | Build Tool library
kandi X-RAY | conda-build Summary
kandi X-RAY | conda-build Summary
Commands and tools for building conda packages
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Skeletonize a set of files
- Compute build ID for a given package name and version
- Removes a folder
- Get or merge a config
- Packages a conda environment
- Write the activation text for a conda shell
- Find an executable
- Writes activation text
- Return a dict of cmdclass
- Extract the version information from the VCS
- Return a list of package names for the given env
- Create pre - link script
- Fix the link of the linked library
- Get external commands
- Removes pkg cache
- Check if a package is compatible with the given package name
- Bundle a wheel
- Load all files from the cache
- Create a cdt
- Execute the command
- Load setup py data
- Postprocessing
- Check if files have the same prefix
- Create the versioneer config file
- Extract version information from VCS
- Execute psutil
- Returns a dictionary with the contents of the RPM metadata
conda-build Key Features
conda-build Examples and Code Snippets
Community Discussions
Trending Discussions on conda-build
QUESTION
I do use anaconda on an ubuntu 20.04 and since a week or so I have a problem with processes like
...ANSWER
Answered 2022-Apr-01 at 10:59So after a while an update of conda fixed this issue. However, this was strange behaviour.
I did reinstall spyder via pip3 command of the anaconda installation. After that I updated anaconda and conda via conda command.
QUESTION
After I activate my conda environment and I run which python
, I get the following
ANSWER
Answered 2022-Mar-18 at 18:06This article helped me debug this issue. I just had to make sure I deactivated out of conda environment completely even the (base)
environment. For some reason even after deactivating from my po
environment, it went to base
environment
QUESTION
I have downloaded and installed Python (3.9), and Anaconda3. I use Jupyter lab/notebook as my IDE.
I have been trying to install some basic libraries through both the Ananconda Navigator and the Anaconda prompt (Ananconda3). I keep getting this same error:
...ANSWER
Answered 2022-Feb-15 at 16:58I ended up needing to go through an exception process in order to get past my company's firewall.
QUESTION
I honestly can't figure out what is happening with this error. I thought it was something in my manifest file but apparently it's not.
Note, this directory is in my Google Drive.
Here is my MANIFEST.in
file:
ANSWER
Answered 2022-Feb-07 at 15:14there are a few symptoms I would like to suggest looking into:
- There is a WARNING in your error log
SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools
. You haveMANIFEST.in
,setup.py
andsetup.cfg
probably conflicting between them. Becausesetup.py
is the build script for setuptools. It tellssetuptools
about your package (such as the name and version) as well as which code files to include. Also, An existing generated MANIFEST will be regenerated without sdist comparing its modification time to the one of MANIFEST.in or setup.py, as explained here.
Please refer to Building and Distributing Packages with Setuptools, also Configuring setup() using setup.cfg files and Quickstart for more information
- Maybe not so important, but another thing worth looking into is the fact that there are 2 different python distributions being used at different stages, as Python 3.10 is used at:
Using pip 22.0.2 from $PREFIX/lib/python3.10/site-packages/pip (python 3.10)
(it is also in your conda dependencies) and Python 3.8 is used at:File "/Users/jespinoz/anaconda3/lib/python3.8/site-packages/conda_build/tarcheck.py", line 53, in info_files raise Exception('info/files')
which is where the error happens. So maybe another configuration conflict related to this.
QUESTION
I have a local python project called jive
that I would like to use in an another project. My current method of using jive
in other projects is to activate the conda env for the project, then move to my jive
directory and use python setup.py install
. This works fine, and when I use conda list
, I see everything installed in the env including jive
, with a note that jive
was installed using pip.
But what I really want is to do this with full conda. When I want to use jive
in another project, I want to just put jive
in that projects environment.yml
.
So I did the following:
- write a simple
meta.yaml
so I could use conda-build to buildjive
locally - build jive with
conda build .
- I looked at the tarball that was produced and it does indeed contain the
jive
source as expected - In my other project, add jive to the dependencies in
environment.yml
, and add 'local' to the list of channels. - create a conda env using that environment.yml.
When I activate the environment and use conda list
, it lists all the dependencies including jive
, as desired. But when I open python interpreter, I cannot import jive
, it says there is no such package. (If use python setup.py install
, I can import it.)
How can I fix the build/install so that this works?
Here is the meta.yaml, which lives in the jive
project top level directory:
ANSWER
Answered 2022-Feb-05 at 04:16The immediate error is that the build is generating a Python 3.10 version, but when testing Conda doesn't recognize any constraint on the Python version, and creates a Python 3.9 environment.
I think the main issue is that python >=3.5
is only a valid constraint when doing noarch
builds, which this is not. That is, once a package builds with a given Python version, the version must be constrained to exactly that version (up through minor). So, in this case, the package is built with Python 3.10, but it reports in its metadata that it is compatible with all versions of Python 3.5+, which simply isn't true because Conda Python packages install the modules into Python-version-specific site-packages
(e.g., lib/python-3.10/site-packages/jive
).
Typically, Python versions are controlled by either the --python
argument given to conda-build
or a matrix supplied by the conda_build_config.yaml
file (see documentation on "Build variants").
Try adjusting the meta.yaml
to something like
QUESTION
I went looking for some conda
settings. (If you must know, it was related to messing with my bash
's $PS1
- decisions whether to use conda
's config or perhaps environment variables.) For finding the settings, the instruction was to look in .condarc
. To find .condarc
, I was instructed to use, conda config --show-sources
. I did, with this result:
ANSWER
Answered 2022-Feb-04 at 05:33If there are no .condarc
sources, Conda falls back to the values that are hardcoded in the conda.base.context.Context
class. Here's a relevant snippet:
QUESTION
Today, I'm wondering what the difference between Conda in oneAPI and Conda in Anaconda is and how to use the oneAPI in the right way to get the maximum usage of the latest Intel Core gen 12.
After installing oneAPI, they also contain conda. However, I cannot use this as a normal condition when:
-It does not contain conda-build and several packages like normal conda in Anaconda.
-Can not create as well as clone other environments from the "base" of Conda OneAPI. If I clone the "base" to the new one as conda create --name new_env --clone base
and then activate the "new_env", I cannot use Conda anymore and it warns me like the conda does not exist. The warning is as below.
ANSWER
Answered 2022-Jan-04 at 05:55Conda executable in one api does not support all the features supported by conda in anaconda.
Conda executable in one api can be used to download both intel optimized packages as well as anaconda packages.
Conda executable in one api gives performance improvement for intel optimized packages.
Since setvars is not sourced you are getting this warning
QUESTION
I'm trying to install conda environment using the command:
...ANSWER
Answered 2021-Dec-22 at 18:02This solves fine (), but is indeed a complex solve mainly due to:
- underspecification
- lack of modularization
This particular environment specification ends up installing well over 300 packages. And there isn't a single one of those that are constrained by the specification. That is a huge SAT problem to solve and Conda will struggle with this. Mamba will help solve faster, but providing additional constraints can vastly reduce the solution space.
At minimum, specify a Python version (major.minor), such as python=3.9
. This is the single most effective constraint.
Beyond that, putting minimum requirements on central packages (those that are dependencies of others) can help, such as minimum NumPy.
Lack of ModularizationI assume the name "devenv" means this is a development environment. So, I get that one wants all these tools immediately at hand. However, Conda environment activation is so simple, and most IDE tooling these days (Spyder, VSCode, Jupyter) encourages separation of infrastructure and the execution kernel. Being more thoughtful about how environments (emphasis on the plural) are organized and work together, can go a long way in having a sustainable and painless data science workflow.
The environment at hand has multiple red flags in my book:
conda-build
should be in base and only in basesnakemake
should be in a dedicated environmentnotebook
(i.e., Jupyter) should be in a dedicated environment, co-installed withnb_conda_kernels
; all kernel environments need areipykernel
I'd probably also have the linting/formatting packages separated, but that's less an issue. The real killer though is snakemake
- it's just a massive piece of infrastructure and I'd strongly encourage keeping that separated.
QUESTION
Good day
I am getting an error while importing my environment:
...ANSWER
Answered 2021-Dec-03 at 09:22Build tags in you environment.yml are quite strict requirements to satisfy and most often not needed. In your case, changing the yml file to
QUESTION
I have a project, cloudgen, that I would like to add bindings for Python so I can access some of the underlying functions. I have stubbed out the initial work on a branch. Because the main executable is built with cmake, I decided to use scikit-build to manage the build and use pybind11 to deal with the binding (following this example repo).
When I run pip install .
in a virtual environment, everything appears to work as expected. I find the executable is installed to /bin
, the library goes into /lib
, and the module goes into /lib/pythonX.Y/site-packages/cloudgen
. In fact, if I run pip uninstall cloudgen
, all of the correct files are uninstalled. However, my problems arise when I start to test the Python bindings. I find two separate but related problems.
- If I installed into an Anaconda environment, the module is able to resolve the path to the shared library and pass the tests, but the executable does not resolve the path to the library.
- On the other hand, if I installed into a virtual environment using
python -m venv
, both the module and the executable are unable to resolve the path to the shared library.
Searching around, I came across this question which notes I could manipulate LD_LIBRARY_PATH
(or equivalently DYLD_LIBRARY_PATH
on macOS or PATH
on Windows), but that is normally frowned upon. That question references an open issue that refers to including additional build products (which as I said appears to not be my problem) but doesn't address the library path resolution. I also came across this question asking about distributing the build products using scikit-build and this question using setuptools directly. Neither of the questions or answers address the library path resolution.
My question is: What is the correct way to distribute a package that contains an executable, shared library, and Python binding module and have the path resolution Just Work™?
A minimal working example is a bit much, but I created a gist to demonstrate the behavior.
...ANSWER
Answered 2021-Nov-30 at 00:52After a bit more digging (and carefully reading the CMake documentation on RPATH
), the correct answer appears to be explicitly setting RPATH
on installation. The relevant change to the linked gist is to add the following to the CMakeLists.txt after creating the targets (adapted from the linked Wiki):
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install conda-build
You can use conda-build like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page