question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

how to add requires from the same channel as current package?

See original GitHub issue

Hi,

sorry for may be stupid question, I’ve read docs and source code, but unfortunately I can’t understand how can I add requires from the same channel as current package.

let me explain. for instance, I currently have OpenSSL package, which depends on two other packages - nasm_installer & ActivePerl_installer. so I have the following code:

self.requires.add("ActivePerl_installer/5.24.0.2400@sse4/testing", private=True)
self.requires.add("nasm_installer/2.12.02@sse4/testing", private=True)

I have many other packaging with complex dependency hierarchy. so, once I decide to make new channel for well-tested and stable packages, I will probably end-up with patching lots of my receipts like this:

self.requires.add("ActivePerl_installer/5.24.0.2400@sse4/stable", private=True)
self.requires.add("nasm_installer/2.12.02@sse4/stable", private=True)

which is pretty boring and annoying. same situation if my college wants to fork package hierarchy and change to his username. ideally, I would want to write something like these:

self.requires.add("ActivePerl_installer/5.24.0.2400@%s/%s" % (self.username, self.channel), private=True)
self.requires.add("nasm_installer/2.12.02@%s/%s" % (self.username, self.channel), private=True)

therefore all packages in hierarchy are from the same channel. is it somehow possibly to do something like that? P.S. I’ve seen approach with environment variables, but it’s external to conanfile, but I want to get information from the current file, which is much more transparent and less error prone.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:12 (12 by maintainers)

github_iconTop GitHub Comments

2reactions
SSE4commented, Dec 2, 2016

@memsharded yes, requirements() method is perfect place to define requirements 😃 I’ll try your proposal tomorrow and let you know how does it work.

1reaction
SSE4commented, Dec 5, 2016

@memsharded I confirm your branch works as expected, thanks a lot for your effort!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Using Packages and Channels - The Carpentries Incubator
You can install a package from a specific channel into the currently activate environment by passing the --channel option to the conda install...
Read more >
The following packages are not available from current ...
Try adding the conda-forge channel to your list of channels with this command: conda config --append channels conda-forge .
Read more >
Managing channels — conda 22.11.1.post9+82fa24bae ...
Managing channels · Add channel_priority: false to your .condarc file. OR · Run the equivalent command: conda config --set channel_priority false.
Read more >
Build requirements — conan 1.35.2 documentation
If a build requirement applies to different packages with the same configuration it will only be installed once (same behavior as normal dependencies...
Read more >
Tips & tricks — conda-forge 2022.12.16 documentation
In addition to the channel priority, we recommend always installing your packages inside a new environment instead of the base environment from anaconda/ ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found