Best way to parameterize the version
See original GitHub issueJust wanted to get an opinion on this. As part of a continuous build pipeline, the conan package building step will have the version given by the CI system in an environment variable. It seems I can’t do:
version = os.environ['VARIABLE_VERSION']
in my conanfile.py
; so the only thing I can come up with is to use perl or something to generate the conanfile.py
from a template and then export the generated file.
Is there a better way?
John
P.S. - Nice job on 0.20. I really like the fixes to environment vars.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Working with parameter versions - AWS Systems Manager
The following procedures show you how to edit a parameter and then verify that you created a new version. You can use the...
Read more >Working with parameter versions - Amazon Systems Manager
Create a new version of a parameter (console) · In the navigation pane, choose Parameter Store. · Choose the name of a parameter...
Read more >parameterized - PyPI
The names of the test cases generated by @parameterized.expand can be customized using the name_func keyword argument. The value should be a function...
Read more >Parameterization In TestNG - DataProvider and TestNG XML ...
This article will talk about Parameterization in TestNG for Selenium automation testing using both DataProvider and the Parameter annotation ...
Read more >Parameterization – Load Testing with LoadRunner Tutorial #6
This LoadRunner VuGen Parameterization Tutorial will help you to learn Parameterization in detail along with the types of parameters and the ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Not directly, but you can do it. Some hints:
exports
of thatrequires.txt
requirements()
method, load therequires.txt
file (will be in the local cache), and define theself.requires()
with the values in it.Thank you. I verified this works and is only used during export. It is safe to have the variable missing from the environment upon install. I think the error I was having was not setting the variable on install, and the key was missing in the
os.environ
dict. I just changed it to aos.environ.get(key, default)
instead, and the default value is safely ignored at install time.getenv()
looks even more apropriate.