conda build with conda.recipe but giving explicit packages in the requirements: build:

0 views
Skip to first unread message

Clive Hill

unread,
Jul 4, 2017, 10:30:13 AM7/4/17
to conda - Public
I've been using conda install to create the virtual environment for my project.  To create the environment I use a file that has explicit paths to the tar.bz2 files for each package required.

I can then simply run:

conda create --name ddp --file ddp_environment_explicit_local.txt

(where ddp if the environment name, and package, and ddp_environment_explicit_local.txt is attached).

I want to use this explicit format because a) I want to ensure exactly the same packages are used each time and b) importantly, I want to use our internal artifactory solution which is used by the company for Java (maven) and C# (NuGet).  This ensures that all packages are have had their licenses approved by legal.

So far so good, however I recently wanted to build my package.

I have a meta.yaml as attached.  Note the requirements/build section is not explicit.  This works as expected when used by another Python project I have.

However, I want to use exactly the same files as used in ddp_environment_explicit_local.txt.

Is there a way to specify the tar.bz2 in the meta.yaml?  I can download so that the files are available locally, rather than http, if necessary.


ddp_environment_explicit_local.txt
meta.yaml

Michael Sarahan

unread,
Jul 4, 2017, 10:46:35 AM7/4/17
to Clive Hill, conda - Public
Yes. Either make your artifactory into a conda channel or download files locally, run conda index on the folder of files, and point conda build at that location with a file:// URL.


As long as local folders have the correct structure and index files, you can treat them like channels - use the -c flag to conda build up add channels. You could also add them to your condarc.

--
You received this message because you are subscribed to the Google Groups "conda - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to conda+un...@continuum.io.
To post to this group, send email to co...@continuum.io.
Visit this group at https://groups.google.com/a/continuum.io/group/conda/.
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/conda/6c9f1db3-87f2-456f-a1c8-5230dc99a54b%40continuum.io.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.

Clive Hill

unread,
Jul 5, 2017, 11:03:06 AM7/5/17
to conda - Public, clivei...@googlemail.com
Thanks Michael.  I would like to have made Artifactory into a channel, but apparently although the GUI makes the folders look like folders, the storage mechanism is not that simple.

Instead I will fetch the relevant packages I need to a local win64 folder and run conda index on it.

Initially when I tested this today I thought it was not working.  I then realised that the --override-channels flag doesn't seem to work.

E.g. I enter:

conda search -c C:\LocalFolder\Downloads\Python\Packages\conda-forge --override-channels protobuf

And I get:

Fetching package metadata .............
libprotobuf                  3.2.0                    vc14_0  defaults        [vc14]
                             3.2.0                     vc9_0  defaults        [vc9]
protobuf                     3.2.0                    py27_0  defaults
                             3.2.0                    py35_0  defaults
                             3.2.0                    py36_0  defaults
                             3.3.0               py36_vc14_2  file:///C:/LocalFolder/Downloads/Python/Packages/conda-forge [vc14]

I would expect only the final line to be returned.  This is on conda 4.3.22.  Have you noticed this?

However, this should not be an issue for me as I believe the specified channel in conda build - c will be used to try and match against first.  Hence if the package is in my local folder, all should be good.

Many thanks for your reply.  If you have any feedback around --override-channels not working, I would be very interested to hear.
Reply all
Reply to author
Forward
0 new messages